CentOS Virtualization

General support questions
jough
Posts: 7
Joined: 2018/07/10 22:34:11

CentOS Virtualization

Post by jough » 2018/07/10 23:34:35

I need some assistance with a machine I have inherited at my job. It currently is running CentOS 6.9 which seems to have VM's of CentOS as guests as well which I have no experience with accessing. The VM is running LAMP and is accessed internally through a local website. If I change the IP address of the host, it breaks the website as well as the mysql database and apache have no idea where to look. The end goal is knowing the commands to access the VM's so I can pull the mysql data off that VM and migrate it to a cloud environment. Does anyone have any experience with virtualization from the command line in a CentOS environment?

Thank you in advance for any help.


Jeremy.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: CentOS Virtuliazation

Post by aks » 2018/07/14 09:44:09

What virtualisation software? KVM? VMware?

jscarville
Posts: 135
Joined: 2014/06/17 21:50:37

Re: CentOS Virtualization

Post by jscarville » 2018/07/16 14:09:02

I no longer have any CentOS hosted VMs but when I did I used virsh to manage them. Start with the list command to see what machines are on your host.

jough
Posts: 7
Joined: 2018/07/10 22:34:11

Re: CentOS Virtuliazation

Post by jough » 2018/07/16 20:09:25

aks wrote:
2018/07/14 09:44:09
What virtualisation software? KVM? VMware?
Thats the problem, I have no idea. I have virtualized many environments with VMare but never in Linux.

jough
Posts: 7
Joined: 2018/07/10 22:34:11

Re: CentOS Virtualization

Post by jough » 2018/07/16 20:10:41

With the virsh list command i show two machines

database
database-dev

Any idea how to log into them?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS Virtualization

Post by TrevorH » 2018/07/17 02:51:53

virsh console $vm
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jough
Posts: 7
Joined: 2018/07/10 22:34:11

Re: CentOS Virtualization

Post by jough » 2018/07/17 15:58:16

So this is as far as i have gotten in the past

[root@nix4~]# virsh console database
Connected to domain database
Escape character is ^]


After this the only way to get out of this prompt is ctrl^ but I am unable to do anything else. Can you provide information on the next step?

Thanks again for all the information!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS Virtualization

Post by TrevorH » 2018/07/17 16:01:07

Press enter and you should see a login prompt

Code: Select all

# virsh console myvm
Connected to domain myvm
Escape character is ^]

CentOS Linux 7 (Core)
Kernel 3.10.0-862.6.3.el7.x86_64 on an x86_64

myvm login: 
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: CentOS Virtualization

Post by MartinR » 2018/07/17 16:43:53

Trevor,
I've been lurking on this one and can confirm similar behaviour:

Code: Select all

# virsh list
 Id    Name                           State
----------------------------------------------------
 1     <myhost>F                      running
 2     <myhost>7                      running

# virsh console <myhost>7
Connected to domain <myhost>7
Escape character is ^]

^]
# virsh console <myhost>F
Connected to domain <myhost>F
Escape character is ^]

^]
and you can press return half-a-dozen times with no effect. My host is running C6.10, <myhost>7 is running C7.5.1804 and <myhost>F runs Fedora 27. ssh works between all nodes.

jough
Posts: 7
Joined: 2018/07/10 22:34:11

Re: CentOS Virtualization

Post by jough » 2018/07/17 16:53:31

Yea I am not sure what is going on but nothing happens when I push enter. Depending on the machine, could this take awhile before it reads it?

Post Reply