qemu and <transient/> disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Partly following up this message:
https://www.redhat.com/archives/libvirt-users/2011-October/msg00142.html

> > And what about qemu's option "snapshot=on" ?
>
> Unreliable. It won't work with SELinux (since qemu tries to create the
> snapshot on /tmp), and it makes your guest unmigratable.  I think that
> it is easier to have libvirt use qemu-img to create a qcow2 wrapper
> prior to booting the guest, at which point the solution is easier to
> control from an sVirt perspective, and is more likely to allow us to
> figure out a way to make things work with migration (at least, I'm
> hoping I can figure out how to migrate a guest with a transient disk).

Lack of this feature is pretty annoying, particularly since
(a) libguestfs needs it and (b) it's a trivial patch to add
snapshot=on to the qemu driver.  So to concentrate on the two
objections above:

 - Why is SELinux concerned about qemu creating and using a file in
   /tmp?  Obviously it should stop qemu opening and reading random
   files from /tmp but that would be a different rule surely?

 - The documentation actually states that using <transient/> may make
   your guest unable to migrate, and in any case we don't care.

> But if you want to use qemu's snapshot=on in the meantime, you can
> use the <qemu:commandline> namespace XML to add it.

Is there an example how to do this?  It seems like it might be
possible using a global qemu '-set device.<id>.snapshot=on' parameter,
but how can I know what <id> libvirt will give to a '-drive'
parameter?  (I found from experimentation that it's something like
"drive-virtio-disk0", but I can't track down the bit of code that
produces this string yet ...)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]