Can I run a Virtualbox inside a Azure VM

0

I am looking to find out if the following is possible.

  • Create a VM in Azure (Windows 10), install Virtual Box and start a VM in Virtualbox
  • Create a VM in Azure (Linux), install Virtual Box and start a VM in Virtualbox

Because when I try it, the VM crashes. and I am losing connection to the VM. I have tried few options from the list here sizes of vms on Microsft page Dv3 is what I tried, its not making any difference however. I am seeing statements like the nested virtualization is not support in some places, and also seeing statements like this has changed and its now supported. appreciate if anyone can comment on this as of today jan 2020

Edit: date Jan-31-2020:

I have enabled the Hyper-V and did a vagrant up and now seeing this error

> PS C:\Users\sbolla\bionictest\.vagrant> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/bionic64' version '1.0.282' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "1580af6f-ce61-491c-8a8a-93dbc298cef4", "--type", "headless"]

Stderr: VBoxManage.exe: error: Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
PS C:\Users\sbolla\bionictest\.vagrant>
azure
virtualbox
asked on Stack Overflow Jan 29, 2020 by sbolla • edited Jan 31, 2020 by sbolla

1 Answer

0

Agreed with @Falco, you need to enable the virtualization for the VM, not only create the VM with the VM size Dv3 but also need to enable it with the script or manually use the PowerShell command. See more details about the steps that How to enable nested virtualization in an Azure VM.

answered on Stack Overflow Jan 30, 2020 by Charles Xu

User contributions licensed under CC BY-SA 3.0