#
Virtual machine creation
While any other VM software could be used, we're using VirtualBox because it allows us to do port forwarding through its NAT network, but for this to work automatically, we need VirtualBox's Guest Additions installed. It's also pretty fast, and easy to use. In theory, the same concept could work with QEMU, or VMWare, if you're brave enough.
#
Preparation
Symlinks
If you need symlinks (i.e. running git
, npm
, yarn
, etc. In a shared folder, or any app that creates or uses them) then you need to follow these instructions after installing VirtualBox, otherwise you're going to get permission errors when accessing or creating symlinks. And yes, this works with shared folders in NTFS drives.
If you don't think you'll need symlinks, you can skip this part.
You need to set these apps to run as administrator. They're usually located in C:\Program Files\Oracle\VirtualBox
- VirtualBoxVM.exe
- VirtualBox.exe
- VBoxSVC.exe
To do this, just follow these steps on each file:
- Right click
- Properties
- Compatibility (tab)
- Run this program as administrator
- OK
#
Creating the VM
Open VirtualBox and attempt to create a new VM. When prompted, follow these instructions:
Once it's done, you can look for the .vbox
file created by Virtual Box (usually in %USERPROFILE\VirtualBox VMs
) and move the .vdi
and the .vbox
files to another location if you so desire. Make sure to re-add the VDI in the VM's Storage section in case it throws errors. As of VirtualBox 6.1, I didn't have to do anything extra when doing this.