Desktop tool for managing virtual machines via libvirt
Go to file
Cole Robinson 1c8e6f8428 virt-install: Make --cloud-init reboot by default (again)
This basically reverts this commit from virt-manager 4.0.0

```
commit 825ec644b8
Author: Cole Robinson <crobinso@redhat.com>
Date:   Tue Mar 1 10:32:01 2022 -0500

    installer: Do not force reboot with --cloud-init

    Resolves: https://github.com/virt-manager/virt-manager/issues/189
```

After that commit, using `--cloud-init` or `--unattended` would
basically imply `--noreboot`

For some usage of `--cloud-init`, like in the initial report, this
makes sense to do. virt-install will drop you into the cloud image,
you mess without, run `poweroff`, and are surprised when virt-install
reboots the VM. I agreed, and made the change

But changing this was a bad idea.

cloud-init and unattended VMs have 2 XML phases. First XML is booting
off temporary media (the generated cloudinit iso), second XML is the
permanent boot config (booting off disk). We need to force the VM
to fully poweroff, so that the second XML config takes effect. We
make that happen with `<on_reboot>destroy</on_reboot>`, which tells
libvirt/qemu to poweroff the VM when it receives a guest reboot
notification. virt-install then defaults to restarting the VM when
it detects shutdown, to manually replicate the VM requested reboot,
but still get the second XML config to take effect.

The perennial problem with this is that, from outside the VM, we
don't know if the user inside the VM requested `poweroff` or `reboot`.
virt-install emulates the reboot behavior, and provides `--noreboot`
to override it. It's still confusing if a user puts a `poweroff`
command at the end of an anaconda kickstart file, and sees the VM
reboot, but it's been that way forever.

Except with that commit above, we flipped it for --cloud-init and
--unattended. Now, users who do `poweroff` are getting expected
behavior, but users who request `reboot` are not.

We could go further and add a `--yesreboot` option or similar. But
for consistency sake I think we should just revert that behavior,
and tell users to use --noreboot like usual.

Resolves: https://github.com/virt-manager/virt-manager/issues/497

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-10-11 14:40:03 +02:00
.github ci: Add test-against-libvirt-git.yml 2024-04-08 10:34:12 -04:00
data Scrub references to virt-tools-list 2024-09-06 15:10:04 -04:00
man virt-xml: Add --edit --convert-to-vnc 2024-10-09 11:03:43 +02:00
po po: Refresh translation template 2024-08-16 22:43:54 +02:00
tests console: Fix resize_to_vm with host fractional scaling 2024-10-10 11:15:35 -04:00
ui snapshots: Don't save outdated screenshot data 2024-09-25 10:18:38 +02:00
virtinst virt-install: Make --cloud-init reboot by default (again) 2024-10-11 14:40:03 +02:00
virtManager vmwindow: Default new window viewer size to 1280x800 2024-10-10 11:21:56 -04:00
.coveragerc tests: Add full test coverage for progress text output 2021-06-09 16:52:12 -04:00
.gitignore Add the translation catalog 2020-07-11 14:59:56 -04:00
.mailmap Update mailmap 2022-06-13 13:49:54 -04:00
.packit.yaml Packit: initial enablement 2023-01-19 14:04:42 -05:00
.pylintrc misc: fix spelling 2021-10-04 16:26:08 -04:00
CONTRIBUTING.md Scrub references to virt-tools-list 2024-09-06 15:10:04 -04:00
COPYING COPYING: use license file from gnu.org 2021-10-04 16:26:08 -04:00
DESIGN.md DESIGN.md: disk serial is back, but disk detect zeroes is gone 2022-03-09 13:30:16 -05:00
INSTALL.md INSTALL: Correctly document that we require pygobject >= 3.31.1 2022-02-20 12:31:52 -05:00
MANIFEST.in Add DESIGN.md 2020-01-26 12:14:18 -05:00
NEWS.md Prep for release 4.1.0 2022-08-04 15:53:33 -04:00
README.md Scrub references to virt-tools-list 2024-09-06 15:10:04 -04:00
setup.cfg setup: Add --tb=native to pytest options 2020-08-26 15:20:06 -04:00
setup.py Scrub references to virt-tools-list 2024-09-06 15:10:04 -04:00
virt-clone virt-*: invoke python3 using /usr/bin/env 2021-10-04 16:26:08 -04:00
virt-install virt-*: invoke python3 using /usr/bin/env 2021-10-04 16:26:08 -04:00
virt-manager virt-*: invoke python3 using /usr/bin/env 2021-10-04 16:26:08 -04:00
virt-manager.spec xmleditor: make gtksourceview optional 2024-06-06 10:25:26 +02:00
virt-xml virt-*: invoke python3 using /usr/bin/env 2021-10-04 16:26:08 -04:00

Virtual Machine Manager

virt-manager is a graphical tool for managing virtual machines via libvirt. Most usage is with QEMU/KVM virtual machines, but Xen and libvirt LXC containers are well supported. Common operations for any libvirt driver should work.

Several command line tools are also provided:

  • virt-install: Create new libvirt virtual machines
  • virt-clone: Duplicate existing libvirt virtual machines
  • virt-xml: Edit existing libvirt virtual machines/manipulate libvirt XML

For dependency info and installation instructions, see the INSTALL.md file. If you just want to quickly test the code from a git checkout, you can launch any of the commands like:

./virt-manager --debug ...

Contact