Re: [Openstack] 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? ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Jun 17, 2013, at 1:59 PM, Scott Moser smo...@ubuntu.com wrote: 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? That's great information, and a good validation that it is possible. Thanks! I did end up installing linux-image-extra-virtual and it brought in KVM. It SEEMS that everything is working, but my veewee attempts all end at Done typing. (That may not be the exact wording.) And yes, I did the modprobing. Oddly, when I set up a real machine with a veewee environment and tried the same thing, I got the same result. So it's probably not the nested virt that is the issue here. That's why I stopped posting about it here. It's no longer OpenStack-related (it was barely that to start with! :)) This page: http://www.cberendt.de/2013/03/usage-of-nested-virtualization-inside-instances says that I need to set libvirt_cpu_mode to host-passthrough in nova.conf. I did that, rebooted all nova-* services and rebooted the guest, but I never saw the stuff in dmesg that it claims I should. Ah well, I'll keep plodding on until it works. Thanks for your input! Daniel ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Jun 13, 2013, at 5:54 PM, Daniel Ellison dan...@syrinx.net wrote: That did it! I'm now creating a CentOS KVM image in an Ubuntu OpenStack VM. I'll wait until it finishes before celebrating, but there are no errors so far. Well I didn't get to celebrate, as the veewee build process stops after it's finished typing into the running KVM instance (e.g. Typing:[1]: Tab text ks=http://10.10.10.131:7122/ks.cfgEnter). This happens with both a CentOS and an Ubuntu build. Of course, I have no idea whether this has anything to do with nested virtualization. Since it's really not OpenStack-related, I won't bother the list any further with this. Thanks all for your help and suggestions! If I ever do get this working I'll come back and describe how I did it. Daniel ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Jun 13, 2013, at 4:36 PM, Daniel Ellison dan...@syrinx.net wrote: libvirtd is already running on the guest. One more data point: the guest does have the vmx capability enabled: cpu match='exact' modelPenryn/model vendorIntel/vendor feature policy='require' name='hypervisor'/ feature policy='require' name='vmx'/ feature policy='require' name='ss'/ feature policy='require' name='vme'/ feature policy='disable' name='sse4.1'/ /cpu Dan ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
What is the guest OS? It seems the error Module kvm not found points to the missing kernel module rather than it not loading. Is the guest kernel 2.6.23? Can you find a kvm.ko and kvm-intel.ko on the guest file system? I'd recommend looking at this for RHEL/CentOS/Fedora: http://kashyaspc.wordpress.com/2013/02/12/nested-virtualization-with-kvm-and-intel-on-fedora-18/ Hope this helps. On Thu, Jun 13, 2013 at 9:53 PM, Daniel Ellison dan...@syrinx.net wrote: On Jun 13, 2013, at 4:36 PM, Daniel Ellison dan...@syrinx.net wrote: libvirtd is already running on the guest. One more data point: the guest does have the vmx capability enabled: cpu match='exact' modelPenryn/model vendorIntel/vendor feature policy='require' name='hypervisor'/ feature policy='require' name='vmx'/ feature policy='require' name='ss'/ feature policy='require' name='vme'/ feature policy='disable' name='sse4.1'/ /cpu Dan ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Jun 13, 2013, at 5:05 PM, laclasse lacla...@gmail.com wrote: What is the guest OS? It seems the error Module kvm not found points to the missing kernel module rather than it not loading. Is the guest kernel 2.6.23? Can you find a kvm.ko and kvm-intel.ko on the guest file system? I did do a search for the kernel modules on the guest and they were not found. The guest OS was generated from the ubuntu-precise-server-cloudimg-amd64 image available from Ubuntu. uname -a says (in part) Linux image 3.2.0-45-virtual. I've installed libvirt-bin libvirt-dev kvm qemu qemu-kvm, and they brought in things like bridge-utils, etc. Thanks, Daniel ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
No. You can't use KVM in a guest since it requires hardware virtualization. Instead you need to use qemu in emulation mode. Refer to the devstack code for how to set this up, since devatack will work in Amazon EC2. On Thu, Jun 13, 2013 at 4:54 PM, Daniel Ellison dan...@syrinx.net wrote: On Jun 13, 2013, at 4:36 PM, Daniel Ellison dan...@syrinx.net wrote: libvirtd is already running on the guest. One more data point: the guest does have the vmx capability enabled: cpu match='exact' modelPenryn/model vendorIntel/vendor feature policy='require' name='hypervisor'/ feature policy='require' name='vmx'/ feature policy='require' name='ss'/ feature policy='require' name='vme'/ feature policy='disable' name='sse4.1'/ /cpu Dan ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Jun 13, 2013, at 5:19 PM, Parrott, Robert parr...@g.harvard.edu wrote: No. You can't use KVM in a guest since it requires hardware virtualization. Instead you need to use qemu in emulation mode. Refer to the devstack code for how to set this up, since devatack will work in Amazon EC2. I will probably take a look at the devstack code, then. But the purpose of nested KVM is to allow direct access to the cpu virtualization extensions of the host machine from a properly-configured guest. That would be ideal. But all I REALLY want to do is create KVM images, not actually run them. If there's another way to do that, I'll be happy. Thanks, Dan ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Jun 13, 2013, at 5:24 PM, David Stearns dstea...@gnip.com wrote: There's no reason using nested KVM shouldn't work so long as the hardware supports it. Do you know what kind of hardware support is required? Obviously my host already supports CPU virtualization extensions. :) Looks like http://dachary.org/?p=1318 provides a pretty good walkthrough on getting it working on openstack. That looks like a great reference! I'll go through it and see if I did anything wrong or left anything out. Thanks, David. ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On 14 June 2013 09:18, Daniel Ellison dan...@syrinx.net wrote: On Jun 13, 2013, at 5:05 PM, laclasse lacla...@gmail.com wrote: What is the guest OS? It seems the error Module kvm not found points to the missing kernel module rather than it not loading. Is the guest kernel 2.6.23? Can you find a kvm.ko and kvm-intel.ko on the guest file system? I did do a search for the kernel modules on the guest and they were not found. The guest OS was generated from the ubuntu-precise-server-cloudimg-amd64 image available from Ubuntu. uname -a says (in part) Linux image 3.2.0-45-virtual. install linux-image-generic, it will bring in linux-image-extra-$version-generic which has kvm. Cheers, Rob -- Robert Collins rbtcoll...@hp.com Distinguished Technologist HP Cloud Services ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Thu, Jun 13, 2013 at 4:19 PM, Parrott, Robert parr...@g.harvard.eduwrote: No. You can't use KVM in a guest since it requires hardware virtualization. Instead you need to use qemu in emulation mode. Refer to the devstack code for how to set this up, since devatack will work in Amazon EC2. It *is* possible to do KVM in KVM, actually. I just set it up today (but it was my manually created KVM hosting a devstack launching KVM guests, not the same situation as Daniel). I've heard this you can't do KVM in KVM thing from a few different people and I want to make sure that it's clear that you actually can, given the correct hardware support. -- IRC: radix Christopher Armstrong Rackspace ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
On Jun 13, 2013, at 5:34 PM, Robert Collins robe...@robertcollins.net wrote: install linux-image-generic, it will bring in linux-image-extra-$version-generic which has kvm. That did it! I'm now creating a CentOS KVM image in an Ubuntu OpenStack VM. I'll wait until it finishes before celebrating, but there are no errors so far. Just to clarify, I first installed linux-image-generic but it didn't automatically bring in linux-image-extra-$version-generic. I did an apt-cache search and found linux-image-extra-virtual. I installed that and it brought in KVM. I subsequently had to start qemu-kvm manually, but it did start. I'll update this thread if and when the CentOS image is created successfully. Thanks, Robert! ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
If you really want to go crazy, why not run OpenStack in an OpenStack instance to launch your qemu machines: http://devstack.org/guides/single-vm.html - Joseph From: Openstack [openstack-bounces+joseph.quinn=rackspace@lists.launchpad.net] on behalf of Daniel Ellison [dan...@syrinx.net] Sent: Thursday, June 13, 2013 4:54 PM To: Robert Collins Cc: OpenStack Users Subject: Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance On Jun 13, 2013, at 5:34 PM, Robert Collins robe...@robertcollins.net wrote: install linux-image-generic, it will bring in linux-image-extra-$version-generic which has kvm. That did it! I'm now creating a CentOS KVM image in an Ubuntu OpenStack VM. I'll wait until it finishes before celebrating, but there are no errors so far. Just to clarify, I first installed linux-image-generic but it didn't automatically bring in linux-image-extra-$version-generic. I did an apt-cache search and found linux-image-extra-virtual. I installed that and it brought in KVM. I subsequently had to start qemu-kvm manually, but it did start. I'll update this thread if and when the CentOS image is created successfully. Thanks, Robert! ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Can I run qemu-kvm in an OpenStack Instance
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. On Thu, Jun 13, 2013 at 10:18 PM, Daniel Ellison dan...@syrinx.net wrote: On Jun 13, 2013, at 5:05 PM, laclasse lacla...@gmail.com wrote: What is the guest OS? It seems the error Module kvm not found points to the missing kernel module rather than it not loading. Is the guest kernel 2.6.23? Can you find a kvm.ko and kvm-intel.ko on the guest file system? I did do a search for the kernel modules on the guest and they were not found. The guest OS was generated from the ubuntu-precise-server-cloudimg-amd64 image available from Ubuntu. uname -a says (in part) Linux image 3.2.0-45-virtual. I've installed libvirt-bin libvirt-dev kvm qemu qemu-kvm, and they brought in things like bridge-utils, etc. Thanks, Daniel ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp