Bug 1725330
| Summary: | virt-clone shouldn't advertise that it works on a suspended VM | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Erick <erick.staal> |
| Component: | virt-manager | Assignee: | Cole Robinson <crobinso> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | agedosier, berrange, clalancette, crobinso, erick.staal, gscrivan, itamar, jforbes, laine, libvirt-maint, pkrempa, richard.poettler, tburke, veillard, virt-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-01-29 23:57:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Erick
2019-06-29 16:29:23 UTC
I just rechecked the man-page and I found no explicit confirmation that cloning a suspended VM should work. However when experimenting with trying to clone the running VM I get the error: ERROR Domain with devices to clone must be paused or shutoff. which suggests that cloning a paused VM should work. Thanks for the report. The 'write' lock is something newer qemu does, locking an image when a VM has it open. This prevents other uses of qemu/qemu-img from being able to accidentally alter a disk that is in use, it's a safety thing. It wasn't there forever though so previously you could clone a paused VM, although it wasn't the safest thing to do. For other hypervisors and in certain situations it is potentially okay though, so virt-clone isn't exactly wrong here. I believe if you want qemu to not do this write locking, you can add the <shareable/> element to your VM <disk> config, and then the clone operation should work. or just fully shut down the VM first which is the safest <shareable> will only work if the image format for the disk in the VM is 'raw'. For any other format that is not possible as e.g. qemu is caching the image metadata (qcow2 internals). The image on disk thus may look corrupt if viewed from a different process. Libvirt will report an error if <shareable> is used with non-raw images. libvirt is working as correctly here, the virt-clone message just doesn't apply in this case. We should probably just drop the 'suspended' bit from the message. Moving to virt-manager upstream to track that Fixed upstream now:
commit 140a1f3b15d47ea5d2d56bdf56d0484419023280
Author: Cole Robinson <crobinso>
Date: Wed Jan 29 16:14:55 2020 -0500
cloner: Drop ability to clone a paused VM
|