[libvirt-users] Non-persistent disk
Eric Blake
eblake at redhat.com
Mon Aug 15 20:10:05 UTC 2011
On 08/15/2011 02:01 PM, Xianqing Yu wrote:
> Hi Libvirt team,
>
> I am trying to create a new domain from XML file by using libvirt. I
> want this new domain using non-persistent disk as its disk.
> Non-persistent disk means that when the domain is running, all the
> modification would not be written to disk file. So next time, when you
> boot VM from the same disk file, you would have a fresh disk. I check
> the website but I could not find anything about this. I wonder if
> libvirt support this function.
Yep, I'm working on it, and hope to have it in 0.9.5. See my RFC here:
https://www.redhat.com/archives/libvir-list/2011-August/msg00552.html
You will basically call out:
<devices>
<disk ...>
...
<transient/>
</disk>
...
> FYI, if I use KVM, I can use command "qemu-kvm -snapshot" to boot a VM
> on non-persistent disk.
Unfortunately, that makes for a non-migrateable VM - so I'm working on
something a bit more robust that stands a chance of creating a transient
yet migrateable domain.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvirt-users
mailing list