Palegray.net - Code, Linux/BSD, Tech, and more
Home Projects Tutorials Forums About Contact

Debian 6 (Squeeze) KVM Virtualization Howto

Final Notes and Tips

While logged into your KVM host via SSH, you can use the following command to view a list of running VMs.

virsh list

If you'd like to be able to boot and shut down your VMs from either the command line using the "virsh" utility, or from the virtual machine manager on your KVM management workstation, you must install ACPI support packages on each of your guest VMs. The package names will differ from distro to distro, but on Debian-based guest VMs you should be able to issue the following commands to get the required packages installed.

apt-get update
apt-get install acpi-support acpid

Once you've got the required support packages installed in your guest VMs, you can issue the following commands on your KVM host to boot and shut down guests, respectively. Substitute the VM name for "my-guest-vm" in these commands.

virsh start my-guest-vm
virsh shutdown my-guest-vm

If you wish to simulate "pulling the power cord" on a VM, you can issue the following command.

virsh destroy my-guest-vm

If you're using file-based virtual disk images, they will be stored under the "/var/lib/libvirt/images" directory by default. If you'd like to have a look at the raw configuration files for your VMs, you can find them in the "/etc/libvirt/qemu" directory on your KVM host.

Previous: Deploy Your First KVM Virtual Machine