qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 0/6] Efficient VM backup for qemu


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 0/6] Efficient VM backup for qemu
Date: Mon, 25 Feb 2013 14:20:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

Il 25/02/2013 13:59, Dietmar Maurer ha scritto:
>>>> unix sockets works with qemu nbd code?
>>>
>>> Sure.  nbd+unix:///exportname?socket=path is the new URI syntax, I
>>> honestly forgot the old one.  SCM_CREDENTIALS checks (qemu-nbd --pid
>>> or something like that) is not supported, but patches would be very welcome.
>>
>> Yes, this is better than my tcp suggestion.
> 
> I tried to use named exports, but get the following when I try to connect to 
> the nbd server:
> 
> nbd.c:nbd_receive_negotiate():L452: Receiving negotiation. name = ide0
> nbd.c:nbd_receive_negotiate():L476: Magic is NBDMAGIC
> nbd.c:nbd_receive_negotiate():L488: Magic is 0x420281861253
> nbd.c:nbd_receive_negotiate():L495: Checking magic (opts_magic)
> nbd.c:nbd_receive_negotiate():L497: Bad magic received
> 
> 
> Seems the server sends NBD_CLIENT_MAGIC, but the c lient expects 
> NBD_OPTS_MAGIC?

It means your server is not configured for named exports.  See the
protocol as described in nbd_send_negotiate:

       Negotiation header without options:
        [ 0 ..   7]   passwd       ("NBDMAGIC")
        [ 8 ..  15]   magic        (NBD_CLIENT_MAGIC)
        [16 ..  23]   size
        [24 ..  25]   server flags (0)
        [24 ..  27]   export flags
        [28 .. 151]   reserved     (0)

       Negotiation header with options, part 1:
        [ 0 ..   7]   passwd       ("NBDMAGIC")
        [ 8 ..  15]   magic        (NBD_OPTS_MAGIC)
        [16 ..  17]   server flags (0)

       part 2 (after options are sent):
        [18 ..  25]   size
        [26 ..  27]   export flags
        [28 .. 151]   reserved     (0)

So you're receiving the first kind instead of the second.

You can try it with QEMU's embedded NBD server.  (Of course it's
possible that there are bugs in the implementation).

Paolo




reply via email to

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