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

bug: --monitor-cmd always fails due to qemu-img check attempt #1198

Closed
philclifford opened this issue May 11, 2024 · 4 comments
Closed

bug: --monitor-cmd always fails due to qemu-img check attempt #1198

philclifford opened this issue May 11, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@philclifford
Copy link
Contributor

Expected behavior

--monitor-cmd works as documented

Actual behavior

--monitor-cmd (and presumably other options that work with a running VM) break due to invocation of qemu-img to check the disk, which of course fails as it is in use.

@flexiondotorg flexiondotorg added the bug Something isn't working label May 11, 2024
@flexiondotorg
Copy link
Member

flexiondotorg commented May 11, 2024

This regress was introduced via:

In an effort to fix #848

Thanks @philclifford for this comment:

Here's some more activity for the disk health check:

@flexiondotorg
Copy link
Member

flexiondotorg commented May 11, 2024

The disk health check is a feature that is broken by design: #848

  • If a VM is running, qemu-img check will always fail because it can not get a write lock
  • quickemu can start VMs in the background (--display spice, for example), and the health check then breaks all further use of quickemu that operates on that running VM.

@TuxVinyards
Copy link
Contributor

TuxVinyards commented May 11, 2024

This is a general test that I use for my disk maintenance routines to avoid Qemu lock problems.

    # use pgrep with -x exact match to avoid 'kvm-cleanup' processes being detected
    [[ $(pgrep -x kvm) ]] &&  printColor "\n\n  VIRTUAL MACHINE ACTIVITY has been DETECTED \n"   

Thinking aloud a bit here, as just got back from a short break and I haven't tested. But would adding this as a conditional to the disk health checker work?

Edit

The disk health check is a feature that is broken by design: #848

That was fixed in #993 with the addition of an if exist .... So add another, if no kvm ...

@flexiondotorg
Copy link
Member

flexiondotorg commented May 11, 2024

The implementations, as submitted to quickemu in #848 and #993, are both broken. Here is a working implementation: 5ec5c51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants