Bug 832194 - make <transient> tag in libvirt work for qemu disks
make <transient> tag in libvirt work for qemu disks
Status: CLOSED DUPLICATE of bug 508662
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Eric Blake
Depends On:
Blocks: 1040068
  Show dependency treegraph
Reported: 2012-06-14 15:49 EDT by Jonathan Blandford
Modified: 2016-03-21 18:59 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1040068 (view as bug list)
Last Closed: 2016-03-21 18:59:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Blandford 2012-06-14 15:49:12 EDT
It would be great to have a <transient> tag in libvirt's xml format so that we could specify that a disk isn't modified.  That is to say, we could boot into a snapshot of a VM, use it for the duration of a session, and then discard it when done.  This would be great for untrusted VMs, as well as demos.
Comment 1 Eric Blake 2012-06-14 15:54:20 EDT
Actually, we already _do_ have a <transient> tag supported in the XML, since 0.9.5, it's just that it never got wired up to being supported in qemu.
Comment 3 Eric Blake 2013-08-05 09:53:06 EDT
Revisiting this issue - still something we want, but it may first be useful to have the notion of a storage pool associated with a domain, where libvirt allocates from that storage pool instead of from /tmp when creating wrapper files (since /tmp may be small, especially on tmp-on-tmpfs systems)
Comment 4 Коренберг Марк 2015-09-04 07:44:49 EDT
maybe do that:

1. <transient pool=xxxx>
2. Fail if pool type is not a directory
3. Fail if multiple disks defined with <transient> that points to different pools
4. pass TMP environment variable for qemu to a directory where that pool points to?

Also, I can try to make patch to QEMU project in order to allow specify directory as:

qemu-system-xxx ... -drive snapshot=on,snapshot_dir=...


     <qemu:arg value='-snapshot'/>

does not work now with error:

internal error: process exited while connecting to monitor: qemu-system-x86_64: -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Device needs media, but drive is empty
qemu-system-x86_64: -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Device initialization failed.
qemu-system-x86_64: -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Device 'ide-hd' could not be initialized

So, after my patch for QEMU, it seems, that <transient> will not work anyway.
Comment 5 Коренберг Марк 2015-09-04 07:46:32 EDT
Forgot to add, if my patch will go to upstream in QEMU, constraints 3 and 4 should be removed
Comment 6 Cole Robinson 2016-03-21 18:59:53 EDT
marking as duplicate of an older bug for this feature

*** This bug has been marked as a duplicate of bug 508662 ***

Note You need to log in before you can comment on or make changes to this bug.