Skip to content
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

remove qemu:commandline after first start (at least give a hint in documentation) #502

Open
pampelmuse76 opened this issue Feb 4, 2023 · 2 comments

Comments

@pampelmuse76
Copy link

Describe the bug

Creating a CoreOS VM with kickstart using an ign file, the ign file must not be removed.

Reproduction steps

  1. Create a CoreOs VM with an ignition file:
    virt-install
    --name core1
    [...]
    --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=/tmp/coreos_5988.ign"
  2. Stop the VM (with login and shutdown)
  3. Remove the ignition file: rm /tmp/coreos_5988.ign
  4. Tring to restart the VM

virsh start core1
gives:
error: Failed to start domain 'core1'
error: internal error: qemu unexpectedly closed the monitor: 2023-02-04T17:40:10.657128Z qemu-system-x86_64: -fw_cfg name=opt/com.coreos/config,file=/tmp/coreos_5988.ign: can't load /tmp/coreos_5988.ign: Failed to open file “/tmp/coreos_5988.ign”: No such file or directory

Expected behavior

Removing of the ign file should be possible.

Actual behavior

There must be a manual interaction.
(see Additional information)

System details

virt-install
--name core1
--vcpus 2
--memory 4096
--disk vol=m2ssd/core1
--os-variant fedora-coreos-stable
--network bridge=virbr0
--mac=${MAC}
--import
--graphics none
--noautoconsole
--qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=/tmp/coreos_5988.ign"

Ignition config

variant: fcos
version: 1.4.0
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-rsa [...]

Additional information

I can "solve" this problem by using

virsh edit core1
and than removing the following part at the end of the file:
qemu:commandline
<qemu:arg value='-fw_cfg'/>
<qemu:arg value='name=opt/com.coreos/config,file=/tmp/coreos_5988.ign'/>
</qemu:commandline>

@bgilbert bgilbert transferred this issue from coreos/fedora-coreos-tracker Feb 4, 2023
@dustymabe
Copy link
Member

Right. There's no way to make it optional. As you found out you must review it from the machine definition.

We can improve our docs around this. We'd probably need to edit https://github.com/coreos/fedora-coreos-docs/blob/main/modules/ROOT/pages/getting-started-libvirt.adoc

@pampelmuse76
Copy link
Author

pampelmuse76 commented Feb 12, 2023

I suggest adding the following hint:

virt-xml core1 --edit --xml xpath.delete=./qemu:commandline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants