Installation guide
Dell Inc.
KVM Virtualization in RHEL 6 Made Easy
11
# virt-top
Show VM disk partitions:
# virt-df vm1
Stop a VM (shutdown the OS):
# virsh shutdown vm1
Start VM:
# virsh start vm1
Mark VM for autostart (VM will start automatically after host reboots):
# virsh autostart vm1
Mark VM for manual start (VM will not start automatically after host reboots):
# virsh autostart –disable vm1
5.2 Getting access to a VMs console
If you do not have an X server running on your host, connecting to a VMs serial console might be the
only way to login to a VM if networking is not available. Setting up access to a VM‟s console is no
different than in a physical server, where you simply add the proper kernel boot parameters to the VM.
For example, for a RHEL VM, append the following parameters to the kernel boot line in /etc/grub.conf
and then reboot the VM:
console=tty0 console=ttyS0,115200
Then, after the VM boots, run in the host:
# virsh console vm1
5.3 Attaching USB storage device to a VM
Say you have files in a USB key that you want to copy to your VM. Rather than copying the files to your
VM via the network, you can directly attach the USB key (or any USB storage device) to your VM, which
will then appear as an additional storage device on your VM. First identify the device name of your
USB storage device after you plug it in on the host. In this example, it will be /dev/sdb:
# virsh attach-disk vm1 /dev/sdb vdb --driver tap --mode shareable
vdb is the device name you want to map to inside the VM
you can mount your USB device to more than one VM at a time, but be careful as there is no write
access control here.