Sign inSign up

msjpq/kvm-windows

By msjpq

Updated over 4 years ago

Image
10

7.5K

msjpq/kvm-windows repository overview

Much better project here

https://github.com/ms-jpq/windows-in-docker

preview.img


The thingy below is depreciated


Almost done, Work in Progress

WIND - Windows in Docker

Browser > Docker > KVM > Windows

Thank you Redhat, very legal & very cool.

WHY?

QEMU + KVM has a relatively involved setup, not very user friendly.

This image is vastly more user friendly, it comes with:

  1. Browser UI

  2. Networking out of the box

  3. Literally copy paste install

  4. Built-in Windows drivers

  5. Crazy easy customizations, ie. --cpus=9 --memory=6024 --size=120

Preview

preview1 img

preview2 img

Instructions

Prerequisites

You hardware must be able to run KVM. (Most computer can run at least 1 layer of virtualization now days.)

Install

Run the command below, and head to Firefox at port 8080 to finish installation

docker -it --rm \
  --privileged \
  -v /lib/modules:/lib/modules:ro \
  -p 8080:65080 \
  -v /vm_image_dir:/config \
  -v /iso_dir:/install \
  msjpq/kvm-windows new <windows.iso> --bios

Add --bios, if your windows version is old, or else it will load UEFI

<windows.iso> will eject after first poweroff, you will find the generated libvirt manifest under /config.

Run the command below to finish installation, and for future usage.

docker -it --rm \
  --privileged \
  -v /lib/modules:/lib/modules:ro \
  -p 8080:65080 \
  -v /vm_image_dir:/config \
  msjpq/kvm-windows
Drivers

You will need to manually install some of drivers, (VirtIO is annoying like that).

Essential
  1. The harddrive drivers will need to be installed before first reboot.

  2. The ethernet drivers will need to be installed after first login under Device Manager.

Whatever

Things like qxl can also be installed under Device Manager. Not really important though.

All drivers are included with the default install, under D:/ or E:/ drive.

Customization

Additional flags to pass onto new <image name> <flag> <flag> ...

FlagDefaultOption
--biosFalseBoot bios instead of uefi
-oswin10Windows distro
--cpus#coresNumber of virtual cpus
--memory4000(MB)
--vram256(MB)
--size100(GB)
--dry-runFalseDry run
--extraNoneExtra args for virt-install
Networking

All ports from VM are forwarded to container except:

53, 67-68, 65001-65535

NOT recommended to run with --net=host.

Environmental Variables
Browser UI
  • -e PATH_PREFIX=/
  • -e VNC_RESIZE=scale|off
  • -e RECON_DELAY=250 reconnection delay (ms)
Virtualization

Libvirt look for VM_NAME.xml to boot.

new will create VM_NAME.xml and VM_NAME.img.

  • -e VM_NAME=wind
Ports
  • -p 8080:65080 noVNC web UI

  • -p 5900:65059 VNC

Volumes

Libvirt manifests are stored in/config, along with VM images.

  • -v ./vm_data/:/config

You need to supply your own windows.iso, for obvious reasons.

  • -v ./install_media/:/install
Disclaimer

Works on my machine ™.

Tag summary

Content type

Image

Digest

Size

339.8 MB

Last updated

over 4 years ago

docker pull msjpq/kvm-windows