OxDEAD Unicornz

Have you ever seen so many?

Ubuntu 14.04 Problem With Vmbuilder

Recently hit quite an annoying bug in vmbuilder, tool that allows to build Ubuntu based virtual machines.

Was trying to build a VM using the following command:

1
vmbuilder kvm ubuntu --suite trusty --flavour virtual --arch amd64 --mem 8192 --rootsize 8000 --dest /var/lib/libvirt/images --libvirt qemu:///system --hostname new-host --user jenkins --name jenkins --pass <jenkins_user_password> --addpkg openssh-server --addpkg git --addpkg acpid

but kernel installation failed with the following error:

1
2
3
Unpacking linux-image-virtual (3.13.0.53.60) ...
, stderr: grep: /proc/cpuinfo: No such file or directory
This kernel does not support a non-PAE CPU.

Quite strange because host does support pae:

1
2
root@kvm-host:~\> cat /proc/cpuinfo | grep pae                                                                                                                                                                     
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx tm2 ssse3 cx16 xtpr pdcm dca lahf_lm dtherm tpr_shadow vnmi flexpriority

kernel package now looks for /proc/cpuinfo in order to check for PAE support (since PAE support is going away in Quantal). I think this is failing because /proc doesn’t exist in the environment that vmbuilder is using.

Guys in the thread propose to install an additional kernel as a workaround by adding ‘—addpkg linux-image-generic’ to the command. Well, this works:

1
vmbuilder kvm ubuntu --suite trusty --flavour virtual --arch amd64 --mem 8192 --rootsize 8000 --dest /var/lib/libvirt/images --libvirt qemu:///system --hostname new-host --user jenkins --name jenkins --pass <jenkins_user_password> --addpkg openssh-server --addpkg git --addpkg acpid --addpkg linux-image-generic

Build finished successfully and I see newly built VM now:

1
2
3
4
root@kvm-host:~\> virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     new-host                    shut off