天天看点

virsh console配置

if you're trying to get to the console, you can either use virt-viewer for the graphical console or attach to a serial tty (as carlos mentioned) with the "virsh console" command.

assuming your vm is named "myvm", you'd use virt-viewer like this:

for a serial console, you'll need to modify the kernel command line in grub (in the vm). in fedora/rhel/centos you'd do it this way:

the procedure should be similar on debian and ubuntu but you'll need to search for the proper way to update grub2 for that platform.

  

during installation you can access system console of a guest vm on the terminal:

 

then,

vm console's serial option is like below.

the <code>/dev/pts/xxx</code> path will be recorded in the xml document when the guest is running.

the <code>virsh ttyconsole</code> command merely reads it from the xml

继续阅读