Hide Forgot
Description of problem: a shutdown guest with nbd network disk can't do snapshot Version-Release number of selected component: qemu-kvm-rhev-1.5.3-19.el7.x86_64 libvirt-1.1.1-12.el7.x86_64 How reproducible: 100% Steps: 1. start a guest with nbd network disk <disk type='network' device='disk'> <driver name='qemu' type='qcow2'/> <source protocol='nbd'> <host name='10.66.5.93' port='10809'/> </source> <target dev='sda' bus='scsi'/> </disk> <controller type='scsi' index='0' model='virtio-scsi'> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </controller> # virsh define rhel6.xml Domain rhel6 defined from rhel6.xml # virsh start rhel6 Domain rhel6 started 2. do snapshot when guest is running # virsh snapshot-create-as rhel6 s1 Domain snapshot s1 created 3. do snapshot when guest is shutdown # virsh snapshot-create-as rhel6 s2 error: internal error: Child process (/usr/bin/qemu-img snapshot -c 1384237951) unexpected exit status 1 Actual results: as above Expected results: can do snapshot for an shutdown guest
It might be possible for libvirt to do network disk snapshots of offline domains by using 'qemu --machine none' and managing that process for the lengthy operation; but that is an upstream feature that would still need to be written.
(In reply to Shanzhi Yu from comment #0) > Description of problem: > > a shutdown guest with nbd network disk can't do snapshot > > Version-Release number of selected component: > qemu-kvm-rhev-1.5.3-19.el7.x86_64 > libvirt-1.1.1-12.el7.x86_64 > > How reproducible: > 100% > > Steps: > 1. start a guest with nbd network disk > <disk type='network' device='disk'> > <driver name='qemu' type='qcow2'/> > <source protocol='nbd'> > <host name='10.66.5.93' port='10809'/> > </source> > <target dev='sda' bus='scsi'/> > </disk> > <controller type='scsi' index='0' model='virtio-scsi'> > <address type='pci' domain='0x0000' bus='0x00' slot='0x08' > function='0x0'/> > </controller> > > # virsh define rhel6.xml > Domain rhel6 defined from rhel6.xml > # virsh start rhel6 > Domain rhel6 started > > 2. do snapshot when guest is running > # virsh snapshot-create-as rhel6 s1 > Domain snapshot s1 created > > > 3. do snapshot when guest is shutdown > # virsh snapshot-create-as rhel6 s2 > error: internal error: Child process (/usr/bin/qemu-img snapshot -c > 1384237951) unexpected exit status 1 > Can you please try creating an external snapshot with the same configuration? Thanks.
Hi Ademar, on libvirt-3.2.0-9.el7.x86_64 qemu-kvm-rhev-2.9.0-10.el7.x86_64, it's OK to create external snapshot 1. Start vm with following xml: <disk type='network' device='disk'> <driver name='qemu' type='raw'/> <source protocol='nbd'> <host name='XX.XX.XX.XX' port='10801'/> </source> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 2. Create externel snapshot : # virsh snapshot-create-as q35 --disk-only --diskspec sda,file=/tmp/bnd Domain snapshot 1497424384 created 3. Dump vm's xml: # virsh dumpxml q35|awk '/<disk/,/<\/disk/' <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/tmp/bnd'/> <backingStore type='network' index='1'> <format type='raw'/> <source protocol='nbd'> <host name='10.66.5.92' port='10801'/> </source> <backingStore/> </backingStore> <target dev='sda' bus='scsi'/> <alias name='scsi0-0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk>
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.