Tuesday, March 17, 2015

console access to VM


On the virtual machine, add ‘console=ttyS0‘ at the end of the kernel lines in the /boot/grub2/grub.cfg file(by executing the following grubby command):

# grubby --update-kernel=ALL --args="console=ttyS0"
 
NOTE: ssh to VM (or) use virt-manager and run the
above command. 

Now, reboot the virtual machine:
# reboot

Now,
virsh list --all 

virsh start <your vm name>

virsh start /etc/libvirt/qemu/YOUR_VM.xml

virsh list
// output
// say vm.example.com is the domain.

Now, connect to the virtual machine’s console (here vm.example.com):

# virsh console vm.example.com
(or)
#virsh console <ID number>

 

No comments:

Post a Comment