Edward Young
2015-Feb-13 02:41 UTC
[libvirt-users] libvirt live migration, qcow2 image, nbd server
Hi all, When I live migrate a vm using "migrate --live --copy-storage-all mig-vm qemu+ssh://192.168.1.3/system tcp://192.168.1.3" I got the following error WARNING: Image format was not specified for 'nbd://node2:49155/drive-virtio-disk0' and probing guessed raw. 258 Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. 259 Specify the 'raw' format explicitly to remove the restrictions.>From the error itself, I can tell that nbd server treat this image as raw,rather than qcow2. My platform is libvirt+qemu. the image type of this vm is indeed qcow2. I do not know how to let nbd know this image format. Thanks! Ed
Kashyap Chamarthy
2015-Feb-13 10:15 UTC
Re: [libvirt-users] libvirt live migration, qcow2 image, nbd server
On Thu, Feb 12, 2015 at 08:41:31PM -0600, Edward Young wrote:> Hi all, > > > When I live migrate a vm using > > "migrate --live --copy-storage-all mig-vm qemu+ssh://192.168.1.3/system > tcp://192.168.1.3" > > > I got the following error > > > WARNING: Image format was not specified for > 'nbd://node2:49155/drive-virtio-disk0' and probing guessed raw. > > 258 Automatically detecting the format is dangerous for raw > images, write operations on block 0 will be restricted. > > 259 Specify the 'raw' format explicitly to remove the restrictions. > > > >From the error itself, I can tell that nbd server treat this image as raw, > rather than qcow2. My platform is libvirt+qemu. the image type of this vm > is indeed qcow2. I do not know how to let nbd know this image format.Hmm, I wonder if `virsh --migrate` should have a --format (or -F) option that one can specify the format. Let's see what Eric Blake and others say. -- /kashyap
Eric Blake
2015-Feb-13 20:01 UTC
Re: [libvirt-users] libvirt live migration, qcow2 image, nbd server
On 02/12/2015 07:41 PM, Edward Young wrote:> Hi all, > > > When I live migrate a vm using > > "migrate --live --copy-storage-all mig-vm qemu+ssh://192.168.1.3/system > tcp://192.168.1.3" > > > I got the following error > > > WARNING: Image format was not specified for > 'nbd://node2:49155/drive-virtio-disk0' and probing guessed raw. > > 258 Automatically detecting the format is dangerous for raw > images, write operations on block 0 will be restricted. > > 259 Specify the 'raw' format explicitly to remove the restrictions. >Was that error printed by the source or the destination qemu? It may be a bug in libvirt for not explicitly requesting raw (we DO want the NBD server to be raw, but need to be explicit so as to avoid unsafe probing).> >>From the error itself, I can tell that nbd server treat this image as raw, > rather than qcow2. My platform is libvirt+qemu. the image type of this vm > is indeed qcow2. I do not know how to let nbd know this image format.Just because the underlying file on the disk is qcow2 does not impact what the NBD is serving - the NBD connection MUST be raw, unless you have a funky situation with a qcow2 file whose contents are also a nested qcow2 encoding of data. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Eric Blake
2015-Feb-13 20:03 UTC
Re: [libvirt-users] libvirt live migration, qcow2 image, nbd server
On 02/13/2015 03:15 AM, Kashyap Chamarthy wrote:> On Thu, Feb 12, 2015 at 08:41:31PM -0600, Edward Young wrote: >> Hi all, >> >> >> When I live migrate a vm using >> >> "migrate --live --copy-storage-all mig-vm qemu+ssh://192.168.1.3/system >> tcp://192.168.1.3" >> >> >> I got the following error >> >> >> WARNING: Image format was not specified for >> 'nbd://node2:49155/drive-virtio-disk0' and probing guessed raw. >> >> 258 Automatically detecting the format is dangerous for raw >> images, write operations on block 0 will be restricted. >> >> 259 Specify the 'raw' format explicitly to remove the restrictions. >> >> >> >From the error itself, I can tell that nbd server treat this image as raw, >> rather than qcow2. My platform is libvirt+qemu. the image type of this vm >> is indeed qcow2. I do not know how to let nbd know this image format. > > Hmm, I wonder if `virsh --migrate` should have a --format (or -F) option > that one can specify the format. Let's see what Eric Blake and others say.No. The format used by the NBD connection under the hood is not user-visible (for that matter, there may be more than one disk being migrated, and a single 'migrate --format' would NOT be sufficient to cover the case where multiple disks for the guest have different formats on the host). I think that it is merely a case where libvirt itself needs to explicitly tell qemu that the NBD server it is setting up under the hood will serve raw data, as there is no mention of the NBD server on the command line. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Edward Young
2015-Feb-13 21:24 UTC
Re: [libvirt-users] libvirt live migration, qcow2 image, nbd server
On Fri, Feb 13, 2015 at 2:01 PM, Eric Blake <eblake@redhat.com> wrote:> On 02/12/2015 07:41 PM, Edward Young wrote: > > Hi all, > > > > > > When I live migrate a vm using > > > > "migrate --live --copy-storage-all mig-vm qemu+ssh://192.168.1.3/system > > tcp://192.168.1.3" > > > > > > I got the following error > > > > > > WARNING: Image format was not specified for > > 'nbd://node2:49155/drive-virtio-disk0' and probing guessed raw. > > > > 258 Automatically detecting the format is dangerous for raw > > images, write operations on block 0 will be restricted. > > > > 259 Specify the 'raw' format explicitly to remove the > restrictions. > > > > Was that error printed by the source or the destination qemu? It may be > a bug in libvirt for not explicitly requesting raw (we DO want the NBD > server to be raw, but need to be explicit so as to avoid unsafe probing). >This error was printed from the source in deed.> > > > >>From the error itself, I can tell that nbd server treat this image as > raw, > > rather than qcow2. My platform is libvirt+qemu. the image type of this vm > > is indeed qcow2. I do not know how to let nbd know this image format. > > Just because the underlying file on the disk is qcow2 does not impact > what the NBD is serving - the NBD connection MUST be raw, unless you > have a funky situation with a qcow2 file whose contents are also a > nested qcow2 encoding of data. >OK, I got it. Thanks! Ed> > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > >
Reasonably Related Threads
- Re: libvirt live migration, qcow2 image, nbd server
- libvirt live migration, qcow2 image, nbd server
- Re: libvirt live migration, qcow2 image, nbd server
- Re: Efficient live disk backup with active blockcommit : Failed 'block-commit': Could not reopen file: Permission denied
- Re: Efficient live disk backup with active blockcommit : Failed 'block-commit': Could not reopen file: Permission denied