Coder Social home page Coder Social logo

dockur / windows Goto Github PK

View Code? Open in Web Editor NEW
15.5K 99.0 1.3K 718 KB

Windows inside a Docker container.

License: MIT License

Dockerfile 0.58% Shell 99.42%
docker docker-container windows windows-virtual-machines windows-virtual-desktop windows-virtual-machine windows-vm virtualization

windows's Introduction

Windows

Build Version Size Package Pulls

Windows inside a Docker container.

Features โœจ

  • Multi-language
  • ISO downloader
  • KVM acceleration
  • Web-based viewer

Video ๐Ÿ“บ

Youtube

Usage ๐Ÿณ

Via Docker Compose:

services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "win11"
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m

Via Docker CLI:

docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows

Via Kubernetes:

kubectl apply -f kubernetes.yml

FAQ ๐Ÿ’ฌ

How do I use it?

Very simple! These are the steps:

  • Start the container and connect to port 8006 using your web browser.

  • Sit back and relax while the magic happens, the whole installation will be performed fully automatic.

  • Once you see the desktop, your Windows installation is ready for use.

Enjoy your brand new machine, and don't forget to star this repo!

How do I select the Windows version?

By default, Windows 11 will be installed. But you can add the VERSION environment variable to your compose file, in order to specify an alternative Windows version to be downloaded:

environment:
  VERSION: "win11"

Select from the values below:

Value Version Size
win11 Windows 11 Pro 6.4 GB
win11e Windows 11 Enterprise 5.8 GB
win10 Windows 10 Pro 5.7 GB
ltsc10 Windows 10 LTSC 4.6 GB
win10e Windows 10 Enterprise 5.2 GB
win8 Windows 8.1 Pro 4.0 GB
win8e Windows 8.1 Enterprise 3.7 GB
win7 Windows 7 Enterprise 3.0 GB
vista Windows Vista Enterprise 3.0 GB
winxp Windows XP Professional 0.6 GB
2022 Windows Server 2022 4.7 GB
2019 Windows Server 2019 5.3 GB
2016 Windows Server 2016 6.5 GB
2012 Windows Server 2012 4.3 GB
2008 Windows Server 2008 3.0 GB
core11 Tiny 11 Core 2.1 GB
tiny11 Tiny 11 3.8 GB
tiny10 Tiny 10 3.6 GB

Tip

To install ARM64 versions of Windows use dockur/windows-arm.

How do I select the Windows language?

By default, the English version of Windows will be downloaded. But you can add the LANGUAGE environment variable to your compose file, in order to specify an alternative language:

environment:
  LANGUAGE: "French"

You can choose between: ๐Ÿ‡ฆ๐Ÿ‡ช Arabic, ๐Ÿ‡ง๐Ÿ‡ฌ Bulgarian, ๐Ÿ‡จ๐Ÿ‡ณ Chinese, ๐Ÿ‡ญ๐Ÿ‡ท Croatian, ๐Ÿ‡จ๐Ÿ‡ฟ Czech, ๐Ÿ‡ฉ๐Ÿ‡ฐ Danish, ๐Ÿ‡ณ๐Ÿ‡ฑ Dutch, ๐Ÿ‡ฌ๐Ÿ‡ง English, ๐Ÿ‡ช๐Ÿ‡ช Estionian, ๐Ÿ‡ซ๐Ÿ‡ฎ Finnish, ๐Ÿ‡ซ๐Ÿ‡ท French, ๐Ÿ‡ฉ๐Ÿ‡ช German, ๐Ÿ‡ฌ๐Ÿ‡ท Greek, ๐Ÿ‡ฎ๐Ÿ‡ฑ Hebrew, ๐Ÿ‡ญ๐Ÿ‡บ Hungarian, ๐Ÿ‡ฎ๐Ÿ‡น Italian, ๐Ÿ‡ฏ๐Ÿ‡ต Japanese, ๐Ÿ‡ฐ๐Ÿ‡ท Korean, ๐Ÿ‡ฑ๐Ÿ‡ป Latvian, ๐Ÿ‡ฑ๐Ÿ‡น Lithuanian, ๐Ÿ‡ณ๐Ÿ‡ด Norwegian, ๐Ÿ‡ต๐Ÿ‡ฑ Polish, ๐Ÿ‡ต๐Ÿ‡น Portuguese, ๐Ÿ‡ท๐Ÿ‡ด Romanian, ๐Ÿ‡ท๐Ÿ‡บ Russian, ๐Ÿ‡ท๐Ÿ‡ธ Serbian, ๐Ÿ‡ธ๐Ÿ‡ฐ Slovak, ๐Ÿ‡ธ๐Ÿ‡ฎ Slovenian, ๐Ÿ‡ช๐Ÿ‡ธ Spanish, ๐Ÿ‡ธ๐Ÿ‡ช Swedish, ๐Ÿ‡น๐Ÿ‡ญ Thai, ๐Ÿ‡น๐Ÿ‡ท Turkish and ๐Ÿ‡บ๐Ÿ‡ฆ Ukrainian.

