joelones Posted September 1, 2015 Share Posted September 1, 2015 Probably a silly question to ask but is it at all possible to install something like Virtual Box within a Windows VM. I can think of a situation where thing could come up. Just curious whether this is at all feasible. Found this: http://www.linux-kvm.org/images/3/33/02x03-NestedVirtualization.pdf Quote Link to comment
archedraft Posted September 1, 2015 Share Posted September 1, 2015 I'm sure it would work but it seems pretty pointless. Why install a VM in a VM? Just create another VM in unRAID if you want to test a different OS or setting. Quote Link to comment
joelones Posted September 1, 2015 Author Share Posted September 1, 2015 Scenario: Android developer using a Windows VM needing an android VM (ie: Genymotion) for testing. Genymotion uses VirtualBox as it's underlying virtualization platform, in fact it's a prerequisite prior to installing. Genymotion interacts with VB behind the scenes. 1 Quote Link to comment
jonp Posted September 1, 2015 Share Posted September 1, 2015 Scenario: Android developer using a Windows VM needing an android VM (ie: Genymotion) for testing. Genymotion uses VirtualBox as it's underlying virtualization platform, in fact it's a prerequisite prior to installing. Genymotion interacts with VB behind the scenes. Pretty fringe use-case so while interesting, probably not anywhere soon on the roadmap for us. Quote Link to comment
LiPolymer Posted November 18, 2015 Share Posted November 18, 2015 Sorry if I'm a bit late to the party, but I'm also interested in nested virtualization on unRAID. As a developer, you are pretty often faced with using VMs. Not just as mentioned above using Android but for web development as well (vagrant is pretty popular out there and makes lives much easier, but requires Virtual Box). In theory, nested virtualization is not that hard. Here's a pretty straight forward guide to how to enable this: https://fedoraproject.org/wiki/How_to_enable_nested_virtualization_in_KVM The company I work for also uses this on a daily basis and it's working smooth (besides some edge-cases when using nested-nested virtualization; you won't go there). I'll try to enable this manually on my unRAID setup, but I'd love to see this feature in an upcoming version. Would make it almost perfect for me. Thanks LiPolymer Quote Link to comment
jonp Posted December 4, 2015 Share Posted December 4, 2015 So just thought I'd revive this topic since I actually tested this yesterday and boy was it easy to enable. In fact, everyone should be able to do this right now if they want. Here's how to do it in pretty much two steps from command line (SSH or telnet): NOTE: I only tested this with Intel, but it should work with AMD as well. Please make sure you have all VMs stopped (as well as VM manager) before doing this. First, from command line, type the following: modprobe -r kvm_intel Then type this: modprobe kvm_intel nested=1 DONE! Now go install another hypervisor as a VM on unRAID! If you have an AMD-based CPU and want to try this, just replace the word "intel" with "amd" in the commands above and it should work. Quote Link to comment
joelones Posted December 7, 2015 Author Share Posted December 7, 2015 Hey Jon, That's great news. I'm trying to give it a go (using AMD), issued both commands and installed Virtualbox and Genymotion. The Android VM (in windows 7 64bit) seems unable to boot with the following message: tsc: Fast TSC calibration failed Odd, counter constraints enabled but no core perfctrs detected! Failed to access perfctr msr (MSR c0010004 is 0) Quote Link to comment
jonp Posted December 7, 2015 Share Posted December 7, 2015 Hey Jon, That's great news. I'm trying to give it a go (using AMD), issued both commands and installed Virtualbox and Genymotion. The Android VM (in windows 7 64bit) seems unable to boot with the following message: tsc: Fast TSC calibration failed Odd, counter constraints enabled but no core perfctrs detected! Failed to access perfctr msr (MSR c0010004 is 0) Hmm, not sure about that error. Probably needs some googling to point to the cause. Can you create other VMs using either of those? Quote Link to comment
EnigmaCurry Posted March 3, 2016 Share Posted March 3, 2016 Thanks! This works great. This let's me use vagrant now from within my VM. To make this a permanent setting (survive reboot), go to your main page of the unraid console, click on your Flash drive, and edit the syslinux configuration. From here you can add the correct kernel boot parameter: kvm_intel.nested=1 Mine looks like: label unRAID OS menu default kernel /bzimage append initrd=/bzroot kvm_intel.nested=1 Hopefully new versions of UnRAID will include this setting out of the box. Quote Link to comment
jonp Posted March 3, 2016 Share Posted March 3, 2016 Thanks! This works great. This let's me use vagrant now from within my VM. To make this a permanent setting (survive reboot), go to your main page of the unraid console, click on your Flash drive, and edit the syslinux configuration. From here you can add the correct kernel boot parameter: kvm_intel.nested=1 Mine looks like: label unRAID OS menu default kernel /bzimage append initrd=/bzroot kvm_intel.nested=1 Hopefully new versions of UnRAID will include this setting out of the box. Yes, 6.2 will. Quote Link to comment
jonp Posted March 11, 2016 Share Posted March 11, 2016 Probably a silly question to ask but is it at all possible to install something like Virtual Box within a Windows VM. I can think of a situation where thing could come up. Just curious whether this is at all feasible. Found this: http://www.linux-kvm.org/images/3/33/02x03-NestedVirtualization.pdf This was implemented with the 6.2 public beta. Quote Link to comment
joshbgosh10592 Posted October 18, 2019 Share Posted October 18, 2019 On 3/11/2016 at 5:19 PM, jonp said: This was implemented with the 6.2 public beta. Sorry to necro this thread, but I haven't found anything else anywhere that helps. I'm trying to do exactly this on 6.7.2 with a Proxmox VM. When I try to fire up a VM on this Proxmox VM, I receive an error saying that virtualization is configured but not enabled in the BIOS. When I append kvm_intel.nested=1 to the unraid os label, Libvirt fails to start when I tell the VM manager to start back up. Quote Link to comment
jonp Posted October 18, 2019 Share Posted October 18, 2019 10 minutes ago, joshbgosh10592 said: Sorry to necro this thread, but I haven't found anything else anywhere that helps. I'm trying to do exactly this on 6.7.2 with a Proxmox VM. When I try to fire up a VM on this Proxmox VM, I receive an error saying that virtualization is configured but not enabled in the BIOS. When I append kvm_intel.nested=1 to the unraid os label, Libvirt fails to start when I tell the VM manager to start back up. Hmm, that's weird. Can you try another platform like Ubuntu or Arch and see if it works there? If it doesn't, please create a Bug Report and we'll get it addressed. Quote Link to comment
joshbgosh10592 Posted October 18, 2019 Share Posted October 18, 2019 12 minutes ago, jonp said: Hmm, that's weird. Can you try another platform like Ubuntu or Arch and see if it works there? If it doesn't, please create a Bug Report and we'll get it addressed. I'm sorry, you mean to create a new VM running Ubuntu inside unRAID and attempting to build a nested VM inside that, right? Quote Link to comment
joshbgosh10592 Posted October 18, 2019 Share Posted October 18, 2019 1 hour ago, jonp said: Hmm, that's weird. Can you try another platform like Ubuntu or Arch and see if it works there? If it doesn't, please create a Bug Report and we'll get it addressed. 1 hour ago, joshbgosh10592 said: I'm sorry, you mean to create a new VM running Ubuntu inside unRAID and attempting to build a nested VM inside that, right? If by that you did mean try Ubuntu, that fails with saying "Your CPU does NOT support KVM" Should the BIOS type matter? I'm concerned because all the Proxmox VMs use SeaBIOS, and I'm not see unRAID's Proxmox VM shows OVMF. I'd change it as a test, but it seems that you can't change it once the VM is created, and the Proxmox VM is the witness in a cluster (which means it's a PITA to reconfigure) Quote Link to comment
jonp Posted October 21, 2019 Share Posted October 21, 2019 Ok, this may very well be a bug then. I'll try to recreate it in the lab this week and if so, we'll get this sorted. Quote Link to comment
joshbgosh10592 Posted October 21, 2019 Share Posted October 21, 2019 11 minutes ago, jonp said: Ok, this may very well be a bug then. I'll try to recreate it in the lab this week and if so, we'll get this sorted. Thank you! I've submitted a bug report: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.