Installing Local on a Virtual Machine

Hello!

I’m trying to create a development environment on a Windows 7 virtual machine (using VirtualBox) on a Mac. It is my first time trying to install Local and I didn’t know it used a virtual machine to provide its services.
During installation i received an error and the installation got stuck; I’m now trying again but before I waste more time, do you know if Local could work inside a virtual machine or should I just give up?

Here is the installation log:

May 16, 2018, 10:36 AM GMT+2 - info: [main/index] Existing Pressmatic data does not exist.
May 16, 2018, 10:36 AM GMT+2 - info: [main/check-system] Check System: Docker Machine:  
{ stdout: '',
  stderr: 'Host does not exist: "local-by-flywheel"\n' }
May 16, 2018, 10:36 AM GMT+2 - info: [renderer/CheckEnvPage] Check system promise response: 
[ 'virtualbox-not-ready', 'machine-does-not-exist' ]
May 16, 2018, 10:37 AM GMT+2 - info: [main/virtualbox-installer-windows] Starting VirtualBox Install...
May 16, 2018, 10:41 AM GMT+2 - info: [main/virtualbox-installer-windows] VirtualBox installed!
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Starting Docker Machine Creation...
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] USING IP:  192.168.95.1/24
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Removing existing Docker Machine
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] null 'About to remove local-by-flywheel\nWARNING: This action will delete both local reference and remote instance.\n' 'Error removing host "local-by-flywheel": Host does not exist: "local-by-flywheel"\nCan\'t remove "local-by-flywheel"\n'
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Creating Docker Machine... --virtualbox-boot2docker-url=file://C:\Users\Daniel\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\boot2docker.iso
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Creating machine with  
[ 'create',
  '--driver=virtualbox',
  '--virtualbox-hostonly-cidr',
  '192.168.95.1/24',
  '--virtualbox-boot2docker-url=file://C:/Users/Kiavik/AppData/Local/Programs/local-by-flywheel/resources/extraResources/virtual-machine/vendor/docker/boot2docker.iso',
  '--virtualbox-disk-size',
  '120000',
  'local-by-flywheel' ]
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Creating CA: C:\Users\Kiavik\.docker\machine\certs\ca.pem
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Creating client certificate: C:\Users\Kiavik\.docker\machine\certs\cert.pem
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Running pre-create checks...
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] (local-by-flywheel) Image cache directory does not exist, creating it at C:\Users\Kiavik\.docker\machine\cache...
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] Creating machine...
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] (local-by-flywheel) Downloading C:\Users\Daniel\.docker\machine\cache\boot2docker.iso from file://C:/Users/Kiavik/AppData/Local/Programs/local-by-flywheel/resources/extraResources/virtual-machine/vendor/docker/boot2docker.iso...
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] (local-by-flywheel) Creating VirtualBox VM...
May 16, 2018, 10:41 AM GMT+2 - info: [main/docker-create-machine] (local-by-flywheel) Creating SSH key...
May 16, 2018, 10:43 AM GMT+2 - info: [main/docker-create-machine] Wrapper Docker Machine process exiting due to closed plugin server (read tcp 127.0.0.1:49199->127.0.0.1:49198: wsarecv: Connessione in corso interrotta forzatamente dall'host remoto.)
May 16, 2018, 10:43 AM GMT+2 - error: [main/docker-create-machine] Error creating machine: Error in driver during machine creation: read tcp 127.0.0.1:49199->127.0.0.1:49198: wsarecv: Connessione in corso interrotta forzatamente dall'host remoto.

Thanks

Hi Kiavik,

Good question! Nested virtualization can be tricky but Local will work in virtualized as long as nested virtualization is enabled. I have had the best luck with Parallels Pro and VMWare Fusion.

Considering it’s a network issue in the log file, you may try changing the network settings for the VM in VirtualBox. Maybe try using the bridged adapter or a host-only adapter.