If your virtual machine does not shut down when asked by the hypervisor, install the package acpi-support.
sudo apt-get install acpi-support
Works at least with KVM, but I see no reason why it would not work as well in other virtualization platforms, if they just send the ACPI shutdown signal to VM.
If you need to create lots of similar virtual machine guests running on QEMU/KVM, it is a very good idea to prepare a template guest image from which to clone the other guests. You should do whatever customizations you like before cloning. For instance I like to configure LVM and file systems to my liking, install openssh-server, install nfs-common and configure NFS mounts, install all available updates, add users or set up authentication, copy ssh keys, and do many other things so that they will be working out-of-the-box after cloning a number of guests from the template.
After you have installed and set-up your template virtual server to your liking, and would want to start cloning multiple instances of it, some tricks are needed to make things work more automatically after cloning and starting up the final copy.
If you simply clone a vanilla Ubuntu server installation multiple times, you will face some problems:
Continue reading Cloning Ubuntu 10.04 Server KVM guests efficiently
The virt-manager VNC screen is fine for LAN connections, and good for running graphical sessions. X is not installed on Ubuntu server by default, and VNC is really bad over slow links even for text console. I like to configure serial console for all my virtualized guests, because with it, I can simply ssh into the virtual machine host, and run “virsh console <guest-name>” to get a working console. Very nice for fixing broken network connections or file systems, or any kind of boot problems. And I can do it using just my cell phone, ssh over 3G connection from anywhere!
Continue reading Serial console for Ubuntu server 10.04 KVM guests
First, some empty disk space is needed. Let’s create a logical volume for our new virtual machine:
root@xenserver1:~# <strong>lvcreate -n testlv -L 10G vg0</strong>
Logical volume "testlv" created
Create a filesystem on the new logical volume:
Continue reading Bootstrapping an Ubuntu guest for Xen
VMware Server needs exactly two kernel modules running on the host system (there are separate modules for guest systems). These are the vmmon and the vmnet modules. Unfortunately, the vmmon and vmnet packages included in the VMware server distribution package don’t compile with the newest kernels. When I upgraded my laptop to Gutsy Gibbon a few weeks ago, I forgot to check if VMware server supports the new kernel. And, of course, it doesn’t yet. But luckily I found the vmware-any-any package, a patched version of the host kernel modules that works with newer kernel versions.
Continue reading How to get VMware Server working with an unsupported kernel and the vmware-any-any patch