How do I select the keyboard layout?

If you want to use a keyboard layout or locale that is not the default for your selected language, you can add the KEYBOARD and REGION variables with a culture code, like this:

environment:
  REGION: "en-US"
  KEYBOARD: "en-US"

Note

Changing these values will have no effect after the installation has been performed already. Use the control panel inside Windows in that case.

How do I change the storage location?

To change the storage location, include the following bind mount in your compose file:

volumes:
  - /var/win:/storage

Replace the example path /var/win with the desired storage folder.

How do I change the size of the disk?

To expand the default size of 64 GB, add the DISK_SIZE setting to your compose file and set it to your preferred capacity:

environment:
  DISK_SIZE: "256G"

Tip

This can also be used to resize the existing disk to a larger capacity without any data loss.

How do I share files with the host?

Open 'File Explorer' and click on the 'Network' section, you will see a computer called host.lan. Double-click it and it will show a folder called Data, which can be binded to any folder on your host via the compose file:

volumes:
  -  /home/user/example:/shared

The example folder /home/user/example will be available as \\host.lan\Data.

Tip

You can map this path to a drive letter in Windows, for easier access.

How do I install a custom image?

In order to download an unsupported ISO image that is not selectable from the list above, specify the URL of that ISO in the VERSION environment variable, for example:

environment:
  VERSION: "https://example.com/win.iso"

Alternatively, you can also skip the download and use a local file instead, by binding it in your compose file in this way:

volumes:
  - /home/user/example.iso:/custom.iso

Replace the example path /home/user/example.iso with the filename of your desired ISO file, the value of VERSION will be ignored in this case.

How do I run a script after installation?

To run your own script after installation, you can create a file called install.bat and place it in a folder together with any additional files it needs (software to be installed for example). Then bind that folder in your compose file like this:

volumes:
  -  /home/user/example:/oem

The example folder /home/user/example will be copied to C:\OEM during installation and the containing install.bat will be executed during the last step.

How do I perform a manual installation?

It's best to stick to the automatic installation, as it adjusts various settings to prevent common issues when running Windows inside a virtual environment.

However, if you insist on performing the installation manually, add the following environment variable to your compose file:

environment:
  MANUAL: "Y"

How do I change the amount of CPU or RAM?

By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.

If you want to adjust this, you can specify the desired amount using the following environment variables:

environment:
  RAM_SIZE: "8G"
  CPU_CORES: "4"

How do I configure the username and password?

By default, a user called Docker is created during the installation, with an empty password.

If you want to use different credentials, you can change them in your compose file:

environment:
  USERNAME: "bill"
  PASSWORD: "gates"

How do I connect using RDP?

The web-viewer is mainly meant to be used during installation, as its picture quality is low, and it has no audio or clipboard for example.

So for a better experience you can connect using any Microsoft Remote Desktop client to the IP of the container, using the username Docker and by leaving the password empty.

There is a RDP client for Android available from the Play Store and one for iOS in the Apple Store. For Linux you can use FreeRDP and on Windows just type mstsc in the search box.

How do I assign an individual IP address to the container?

By default, the container uses bridge networking, which shares the IP address with the host.

If you want to assign an individual IP address to the container, you can create a macvlan network as follows:

