Bug 832194

Summary: make <transient> tag in libvirt work for qemu disks
Product: [Community] Virtualization Tools Reporter: Jonathan Blandford <jrb>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: amit.shah, crobinso, cwei, ddumas, deepakcs, dyuan, eblake, jprokes, mzhan, rbalakri, shyu, socketpair
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1040068 (view as bug list) Environment:
Last Closed: 2016-03-21 22:59:53 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:
Bug Depends On:    
Bug Blocks: 1040068    

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 ***