-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman machine start fails due to zero machine config #11824
Comments
Also, after running podman4 machine, podman3 machine shows warnings. But I guess that is to be expected... ?
|
I think the problem is that toml writes the empty values to the config file. Instead of This is a serious problem because we already released this with podman 3.4. Once this is written to the config file every new VM will be broken. |
When toml writes the config file it does not use `omitempty` for numeric values instead it requires `omitzero`. [1] The problem is that without this change, `config.Write()` writes ``` [machine] cpus = 0 disk_size = 0 memory = 0 ``` to the user file. Becuase podman machine system connection add code will do this the config file is broken afterwads. The first vm will be created successfully but after this every other vm will be broken because the cpu, memory and disk size are set to zero. [1] BurntSushi/toml#81 Fixes containers/podman#11824 Signed-off-by: Paul Holzinger <[email protected]>
When toml writes the config file it does not use `omitempty` for numeric values instead it requires `omitzero`. [1] The problem is that without this change, `config.Write()` writes ``` [machine] cpus = 0 disk_size = 0 memory = 0 ``` to the user file. Because podman machine system connection add code will do this the config file is broken afterwards. The first vm will be created successfully but after this every other vm will be broken because the cpu, memory and disk size are set to zero. [1] BurntSushi/toml#81 Fixes containers/podman#11824 Signed-off-by: Paul Holzinger <[email protected]>
The workaround is to supply all the parameters to the command.
|
Well you can also remove the bad config stuff
It should work for the next |
When toml writes the config file it does not use `omitempty` for numeric values instead it requires `omitzero`. [1] The problem is that without this change, `config.Write()` writes ``` [machine] cpus = 0 disk_size = 0 memory = 0 ``` to the user file. Because podman machine system connection add code will do this the config file is broken afterwards. The first vm will be created successfully but after this every other vm will be broken because the cpu, memory and disk size are set to zero. [1] BurntSushi/toml#81 Fixes containers/podman#11824 Signed-off-by: Paul Holzinger <[email protected]>
Reopen because the fix is not in podman yet. |
When toml writes the config file it does not use `omitempty` for numeric values instead it requires `omitzero`. [1] The problem is that without this change, `config.Write()` writes ``` [machine] cpus = 0 disk_size = 0 memory = 0 ``` to the user file. Because podman machine system connection add code will do this the config file is broken afterwards. The first vm will be created successfully but after this every other vm will be broken because the cpu, memory and disk size are set to zero. [1] BurntSushi/toml#81 Fixes containers/podman#11824 Signed-off-by: Paul Holzinger <[email protected]>
This fixes a bug where podman machine could create a broken config file. Fixes containers#11824 Signed-off-by: Paul Holzinger <[email protected]>
The problem is probably due <containers/podman#11824>. After applying it the `machine init' was successfully created together with the `.ign'.
This is fixed in the 3.4 branch and main so I close this. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Upgrading the podman configuration, hangs the machine boot.
Steps to reproduce the issue:
podman machine init
podman machine start
Describe the results you received:
Hangs,
Waiting for VM ....
There is no feedback.When running with debug logs, the GUI show that it fails to load the initramfs.
The root cause is that the VM gets no cpu and no ram, from the qemu command.
[/usr/bin/qemu-system-x86_64 -m 0 -smp 0 ...
There should probably be some validation, at least one CPU and at least one GB ?
Describe the results you expected:
The VM should start up.
Additional information you deem important (e.g. issue happens only occasionally):
This is the configuration, written to containers.conf
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: