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

Long interval or forever since guest poweroff until Qubes announce VM shutdown #7662

Open
logoerthiner1 opened this issue Jul 29, 2022 · 4 comments
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: core needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@logoerthiner1
Copy link

How to file a helpful issue

Qubes OS release

R4.1

Brief summary

In many various cases, when a VM guest has shutdown (in VM console log the systemd says that VM has shutdown), the dom0 will wait for a long time until announcing that the VM has shutdown. Obviously there are some other things that Qubes OS need to do.

Even on qvm-kill a VM, such time interval exists, where the VM cannot be shutdown any more nor cannot be started up.

Sometimes it seems that the VM is impossible to be admitted to be shutdown anymore and I have to reboot the whole system, for example when sys-net driver gets crazy and deadlocks the machine.

I do not understand where I can see relevant logs to check out what happens and what task is blocking the VM from being poweroff from the hypervisor side.

Steps to reproduce

Use the OS a little bit and shutdown various machines.

Expected behavior

For a short time after guest shutdowns, dom0 announces the VM shutdown and the VM can be started again.

Actual behavior

Sometimes for longer then 1 minutes after the guest shutdown, the guest is not fully shutdown and cannot be started up again.

@logoerthiner1 logoerthiner1 added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Jul 29, 2022
@DemiMarie
Copy link

For a VM to be fully shut down, some cleanup needs to happen in dom0. In particular, the volumes used by the VM need to be either deleted or committed, depending on whether the volume is persistent or not. This can take some time, and at least some of it is necessary for e.g. cloning the VM to reflect the changes made before the VM shut down.

@logoerthiner1
Copy link
Author

For a VM to be fully shut down, some cleanup needs to happen in dom0. In particular, the volumes used by the VM need to be either deleted or committed, depending on whether the volume is persistent or not. This can take some time, and at least some of it is necessary for e.g. cloning the VM to reflect the changes made before the VM shut down.

Good point. Now I wonder effective way of finding logs about the tasks Qubes OS need to finish between the time guest exits and the time Qubes OS announce that the VM exits. Sometimes it is lvm operations as you says, but I am afraid that sometimes it is not that simple. Any suggestions on the log hunting?

@andrewdavidwong andrewdavidwong added C: core needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jul 29, 2022
@andrewdavidwong andrewdavidwong added this to the Release 4.1 updates milestone Jul 29, 2022
@DemiMarie
Copy link

For a VM to be fully shut down, some cleanup needs to happen in dom0. In particular, the volumes used by the VM need to be either deleted or committed, depending on whether the volume is persistent or not. This can take some time, and at least some of it is necessary for e.g. cloning the VM to reflect the changes made before the VM shut down.

Good point. Now I wonder effective way of finding logs about the tasks Qubes OS need to finish between the time guest exits and the time Qubes OS announce that the VM exits. Sometimes it is lvm operations as you says, but I am afraid that sometimes it is not that simple. Any suggestions on the log hunting?

journalctl -b -u libvirtd.service -u qubesd.service -f --no-tail?

@logoerthiner1
Copy link
Author

For a VM to be fully shut down, some cleanup needs to happen in dom0. In particular, the volumes used by the VM need to be either deleted or committed, depending on whether the volume is persistent or not. This can take some time, and at least some of it is necessary for e.g. cloning the VM to reflect the changes made before the VM shut down.

Good point. Now I wonder effective way of finding logs about the tasks Qubes OS need to finish between the time guest exits and the time Qubes OS announce that the VM exits. Sometimes it is lvm operations as you says, but I am afraid that sometimes it is not that simple. Any suggestions on the log hunting?

journalctl -b -u libvirtd.service -u qubesd.service -f --no-tail?

Good tricks on journalctl. However the logs I saw there only contains that some xen bus is being removed.

I would rather want to know for example, the progress bar of each actions - for example the LVM snapshot removal. It would be better to provide a method of measuring how much work needs to be done in order to remove a specific snapshot, and the speed of the work being done.

I would be glad to hear suggestions about this.

@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: core needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

3 participants