winboat icon indicating copy to clipboard operation
winboat copied to clipboard

[Feature] Resizing virtual disk

Open yoshiweegee opened this issue 2 months ago • 12 comments

Feature Description

Simply, a configuration option to change the size of the virtual disk, similar to the options for the number of virtual cores and RAM.

Use-Case

It's easy to underestimate how much virtual disk space is needed. Currently, the only upfront means to change the virtual disk size is to completely reinitialize WinBoat.

I would guess that there's some way to locate the container's image and change it, but trying to search for answers on how to do this only turned up answers for changing the default docker uses when creating the container, and otherwise scattered and arguably incoherent answers for an existing image.

As it stands, I don't know how to change the virtual disk size without going through the entire process again. This takes a substantial amount of time, estimated around 20 minutes. And again, given how easy it is to underestimate how much space might be needed, I think that it's likely that this is a common annoyance.

Proposed Implementation

As mentioned, virtual CPU cores and RAM are already options. Nestling a similar option for virtual disk space should be trivial on the UI end.

As for actually changing the virtual disk size, I can't suggest what I don't know how to do in the first place.


I'm using this space to ask for a temporary workaround to the problem point if known. Also, while I did try to find issues mentioning this topic, due to the various ways to refer to the same thing (virtual disk/image/container, size/space), it's possible that I missed it. GitHub's search is only so capable.

Notice

  • [x] I have checked the issue tracker and verified that this Feature Request has not been proposed before.
  • [ ] I would like to help out implementing this feature

yoshiweegee avatar Oct 08 '25 20:10 yoshiweegee

I was going to suggest this exact feature. Winboat uses dockur for the docker image and VM creation. There is quite a bit that can be configured with dockur including resizing the disk image to a larger size. You can read more in their readme https://github.com/dockur/windows

In the mean time I installed Portainer and edited the docker container environment variables manually and then redeployed the container. Keep in mind you can only resize larger and will need to expand the disk inside Windows after redeploying the container.

djex avatar Oct 08 '25 23:10 djex

Assuming the "compose file" the readme refers to is ~/.winboat/docket-compose.yaml, changing the DISK_SIZE value didn't resize the virtual disk (and yes, I made sure to check the actual virtual disk in Disk Management and not simply look at the drive in File Explorer).

I'll investigate Portainer later.

yoshiweegee avatar Oct 09 '25 01:10 yoshiweegee

Assuming the "compose file" the readme refers to is ~/.winboat/docket-compose.yaml, changing the DISK_SIZE value didn't resize the virtual disk (and yes, I made sure to check the actual virtual disk in Disk Management and not simply look at the drive in File Explorer).

I'll investigate Portainer later.

Yeah I found the same. Editing the docker-compose.yaml in the .winboat folder does not reflect the changes when starting Winboat container from Winboat. This is most likely because Winboat is not redeploying the container on each start. The Portainer method works for now.

djex avatar Oct 09 '25 01:10 djex

In the mean time I installed Portainer and edited the docker container environment variables manually and then redeployed the container. Keep in mind you can only resize larger and will need to expand the disk inside Windows after redeploying the container.

how to edit with portainer?

skyzuma avatar Oct 09 '25 15:10 skyzuma

Wish I read this thread before I tried manually using qemu-img resize directly on the /var/lib/docker/volumes/winboat_data/_data/data.img 😓

Had to nuke it and reinstall. Luckily I did not have anything on the disk worth saving. I did copy the .img file first ofc, but it appears that the other binaries in /var/lib/docker/volumes/winboat_data/_data/ all got modified when I tried to boot the container with the new .img, causing them to not work nicely with my old .img.

Matheos96 avatar Oct 11 '25 16:10 Matheos96

As of https://github.com/dockur/windows amending the disk size in docker-compose.yml should be picked up. I wonder, why winboat doesn't, because it used dockur. However, starting the container manually with "docker compose up" works as expceted:

docker compose up
[+] Running 1/1
 ✔ Container WinBoat  Recreated                                                                                                           0.5s 
Attaching to WinBoat
WinBoat  | ❯ Starting Windows for Docker v5.03...
WinBoat  | ❯ For support visit https://github.com/dockur/windows
WinBoat  | ❯ CPU: AMD Ryzen 7 4800H | RAM: 55/63 GB | DISK: 1 TB (btrfs) | KERNEL: 6.16.10-200.fc42.x86_64...
WinBoat  | 
WinBoat  | ❯ Warning: you are using the BTRFS filesystem for /storage, this might introduce issues with Windows Setup!
WinBoat  | ❯ Resizing disk from 32 GB to 64 GB...
WinBoat  | ❯ Warning: unsupported clock source detected: 'hpet'. Please set host clock source to 'tsc'.
WinBoat  | ❯ Booting Windows using QEMU v10.0.3...
WinBoat  | BdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,F365D7C6-9B71-416C-ACBD-BC4E3D8A537F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
WinBoat  | BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,F365D7C6-9B71-416C-ACBD-BC4E3D8A537F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
WinBoat  | ❯ Windows started successfully, visit http://127.0.0.1:8006/ to view the screen...
WinBoat  | ❯ Received SIGTERM, sending ACPI shutdown signal...
WinBoat  | ❯ Waiting for Windows to shutdown... (1/110)
WinBoat  | ❯ Waiting for Windows to shutdown... (2/110)
WinBoat  | ❯ Waiting for Windows to shutdown... (3/110)
WinBoat  | ❯ Shutdown completed!

I then restarted the container directly with winboat the 64GB disk was in place. Of course you have to take care about amending the partition table in windows on your own. I simply used AMOEI for the latter task.

HWE70 avatar Oct 14 '25 15:10 HWE70

How can I resize it now? I thought it said "I can change these settings later", but now I am stuck with 32GB. Kinda bad ngl.

Pytonballoon810 avatar Oct 17 '25 16:10 Pytonballoon810

Haven't you seen my post? I think provided a feasible solution.

HWE70 avatar Oct 17 '25 16:10 HWE70

How can I resize it now? I thought it said "I can change these settings later", but now I am stuck with 32GB. Kinda bad ngl.

  1. Go into your .winboat directory where the docker-compose.yml file is saved.
  2. Run docker compose down there.
  3. Modify docker-compose.yml and set the DISK_SIZE you want.
  4. Run docker compose up and wait until the Windows Docker container is up again.
  5. I then used MiniTool Partition Wizard Free to resize the Windows Partition.

v3DJG6GL avatar Oct 17 '25 18:10 v3DJG6GL

Haven't you seen my post? I think provided a feasible solution.

And decreasing size? I increased it with your instructions, but I decided I wanted to decrease it some. Same method isn't working to decrease, for me.

MartyrKomplx avatar Oct 21 '25 02:10 MartyrKomplx

How can I resize it now? I thought it said "I can change these settings later", but now I am stuck with 32GB. Kinda bad ngl.

  1. Go into your .winboat directory where the docker-compose.yml file is saved.
  2. Run docker compose down there.
  3. Modify docker-compose.yml and set the DISK_SIZE you want.
  4. Run docker compose up and wait until the Windows Docker container is up again.
  5. I then used MiniTool Partition Wizard Free to resize the Windows Partition.

This worked well for me , thank you .

Messodz avatar Oct 23 '25 11:10 Messodz