docker network create -d macvlan \
    --subnet=192.168.0.0/24 \
    --gateway=192.168.0.1 \
    --ip-range=192.168.0.100/28 \
    -o parent=eth0 vlan

Be sure to modify these values to match your local subnet.

Once you have created the network, change your compose file to look as follows:

services:
  windows:
    container_name: windows
    ..<snip>..
    networks:
      vlan:
        ipv4_address: 192.168.0.100

networks:
  vlan:
    external: true

An added benefit of this approach is that you won't have to perform any port mapping anymore, since all ports will be exposed by default.

Important

This IP address won't be accessible from the Docker host due to the design of macvlan, which doesn't permit communication between the two. If this is a concern, you need to create a second macvlan as a workaround.

How can Windows acquire an IP address from my router?

After configuring the container for macvlan, it is possible for Windows to become part of your home network by requesting an IP from your router, just like a real PC.

To enable this mode, add the following lines to your compose file:

environment:
  DHCP: "Y"
devices:
  - /dev/vhost-net
device_cgroup_rules:
  - 'c *:* rwm'

Note

In this mode, the container and Windows will each have their own separate IPs.

How do I add multiple disks?

To create additional disks, modify your compose file like this:

environment:
  DISK2_SIZE: "32G"
  DISK3_SIZE: "64G"
volumes:
  - /home/example:/storage2
  - /mnt/data/example:/storage3

How do I pass-through a disk?

It is possible to pass-through disk devices directly by adding them to your compose file in this way:

devices:
  - /dev/sdb:/disk1
  - /dev/sdc:/disk2

Use /disk1 if you want it to become your main drive, and use /disk2 and higher to add them as secondary drives.

How do I pass-through a USB device?

To pass-through a USB device, first lookup its vendor and product id via the lsusb command, then add them to your compose file like this:

environment:
  ARGUMENTS: "-device usb-host,vendorid=0x1234,productid=0x1234"
devices:
  - /dev/bus/usb

Important

If the device is a USB disk drive, please wait until after the installation is completed before connecting it. Otherwise the installation may fail, as the order of the disks can get rearranged.

How do I verify if my system supports KVM?

To verify that your system supports KVM, run the following commands:

sudo apt install cpu-checker
sudo kvm-ok

If you receive an error from kvm-ok indicating that KVM acceleration can't be used, please check whether:

  • the virtualization extensions (Intel VT-x or AMD SVM) are enabled in your BIOS.

  • you are running an operating system that supports them, like Linux or Windows 11 (macOS and Windows 10 do not unfortunately).

  • you enabled "nested virtualization" if you are running the container inside a virtual machine.

  • you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.

If you didn't receive any error from kvm-ok at all, but the container still complains that /dev/kvm is missing, it might help to add privileged: true to your compose file (or --privileged to your run command), to rule out any permission issue.

How do I run macOS in a container?

You can use dockur/macos for that. It shares many of the same features, except for the automatic installation.

Is this project legal?

Yes, this project contains only open-source code and does not distribute any copyrighted material. Any product keys found in the code are just generic placeholders provided by Microsoft for trial purposes. So under all applicable laws, this project will be considered legal.

Stars ๐ŸŒŸ

Stars

Disclaimer โš–๏ธ

The product names, logos, brands, and other trademarks referred to within this project are the property of their respective trademark holders. This project is not affiliated, sponsored, or endorsed by Microsoft Corporation.

windows's People

Contributors

alexeadem avatar arisudesu avatar asafhad avatar eltociear avatar hellodword avatar ipitio avatar kroese avatar lly-c232733 avatar luisgmuniz avatar qclaogui avatar renovate[bot] avatar wangwei10061 avatar wshaper avatar xsy420 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windows's Issues

help

