-
Notifications
You must be signed in to change notification settings - Fork 288
Windows Docker Daemon on Fusion VM
Javier Romero edited this page Mar 31, 2022
·
20 revisions
Allow a MacOS workstation to run a local Docker for Windows daemon in a VMware Fusion¹ Virtual Machine that is accessible by setting DOCKER_HOST
.
- Download and Install VMware Fusion
- Use the free preview of Nautilus if possible: http://bit.ly/getnautilus
- Otherwise, if you have a Fusion license license: https://www.vmware.com/products/fusion/fusion-evaluation.html
- Choose Fusion Pro during install
- Otherwise, if you have a Fusion license license: https://www.vmware.com/products/fusion/fusion-evaluation.html
- Accept/enable all "Accessibility" helpers
- if missed, Preferences -> Security -> Click "Allow" for VMWare extension
- Use the free preview of Nautilus if possible: http://bit.ly/getnautilus
- Create a new Fusion Network Interface
- Open Fusion
- VMWare Fusion Menu -> Preferences -> Network tab -> Unlock -> + (Add Network)
- Default name is
vmnet2
- Default name is
- New network adapter:
- Enable NAT: Allow virtual machines ... (using NAT)
- Subnet IP: 192.168.2.0
- Click Apply
- Download Windows Server 2019 VHD Image
- https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2019
- VHD Image
- English, 64-bit
- Install Windows VM
- File -> Import -> Choose File -> Pick your VHD
- Customize Settings:
- General:
- Memory: 4GB or more
- CPU: 2 processors or more
- Enable hypervisor applications
- Network Adapter: use your new network adapter (ex: vmnet2)
- General:
- Start Windows VM
- Optional: Shutdown, Create Snapshot, Restart, Login
- Perform First-time VM setup
- Log-off/Restart VM if prompted by dialogs
- Install Updates (Start Menu -> Type "Updates" -> Click "Check for Updates" -> Click "Install Now")
- Enable Developer Mode (Start Menu -> Type "Dev" -> Click "Developer Settings" -> Select "Developer mode")
- Enable Remote Desktop (Administrator PowerShell)
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0 Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
- Install Docker for Windows (Administrator PowerShell)
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force Install-Package -Name docker -ProviderName DockerMsftProvider -Force Restart-Computer -Force
- Wait for restart
- Optionally, setup up as a dev vm
If you can't connect to your VM, your new Adapter (vmnet2) may be conflicting with your default adapter (vmnet8) IP address range. Your best option is to set your default network to a different IP range: https://spin.atomicobject.com/2017/04/03/vmware-fusion-custom-virtual-networks/
¹ Fusion is used for its VT-x (nested hypervisor) support, which is required to run Docker for Windows. There appears to be no open-source hypervisor for MacOS currently with this feature.