[Bug] Container gets deleted if winboat settings are saved while VM is unaccessable.
What version of WinBoat are you running?
0.9.0
Your Environment
Linux Distro Used: Fedora 43 Desktop Enviornment Used: KDE Plasma
Steps to Reproduce / Context
Install Windows VM onto an external drive. With WinBoat open and the VM disconnected, have your drive disconnect (or disconnect it manually). Go into WinBoat Settings, change any setting then press save.
Container status will now report as "Unknown" even after the drive is reconnected, and restarting winboat, will take you through the setup process once more.
Logs
Expected Behavior
Failure to save settings, leaving the container intact.
Current Behavior
Deletes container when attempting to save settings with no way to restore it.
Possible Solution
Check if windows vm is accessible before trying to save settings. Additionally, add an option during the setup to use/restore an existing VM.
Quality Notice
- [x] I have checked the issue tracker and verified that this bug is a unique case.
For some reason winboat.log wouldn't upload till I renamed it, so here it is. Sorry about that: _winboat.log
I second this.
For anyone else who has runs into this issue or similar where winboat suddenly doesn't see your install, you can fix it by going to ~/.winboat/ and ensuring the location you installed windows is still listed in podman-compose.yml (or docker-compose.yml if you use docker) and that directory still exists and is accessible. Then open a terminal and running
cd ~/.winboat
podman-compose up -d
(For docker use)
cd ~/.winboat
docker-compose up -d
Then if you launch winboat it should show your vm again and that it's booting up.
I still feel that some form of this should be built into winboat natively though.
@Lostdragon5
I had a similar problem and tried your suggestion. The podman-compose.yml file listed
volumes: - /home/ccomer/winboat:/storage - ${HOME}:/shared - ./oem:/oem
When I check the /home/ccomer/winboat folder, there was no /storage folder. Creating it and then trying to run your suggested commands, resulted in the following error:
ccomer@Bazzite:~/.winboat$ podman-compose up -d Error: running container create option: "False" is not a valid restart policy: invalid argument Error: no container with name or ID "WinBoat" found: no such container
I also installed Podman desktop to see if I could get it to relaunch from there but got a similar error (it's always cut off at the edge of the window):
Best as I can tell, it deleted the container for some reason. Am I missing something?
The only difference between your issue and mine was that I tried saving a setting change while the VM was running. I assumed it would not implement the change until I manually restarted it, but it tried to do it automatically, then never restarted.
running container create option: "False" is not a valid restart policy:
@cgcomer https://github.com/TibixDev/winboat/issues/561
After checking #561 (thanks @bbigras), and editing the compose file I got it working again. Now I just have to figure out why the Winboat Guest API keeps crashing.
I second this. This issue is very annoying to deal with, especially since there's no intentional way of just using the previous image in a new container
I don't know if this is needed information, but the Issue is also present on Fedora 43 Workstation. Winboat installed with the .rpm file. There is no need for an external drive, mine was fully safed to my home-directory. I shutdown the container and after a system-restart and saving the settings it reported an unkown error for the vm/Container and after I closed and reopened the application there was the Setup screen.
When I looked into the ~/.winboat/ directory I looked at the files and my install directory which looked all fine.
After I used podman-compose up -d I got the same error as @cgcomer
Error: running container create option: "False" is not a valid restart policy: invalid argument
Error: no container with name or ID "WinBoat" found: no such container
Then I did some Google Searching and found out, that the restartpolicy was not correctly recognised.
It got interpreted as "False" and not "no"
Then I added some Quotes " at the beginning and end of "no" and did the podman-compose cmd again. And now the installation is back.
This is probably because everyone who had the issue changed the autostart setting in winboat. This could also just be a podman issue, because the yml interpreter of podman changes
restart: no
to false.
So its the same issue as in #561 as @bbigras already said (I did want to write it here again, because maybe somebody doesn't want to go multiple issues deep; also this issue is top google search) I hope this helps.
Hello all :) It happens to me also. First I noticed this on my system and looked what happened, then I found this bug reported here. So I will also describe this scenario.
I install Windows. I can run it, stop it, turn on / off WinBoat as I want. And all is fine :)
- Podman shows windows container exists and is running / exited depending if I turned on/ off windows.
> podman container list -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
96e0c13b7b6b ghcr.io/dockur/windows:5.14 28 minutes ago Exited (143) 8 minutes ago 127.0.0.1:41191->3389/tcp, 127.0.0.1:34535->7148/tcp, 127.0.0.1:45281->7149/tcp, 127.0.0.1:35483->8006/tcp, 127.0.0.1:36103->3389/udp WinBoat
- In WinBoat Configuration i uncheck 'Auto Start Container' and set 'FreeRDP Port' for example to 35557, and click 'save'.
And it breaks things.
- WinBoat shows:
WinBoat Guest API - Offline Container - Unknown
- podman does not show this container anymore.
> podman container list -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- When I launch WinBoat again it starts with "Welcome to WinBoat" configuration wizard.
If I provide here the same data as when installing Windows for the first time - WinBoat thankfully does not install Windows from scratch but just after a few seconds says finished and I can run the same Windows again.
Now podman container exists again:
> podman container list -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e4a3006422f1 ghcr.io/dockur/windows:5.14 30 seconds ago Up 30 seconds 127.0.0.1:42501->3389/tcp, 127.0.0.1:43149->7148/tcp, 127.0.0.1:36767->7149/tcp, 127.0.0.1:36181->8006/tcp, 127.0.0.1:39625->3389/udp WinBoat
If you need any more info please let me know.
This issue is still present? Wtf?
Same on Fedora KDE 44 as of today. Couldn't get the container to start even after restarting computer, so I changed some settings - or actually just one setting, the autostart (which had never worked right anyway). Closed and relaunched winboat and it acted like I'd never had a VM at all.
What fixed it: Added quotes around "no" in the restart: line of the podman-compose.yml in /.winboat as mentioned by HrKnuddel, then did podman-compose up -d. Now all is well (and it fixed the container issue - so I suppose this is a chicken-or-egg thing).
I suppose something about a recent system update (not winboat) triggered this issue, and maybe the container would have refused to launch regardless for the same reason (even if the winboat interface had still worked)? In any case, I appreciate you all documenting issue and the fix clearly. Always nice when something seemingly catastrophic has an easy fix.