root โžœ ~ $ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
Unable to find image 'dockurr/windows:latest' locally
latest: Pulling from dockurr/windows
ff4a91bb72ce: Pull complete
6193bca6ebd8: Pull complete
10c5d462b1f1: Pull complete
b53390f31a55: Pull complete
cea458e59c9a: Pull complete
70fb2f730bd9: Pull complete
BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
KVM: entry failed, hardware error 0xffffffff
EAX=00000000 EBX=c0484638 ECX=000000b2 EDX=000000b2
ESI=00000000 EDI=0000007a EBP=c04845a0 ESP=c0484578
EIP=00008000 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=1 HLT=0
ES =0000 00000000 ffffffff 00809300
CS =c100 7ffc1000 ffffffff 00809300
SS =0000 00000000 ffffffff 00809300
DS =0000 00000000 ffffffff 00809300
FS =0000 00000000 ffffffff 00809300
GS =0000 00000000 ffffffff 00809300
LDT=0000 00000000 00000000 00000000
TR =0040 1bc8e000 00000067 00008b00
GDT= 1bc8ffb0 00000057
IDT= 00000000 00000000
CR0=00050032 CR2=36a517f8 CR3=411a0000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=qemu-system-x86_64: hw/core/cpu-sysemu.c:76: cpu_asidx_from_attrs: Assertion `ret < cpu->num_ases && ret >= 0' failed.
โฏ ERROR: Forcefully terminating Windows, reason: 0...
โฏ Shutdown completed!

how to use local iso file ?

I cannot download the ISO file online due to unstable network
Is there any way to directly use the downloaded iso?

Error on Extract ESD

root@Lost:/home/lost# docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
โฏ Starting Windows for Docker v2.03...
โฏ For support visit https://github.com/dockur/windows

โฏ Downloading Windows 11...
[i] Downloading Windows media from official Microsoft servers...
[i] Downloading Windows 11...
[!] Microsoft blocked the automated download request based on your IP address. Please check the FAQ on how to boot from a local file and manually download this ISO in a web browser here: https://www.microsoft.com/en-us/software-download/windows11

[!] 1 attempted download(s) failed! Please re-run Mido with these arguments to try downloading again (any partial downloads will be resumed): win11x64
[+] Finished! Please see the above errors with information
โฏ Failed to download Windows 11 using Mido, will try a different method now...
โฏ Downloading product information from Microsoft...
โฏ Downloading Windows 11...
/storage/tmp/win11x64.esd 100%[=================================================================>] 4.54G 10.6MB/s in 6m 34s
โฏ Extracting Windows 11 bootdisk...
โฏ Extracting Windows 11 environment...
โฏ Extracting Windows 11 setup...
โฏ Extracting Windows 11 image...
install.sh: line 482: 3353 Killed wimlib-imagex export "${iso}" ${imageIndex} "${installWimFile}" --compress=LZMS --chunk-size 128K --quiet
โฏ ERROR: Addition of 9 to the image failed
โฏ ERROR: Failed to extract ESD file!
root@Lost:/home/lost#

GPU Passthrough

Hey, would like to know if this container is capable of passing through a gpu to the vm inside the container. I have looked into the upstream docker container qemus/qemu-docker, which seems to have some logic to work with gpu passthrough, though some documentation for this here would be great, if it is possible.

I also tried to connect to the container using virtual machine manager, but unfortunately i wasnt able to connect to it. Any idea why?

Invalid Windows media specified: "win10"

If I set version to win10, the container won't start. Exact error text is below and repeats with each retry.

โฏ Starting Windows for Docker v1.11...
โฏ For support visit https://github.com/dockur/windows

[!] Invalid Windows media specified: "win10"
โฏ ERROR: Status 1 while: /run/mido.sh "$VERSION" (line 138/11)

Qnap - Container Station

Hi

I'm having problems installing on Qnap in Container Station
Qnap TS-855X

container-logs

โฏ Downloading Windows XP...
/storage/tmp/en_win 100%[===================>] 589.14M 18.8MB/s in 32s
โฏ Extracting downloaded ISO image...
โฏ Building Windows XP image...
โฏ Creating a 64G growable disk image in raw format...
Warning: Extension CHECKSUM revision 0 not supported, missing kernel module?
iptables: No chain/target/match by that name.
โฏ Booting Windows using QEMU emulator version 8.2.0 ...
โฏ ERROR: qemu-system-x86_64: eVMCS version range [1..1] is not supported by kernel (supported: [0..0])
qemu-system-x86_64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Operation not supported
โฏ Starting Windows for Docker v1.20...
โฏ For support visit https://github.com/dockur/windows

pls help
br Pawel

failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found

docker-compose.yaml

version: "3.9"

services:
  win10:
    image: dockurr/windows:1.09
    hostname: win10
    container_name: win10-dev
    stop_grace_period: 2m
    restart: unless-stopped
    environment:
      VERSION: "https://example.com/win10.iso"
      #VERSION: "win10"
      RAM_SIZE: "8G"
      CPU_CORES: "4"
      DISK_SIZE: "100G"
      MANUAL: "Y"
      TZ: Asia/Shanghai
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - "8006:8006"
      - "3389:3389/tcp"
      - "3389:3389/udp"
    volumes:
      - ./_docker-data/w10/storage:/storage

error log

[+] Running 1/1
 โœ” Container win10-dev  Started                                                                                                                                                                                                                                                                                     0.0s
win10-dev  | โฏ Starting Windows for Docker v1.09...
win10-dev  | โฏ For support visit https://github.com/dockur/windows
win10-dev  |
win10-dev  | โฏ Creating a growable disk image in raw format with a size of 100G...
win10-dev  | โฏ Booting Windows using QEMU emulator version 8.1.2 ...
win10-dev  |
BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found
win10-dev  | BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
win10-dev  | BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
win10-dev  |
Press any key to boot from CD or DVD......




BdsDxe: failed to start Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0): Time out
win10-dev  | BdsDxe: loading Boot0003 "EFI Internal Shell" from Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
win10-dev  | BdsDxe: starting Boot0003 "EFI Internal Shell" from Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
win10-dev  |
UEFI Interactive Shell v2.2
win10-dev  | EDK II
win10-dev  | UEFI v2.70 (Debian distribution of EDK II, 0x00010000)
win10-dev  | Mapping table
win10-dev  |       FS0: Alias(s):CD0a0b:;BLK2:
win10-dev  |           PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)/CDROM(0x1)
win10-dev  |       FS1: Alias(s):F0a0:;BLK3:
win10-dev  |           PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)/VenMedia(C5BD4D42-1A76-4996-8956-73CDA326CD0A)
win10-dev  |      BLK4: Alias(s):
win10-dev  |           PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0)
win10-dev  |      BLK0: Alias(s):
win10-dev  |           PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)
win10-dev  |      BLK1: Alias(s):
win10-dev  |           PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0)/CDROM(0x0)
Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
^Ccanceled

file tree

# tree
.
โ”œโ”€โ”€ docker-compose.yaml
โ””โ”€โ”€ _docker-data
    โ””โ”€โ”€ w10
        โ””โ”€โ”€ storage
            โ”œโ”€โ”€ data.img
            โ”œโ”€โ”€ win10.iso
            โ”œโ”€โ”€ windows.rom
            โ””โ”€โ”€ windows.vars

my serverhost is ubuntu20, and windows iso is from https://windowsxlite.com/Optimum10ProV2/

Windows X-Lite (19045.3758) 'Optimum 10 Pro' by FBConan

How to edit the Preparing website

Hello, I'd like to edit the Preparing (where the ISO is downloaded, extracted, etc..) site. I tried digging in the code but I haven't found anything. I found a html command, but I wasn't able to locate it. Where is the source of that?

KVM Acceleration not working

When installing Windows 11 I get
windows | ๏ฟฝ[1;34mโฏ ๏ฟฝ[1;36mBuilding Windows 11 image...๏ฟฝ[0m
windows | ๏ฟฝ[1;34mโฏ ๏ฟฝ[1;36mCreating a 64G growable disk image in raw format...๏ฟฝ[0m
windows | ๏ฟฝ[1;31mโฏ ERROR: KVM acceleration not detected (device file missing), this will cause a major loss of performance.๏ฟฝ[0m
windows | ๏ฟฝ[1;31mโฏ ERROR: See the FAQ on how to enable it, or continue without KVM by setting KVM=N (not recommended).๏ฟฝ[0m

But when I followed the FAQ and did

sudo apt install cpu-checker
sudo kvm-ok

It says

kam@debian:~$ sudo apt install cpu-checker
sudo kvm-ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cpu-checker is already the newest version (0.7-1.3+b1).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
INFO: /dev/kvm exists
KVM acceleration can be used

What do I do?

Windows VNC points to the other VM

Thank you for your work. I encountered an issue when I attempted to install custom.iso. Initially, it ran smoothly, but when I tried to access the installation, the screen displayed another VM from my host. I am using UNRAID as both a Docker and VM host.

ip banned?

windows | โฏ Starting Windows for Docker v1.18...
windows | โฏ For support visit https://github.com/dockur/windows
windows |
windows | ๏ฟฝ[1;34mโฏ ๏ฟฝ[1;36mDownloading Windows 11...๏ฟฝ[0m
windows | [i] Downloading Windows media from official Microsoft servers...
windows | [i] Downloading Windows 11...
windows | [!] Microsoft blocked the automated download request based on your IP address. Please manually download this ISO in a web browser here: https://www.microsoft.com/en-us/software-download/windows11
windows |
windows | [!] 1 attempted download(s) failed! Please re-run Mido with these arguments to try downloading again (any partial downloads will be resumed): win11x64
windows | [+] Finished! Please see the above errors with information
windows | ๏ฟฝ[1;31mโฏ ERROR: Failed to download win11x64๏ฟฝ[0m
windows | โฏ Starting Windows for Docker v1.18...
windows | โฏ For support visit https://github.com/dockur/windows

Windows could not create partition on disk 0

When I start the container after downloading the iso, I get this error:

BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found

Installation fails with "Windows could not create a Partition".

Any solution for this? Thanks

Unraid Custom ISO

Please pardon my inability to get this working. I am doing my best but I know I am probably being dumb or over looking something.

I am trying to use a custom.iso (Windows LTSC 2021) I made a new share on my Unraid machine and placed the ISO there which is mapped accordingly /storage --> /mnt/disk1/docker-virtuals/WindowsinDocker/

Do I still specify the version here?
image

I also added the environment variable.
image

It seems to be still downloading Windows 10 Pro and installing that and not using my custom.iso
Again, my apologies I definitely feel like I am missing something or a step.

Thank you :)

Opening ports

How would one go about making a service running on a certain port in the windows vm accessible to the host/network without going down the macvlan route?

Passthrough USB Device

Hi there, I want to be able to passthrough my USB devices like you can in a VM, in particular my iCue Link Hub.

How exactly do I do this?

image

Thankyou in advance!
Erin

Windows could not apply unattend settings during pass (offlineServicing)

Issue description:

During the installation of Windows, the setup was canceled and an error message was displayed stating: "Windows could not apply unattended settings during pass [offlineServicing]."

Steps to reproduce:

  1. Start Windows installation setup.
  2. Proceed to the stage where Windows applies unattended settings during the offlineServicing pass.
  3. The error message appears, and the installation is canceled.

Expected behavior:

The installation should proceed without any errors during the offlineServicing pass.

Actual behavior:

An error message appears, and the installation process is halted.

Screenshots:

image

Possible Solution:

This was during a Windows 11 install without TPM. Possible solutions may involve installing on another machine with TPM.

about network

Can I bridge the host network machine in the virtual machine?
For example my host machine 192.168.1.12, my virtual machine 192.168.1.xx

nothing appears

maim-region-20240203-204855

After running the file, nothing display

OS: Arch Linux x86_64
Kernel: 6.6.1-arch1-1
DE: qtile
WM: LG3D

How do you access host data?

I want to access data on my shares. How can I do this?

Passing the path through doesn't seem to work. And I can seem to seem to discover anything under network either.

Network is on Bridge.

Which xml files?

Which unattend.xml files do you use for the following:
Tiny 10
Tiny 11
Tiny 11 Core
Windows XP SP3

Thanx!

Kevin

Feature Request: VLAN Tagging

I don't know much much work it would be to implement... but for our use case for spinning up throw away lab environments, being able to add a VLAN tag would be really useful.

Support for macOS

Is there a way to run this on MacOS ?

When Starting I get following error:
Cannot start Docker Compose application. Reason: compose [start] exit status 1. Container windows Starting Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory

I know that KVM is not available under macOS but is there a alternative to use Qemu instead ?

Thanks in advance

Feature request: run VNC on a URL subpath

First of all, this is an awesome project! I've been looking for something similar for years now.

In a scenario with multiple deployments, it would be nice if we could customize the path of the VNC's URL.

For example, an PATH=foo would make the service to be accessible at http://localhost:8006/foo.

Remote Connections

Thanks for this docker, everything works as expected, except I am having an issue trying to use Windows RDP to remote into the VM. The default ip address assigned is on 20.20.20.xxx network, I tried changing it via the network adapter but then it wouldn't connect to the internet. I have it set up as Bridge connection currently, I thought that might have defaulted it to the 192.168.xxx network.

Docker not starting

I have two Unraid systems and one is running WindowsinDocker with no issues. However on my other Unraid system I have installed WindowsinDocker but the docker will not start.

In looking at the logs I am confused as it implies a network issue but no other docker or VMs have any network problems. I have removed the docker and reinstalled but still the same problem. I have been trying over the past 4 days and I get the same message each time.

Docker log attached
`[i] Downloading Windows media from official Microsoft servers...
[i] Downloading Windows 11...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 135k 0 135k 0 0 120k 0 --:--:-- 0:00:01 --:--:-- 120k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to vlscppe.microsoft.com port 443 after 0 ms: Couldn't connect to server
[!] Failed to contact Microsoft servers! Is there an Internet connection or is the server down?

