Page 1 of 2

CentOS Virtualization

Posted: 2018/07/10 23:34:35
by jough
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.

Re: CentOS Virtuliazation

Posted: 2018/07/14 09:44:09
by aks
What virtualisation software? KVM? VMware?

Re: CentOS Virtualization

Posted: 2018/07/16 14:09:02
by jscarville
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.

Re: CentOS Virtuliazation

Posted: 2018/07/16 20:09:25
by jough
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.

Re: CentOS Virtualization

Posted: 2018/07/16 20:10:41
by jough
With the virsh list command i show two machines

database
database-dev

Any idea how to log into them?

Re: CentOS Virtualization

Posted: 2018/07/17 02:51:53
by TrevorH
virsh console $vm

Re: CentOS Virtualization

Posted: 2018/07/17 15:58:16
by jough
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!

Re: CentOS Virtualization

Posted: 2018/07/17 16:01:07
by TrevorH
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: 

Re: CentOS Virtualization

Posted: 2018/07/17 16:43:53
by MartinR
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.

Re: CentOS Virtualization

Posted: 2018/07/17 16:53:31
by jough
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?