Re: Handlingfrage kvm snapshots

Andreas Roth <[email protected]>
Newsgroups gmane.user-groups.linux.dresden
Message-ID <[email protected]>
Hoi Gerd, hi zusammen,

> sorry nicht richtig gelesen.
> 
> wie sieht es aus wen beim löschen die
> 
> OPTIONEN
>    ..
>    --children       Löschen Snapshot und alle Untergeordneten

Ändert erstmal nix - ich habe auch nur einen Snapshot ohne children angelegt.. 

virsh # snapshot-list test04
Name Creation Time State
---------------------------------------------------
1672655491 2023-01-02 11:31:31 +0100 running

virsh # snapshot-delete --children --snapshotname 1672655491 test04
Domain snapshot 1672655491 deleted

$ ls -lah test04-system.qcow2
-rw-r--r-- 1 libvirt-qemu kvm 43G Jan 2 11:35 test04-system.qcow2

Als workaround kann man die VM auf einen anderen Host per live migration kopieren.  Dabei wird dann auch wirklich nur die 20Gb kopiert und das file ist wieder „klein“. 

$ virsh migrate --live test04 --copy-storage-all --persistent --undefinesource qemu+ssh://art@hw01:10022/system?socket=/var/run/libvirt/libvirt-sock

Somit kann man auf dem Originalhost das Imagefile löschen. 
Beim zurückmigrieren fällt er dann mit der Meldung um, dass es das Imagefile nicht mehr gibt.. Warum auch immer, da man ja eigenetlich "--persistent —undefinesource“ gesetzt hat. 

$ virsh migrate --live test04 --copy-storage-all --persistent --undefinesource qemu+ssh://art@hw02:10022/system?socket=/var/run/libvirt/libvirt-sock
error: Path '/data/vm1/test04-system.qcow2' is not accessible: No such file or directory

Wenn man das Imagefile nun wieder anlegt, dann kann man zuürckmigrieren und hat man den Stand, den ich wollte. 

Vom Handling wirklich nicht schön.. 

Cheers,

Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.