[!] 1 attempted download(s) failed! Please re-run Mido with these arguments to try downloading again (any partial downloads will be resumed): win11x64
[+] Finished! Please see the above errors with information
โฏ ERROR: Status 3 while: bash "$SCRIPT" "$VERSION" (line 94/13)
[i] Downloading Windows media from official Microsoft servers...
[i] Downloading Windows 11...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 135k 0 135k 0 0 83006 0 --:--:-- 0:00:01 --:--:-- 83041
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to vlscppe.microsoft.com port 443 after 0 ms: Couldn't connect to server
[!] Failed to contact Microsoft servers! Is there an Internet connection or is the server down?

[!] 1 attempted download(s) failed! Please re-run Mido with these arguments to try downloading again (any partial downloads will be resumed): win11x64
[+] Finished! Please see the above errors with information
โฏ ERROR: Status 3 while: bash "$SCRIPT" "$VERSION" (line 94/13)
โฏ Starting Windows for Docker v1.07...
โฏ For support visit https://github.com/dockur/windows

โฏ Starting Windows for Docker v1.07...
โฏ For support visit https://github.com/dockur/windows

** Press ANY KEY to close this window ** `

Where should i put custom.iso ?

Where should i put custom.iso ? "/storage" ( root ) , /home/(user)/storage or /root/storage or others. I tried to put the file in root , but it still start to download iso file.

RDP Authentication error

When attempting to connect to the virtual machine using microsoft remote desktop connection, i get an authentication error, i have tried using winxp, vista, win7, ltsc10, win11 as guests and they all give the same error, the container is running on my arch server and the machine i am using to connect is running Windows 10 LTSC 2021 (despite the theming), is there some sort of configuration i am missing on my windows machine or is this an issue with the container?
Remote Desktop Connection_b1
here is my current docker compose:

version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    volumes:
      - ${VOLUMES_PATH}/windows/storage:/storage
    stop_grace_period: 2m
    restart: on-failure
    environment:
      VERSION: "ltsc10"

Passthrough USB HDD

Hi, I would like to know if it is possible to passthrough a physical USB external HDD connected to the Host to the docker via
volumes

  • /dev/sdb:/xxx

KVM error

KVM is working and exists on my host but when I start the container it generates this error,.

image

VNC Connection not working in UNRAID

I just installed the WindowsinDocker application for UNRAID from Community Apps last week. It appeared to be running but I kept getting VNC errors (I could see Windows in the background, just no mouse or keyboard support). Over the weekend, several updates appear to have been pushed, and now when I start the container, I get "Failed to connect to the server" VNC errors. The docker logs don't really show any issues:

BdsDxe: loading Boot0004 "Windows Boot Manager" from HD(2,GPT,D8FCFBA8-615F-498C-AF32-8838F29C586C,0x96800,0x32000)/\EFI\Microsoft\Boot\bootmgfw.efi
BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(2,GPT,D8FCFBA8-615F-498C-AF32-8838F29C586C,0x96800,0x32000)/\EFI\Microsoft\Boot\bootmgfw.efi

Any ideas why VNC appears to be broken on UNRAID systems?

Adding sound device

Sorry but I am new. How would I add a sound device to the Windows 10 docker?? I know with a VM you add to the xml config but not sure how to do it in this case. While I know noVNC can't play audio I am looking to use teamviewer to access this remotely.

Suggestion: Replace novnc with kasmvnc

Not sure if it would be possible, but replacing novnc with kasmvnc would be a nice quality of life change as it has a few extra settings and features that may be useful to some people, I know other containers have been able to swap from novnc to it such as webtop by linuxserver.io

are downloaded iso's saved external to the image?

Doesn't appear they are.

After downloading an iso to setup a VM, it'd be useful if this was saved in host path mapped to /storage.

Even better, do able to provide a save location for the ISO.

For example on Unraid, there's an iso share by default. Would make sense to be able to map this path, so that on container's first boot, and subsequently first setup, the ISO be saved to be reused later.

Help, no network in windows systemwhile creating docker container in synology

I followed the guideline to successfully create the win10 container in synology device(DSM7). docker network is defined as macvlan with fixed ipv4 address. the os can well start but there is no network inside. Yellow exclamation points show on the network device and pci device in Device Manager. How can I fix this problem?

Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory

1.When I enter"docker compose up -d",An error has occurred:
"Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory"

2.My docker-compse.yml:
version: "3"
services:
windows:
image: dockurr/windows
container_name: windows
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
volumes:
- ./win:/storage

stop_grace_period: 2m
restart: on-failure

Allow creation of local users (non microsoft-account user)

Hey, would it be possible to specify a local user through env variables? I see you are using unattended xml files, so i guess, adjusting them and adding the needed lines for a pre-configured username+password should be possible using some kind of text file manipulation tool like sed or something.

Dynamic Memory Usage

Have as anyone found how to set the ram to be dynamically used, as in proper ballooning?

As Windows calls for more ram, the system dedicates how much ever needed to it until hits the maximum permitted, but it won't return any of the dedicated ram when its no longer using it. So its essentially a one way street.

Microsoft Blocked the Automated Download - how can I supply the .iso?

I keep getting these messages and am wondering how I can just supply my own iso instead of downloading it

Microsoft blocked the automated download request based on your IP address. Please manually download this ISO in a web browser here: https://www.microsoft.com/en-us/software-download/windows11

[!] 1 attempted download(s) failed! Please re-run Mido with these arguments to try downloading again (any partial downloads will be resumed): win11x64
[i] Manual verification instructions

  1. Get checksum (may already be done for you):
    sha256sum <ISO_FILENAME>
  1. Verify media:
    Web search: https://duckduckgo.com/?q=%22CHECKSUM_HERE%22
    Onion search: https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/?q=%22CHECKSUM_HERE%22
    "No results found" or unexpected results indicates the media has been modified and should not be used.
  1. Remove the .UNVERIFIED extension from the file after performing or deciding to skip verification (not recommended):
    mv <ISO_FILENAME>.UNVERIFIED <ISO_FILENAME>

Theses searches can be performed in a web/Tor browser or more securely using
ddgr (Debian/Fedora packages available) terminal search tool if preferred.
Once validated, consider updating the checksums in Mido by submitting a pull request on GitHub.
[+] Finished! Please see the above errors with information
โฏ ERROR: Status 3 while: bash "$SCRIPT" "$VERSION" (line 88/12)

error in docker run

Hey there, either with docker compose or docker run i am getting this error in the log
root@dps-43:~# docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN dockurr/windows
โฏ Starting Windows for Docker v1.10...
โฏ For support visit https://github.com/dockur/windows

install.sh: line 45: BASE: unbound variable

P.S: it's just a repeating error and nothing else is being shown

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.