VirtualBox
Installation
VirtualBox releases updates every couple of years so it's best to rely on the official documentation on how to install VirtualBox.
For more information, please see Download VirtualBox
Mounting a Fileshare to VMs
Steps:
-
Open VirtualBox and select the VM in the VirtualBox Manager.
-
Go to Settings > Shared Folders > Click the `+' to add a folder.
-
Specify the folder path, foldername, and mount point.
-
Click OK > OK
-
Check if you can find it listed using this command:
sudo VBoxControl sharedfolder list
Output:
Oracle VM VirtualBox Guest Additions Command Line Management Interface Version 5.2.42_Ubuntu
(C) 2008-2020 Oracle Corporation
All rights reserved.
Shared Folder mappings (2):
01 - vagrant
02 - fileshare -
If so, create directory and mount.
mkdir /mnt/fileshare
mount -t vboxsf fileshare /mnt/fileshare -
If step 4 did not returned the shared folders, you can install
virtualbox-guest-dkms
.sudo apt-get install -y virtualbox-guest-dkms
sudo usermod -aG vboxsf $(whoami)
sudo VBoxControl guestproperty \
set /VirtualBox/GuestAdd/SharedFolders/MountDir /add/your/fileshare/here -
Restart VM then check if you have any vb folders mounted.
mount | grep vboxsf
Output:
/vagrant on /vagrant type vboxsf (rw,nodev,relatime,_netdev)
fileshare on /mnt/fileshare type vboxsf (rw,nodev,relatime)
fileshare on /mnt/fileshare type vboxsf (rw,nodev,relatime)
fileshare on /mnt/fileshare type vboxsf (rw,nodev,relatime) -
If so, change ownership of
/add/your/fileshare/here
to yourself.sudo chown $(whoami):$(whoami) /add/your/fileshare/here
VirtualBox conflicts with WSL
Reference: How to get VirtualBox 6.0 and WSL working at the same time [closed]
To run off hypervisor:
-
Go to Control Panel > Programs and Features
-
Click Turn Windows features on or off
-
Uncheck the following features:
- Containers
- Hyper-V
-
Check the following features:
- Virtual Machine Platform
- Windows Hypervisor Platform
- Windows Sandbox
-
Open Powershell with elevated privileges (Run as Administrator) then run:
bcdedit /set hypervisorlaunchtype off
-
Restart the Computer.
To enable WSL again and disable virtualbox:
-
Run in Powershell:
bcdedit /set hypervisorlaunchtype auto
-
Restart the Computer.