dockur / windows

Windows inside a Docker container.
MIT License
17.07k stars 1.45k forks source link

[Bug]: Autoinstalled on attached device which had 14 TB of (already lost) data #710

Open playday3008 opened 3 weeks ago

playday3008 commented 3 weeks ago

Operating system

Fedora 40

Description

Steps to reproduce

  1. Use core11 (I guess can be any windows10/11 don't sure about other)
  2. Attach a disk device using docker-compose (part below) or docker cli (--device=/dev/sdb:/disk1)
    devices:
      - /dev/sdb:/disk1
      - /dev/sdc:/disk2
  3. Start new docker container through docker-compose up (-d) or docker run ...
  4. (Actual behavior) Windows will install itself to first attached device

Expected behavior

Windows should install only into container allocated space (that one that we can change size of by DISK_SIZE env variable)

P.S. Just avoid attaching on first boot isn't an option, because for example command below will autodelete container on exit, which means there's no second boot, only first one

Docker compose

docker run -it --rm -e VERSION=core11 -p 8006:8006 --device=/dev/kvm --device=/dev/sdb:/disk1 -v /home/nobody/Downloads/tiny11\ core\ x64\ beta\ 1.iso:/custom.iso --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows

Docker log

I actually forgot to take it, I noticed that it reformatted a drive too late

Screenshots (optional)

No response

AleksanderGrzybowski commented 3 weeks ago

I recently started using this project (love it so far) and I was wondering about exactly the same thing. The documentation should be way, way more clearer (maybe with a big warning box), that /disk1 block device will be destroyed in the process.

playday3008 commented 2 weeks ago

I recently started using this project (love it so far) and I was wondering about exactly the same thing. The documentation should be way, way more clearer (maybe with a big warning box), that /disk1 block device will be destroyed in the process.

In other words, if at least 1 disk is attached, the first one will be overwritten