Bug 832194 - make <transient> tag in libvirt work for qemu disks
Summary: make <transient> tag in libvirt work for qemu disks
Keywords:
Status: CLOSED DUPLICATE of bug 508662
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Blake
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1040068
TreeView+ depends on / blocked
 
Reported: 2012-06-14 19:49 UTC by Jonathan Blandford
Modified: 2016-03-21 22:59 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
: 1040068 (view as bug list)
Environment:
Last Closed: 2016-03-21 22:59:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Jonathan Blandford 2012-06-14 19:49:12 UTC
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 19:54:20 UTC
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 13:53:06 UTC
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 11:44:49 UTC
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=...

Also, 

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

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 11:46:32 UTC
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 22:59:53 UTC
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.