4.4 KiB
Creating a Windows VM in Docker
or Podman
Although WinApps supports using QEMU+KVM+libvirt
as a backend for running Windows virtual machines, it is recommended to use Docker
or Podman
. These backends automate the setup process, eliminating the need for manual configuration and optimisation of the Windows virtual machine.
Important
Running a Windows virtual machine using
Docker
orPodman
as a backend is only possible on GNU/Linux systems. This is due to the necessity of kernel interfaces, such as the KVM hypervisor, for achieving acceptable performance. The performance of the virtual machine can vary based on the version of the Linux kernel, with newer releases generally offering better performance.
Important
WinApps does NOT officially support versions of Windows prior to Windows 10. Despite this, it may be possible to achieve a successful installation with some additional experimentation. If you find a way to achieve this, please share your solution through a pull request for the benefit of other users.
Docker
Installation
You can find a guide for installing Docker Engine
here.
Setup Docker
Container
WinApps utilises docker compose
to configure Windows VMs. A suitable compose.yaml
file is included in the root directory of the WinApps repository.
Prior to initiating the installation, you can modify the RAM and number of CPU cores available to the Windows VM by changing RAM_SIZE
and CPU_CORES
within compose.yaml
.
It is also possible to specify the version of Windows you wish to install within compose.yaml
by modifying VERSION
.
Note
WinApps uses a stripped-down Windows installation by default. Although this is recommended, you can request a stock Windows installation by changing
VERSION
to one of the versions listed in the README of the original GitHub repository.
Please refer to the original GitHub repository for more information on additional configuration options.
Installing Windows
After navigating into the cloned WinApps repository, you can initiate the Windows installation using docker compose
.
docker compose up
You can then access the Windows virtual machine via a VNC connection to complete the Windows setup by navigating to http://127.0.0.1:8006 in your web browser.
Installing WinApps
Docker
simplifies the WinApps installation process by eliminating the need for any additional configuration of the Windows virtual machine. Once the Windows virtual machine is up and running, you can directly launch the WinApps installer, which should automatically detect and interface with Windows.
./installer.sh
Subsequent Use
docker compose start # Power on the Windows VM
docker compose pause # Pause the Windows VM
docker compose unpause # Resume the Windows VM
docker compose restart # Restart the Windows VM
docker compose stop # Gracefully shut down the Windows VM
docker compose kill # Force shut down the Windows VM
Note
The above
docker compose
commands must be run within the same directory containingcompose.yaml
.
Podman
Installation
- Install
Podman
using this guide. - Install
podman-compose
using this guide.
Setup Podman
Container
Please follow the docker
instructions.
Installing Windows
After navigating into the cloned WinApps repository, you can initiate the Windows installation using podman-compose
.
podman-compose up
You can then access the Windows virtual machine via a VNC connection to complete the Windows setup by navigating to http://127.0.0.1:8006 in your web browser.
Installing WinApps
Please follow the docker
instructions.
Subsequent Use
podman-compose start # Power on the Windows VM
podman-compose pause # Pause the Windows VM
podman-compose unpause # Resume the Windows VM
podman-compose restart # Restart the Windows VM
podman-compose stop # Gracefully shut down the Windows VM
podman-compose kill # Force shut down the Windows VM
Note
The above
podman-compose
commands must be run within the same directory containingcompose.yaml
.