[Top][All Lists]

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

[Qemu-discuss] Cannot block-commit to nbd backend

From: Han Han
Subject: [Qemu-discuss] Cannot block-commit to nbd backend
Date: Tue, 27 Jun 2017 17:04:02 +0800

Hi all, I get an error when block-commit to nbd backend:
First, prepare a back file for nbd storage:
# qemu-img create -f qcow2 -b 'json:{"file.driver":"nbd",
"file.host":"xx.xx.xx.xx", "file.port":"10803", "file.export":"nbd_raw"}'
-o backing_fmt=raw /tmp/n2.s1
Formatting '/tmp/n2.s1', fmt=qcow2 size=10737418240
backing_file=json:{"file.driver":"nbd",, "file.host":"xx.xx.xx.xx",,
"file.port":"10803",, "file.export":"nbd_raw"} backing_fmt=raw
encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16

Start the VM with the back file.
# virsh dumpxml n2| awk '/<disk/,/<\/disk/'
<disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/tmp/n2.s1'/>
      <backingStore type='network' index='1'>
        <format type='raw'/>
        <source protocol='nbd' name='nbd_raw'>
          <host name='xx.xx.xx.xx' port='10803'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08'

Qemu cmdline:
-drive file=/tmp/n2.s1,format=qcow2,if=none,id=drive-virtio-disk0

Then do block-commit:
# virsh blockcommit n2 vda --active --shallow --wait --verbose --pivot
error: internal error: unable to execute QEMU command 'block-commit': Block
format 'nbd' used by node '#block265' does not support reopening files

qemu command:

So is it a expected result? Does it support to block-commit to nbd?

Han Han
Associate Quality Engineer

Email: address@hidden
Phone: +861065339333

reply via email to

[Prev in Thread] Current Thread [Next in Thread]