← Back to team overview

openstack team mailing list archive

Re: Can I run qemu-kvm in an OpenStack Instance

 

On Fri, 14 Jun 2013, laclasse wrote:

> Yes, the Ubuntu cloud image is made to run as a guest atop an hypervisor
> and it makes sense to optimize it by removing the unlikely needed modules
> that usually require hardware to run (nested virt is not yet common). Scott
> Moser may confirm/infirm.
>
> Maybe you can try installing the 'normal' kernel on your guest that has the
> vmx flag exported in its vm config and try loading it again. On that Ubuntu
> guest, you can also install "cpu-checker" that gives you a 'kvm-ok' cli:
> # kvm-ok
> INFO: /dev/kvm exists
> KVM acceleration can be used
>
> Hope this helps.

I saw this thread, and was about to respond, but Robert Collin's response
was correct:

  install linux-image-generic, it will bring in
  linux-image-extra-$version-generic which has kvm.

Alternatively, just:
   apt-get install linux-image-virtual-extra

I think that then you have to do a 'modprobe kvm_intel ; modprobe kvm_amd'
also, but a reboot would also fix it.  The reason you have to modprobe is
that the udev events that would fire to automatically load those modules
have already fired on boot.

Then, happily use kvm.  I use kvm all the time in nested virt on
openstack.  Now, if I could only get an instance that supported nested
virt from a public cloud provider that would ROCK ...  I'd happily pay
additional $/hr for 'm1.large-nested-virt' type.

Robert / HP / dreamhost / Rackspace are you listening?


Follow ups

References