I’ve been playing with Cobbler at home lately now that my server was upgraded to an quad core with the magic vmx flag and ran into an issue deploying Ubuntu VM’s with it. The install itself and import of the distro is pretty straight-forward, Canonical has some documentation on the process. Koan can be used for provisoning VM’s (as is mentioned in the docs), however I have some prior Cobbler experience with CentOS and would like to develop this further with Ubuntu.
The problem I encountered was the following: during the install process Ub would not detect the virtual disks and an error is thrown, “no root filesystem is defined”. I’m using the default KVM virtio disk bus type here and apparently the debian-installer will not detect these with the default configuration. If you launch a shell and check, /dev/vda exists and running fdisk on it seems to suggest all is good. Also, running the install via a CD/ISO works just fine as well. The problem lies with Cobbler.
Eventually I narrowed it down to the preseed file. When you import the distro it’s mentioned in the Ubuntu Cobbler preseed docs that a default preseed file is generated. What it doesn’t mention is that something in this configuration is not compatible with virtio disk types. I haven’t narrowed it down, instead I just copied the Ubuntu profile to a new one and changed the kickstart/preseed to /var/www/cobbler/ks_mirror/[ubuntu-distro-name]/preseed/ubuntu-server-minimalvm.seed. I’ve got some more work to do on the preseed, I’m not all too familiar with them yet but planning to change that.