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

Re: [libvirt] [PATCH 2/2] util: storage: add JSON backing volume parser 'raw' block driver



The patches compile.

I looked at both commits and they at least superficially seem
sensible.  I'm not intimately familiar enough with the original code
to review this fully.

However I want to try to test this using libguestfs.  I believe the
following test case should be sufficient:

  $ cd /var/tmp
  $ truncate -s 1M backing.img
  $ qemu-img create \
      -b 'json:{"driver":"raw", "file":{"filename":"/var/tmp/backing.img"}}' \
      -f qcow2 overlay.qcow2
  $ guestfish -a /var/tmp/overlay.qcow2 run
  libguestfs: error: could not create appliance through libvirt.
  
  Try running qemu directly without libvirt using this environment variable:
  export LIBGUESTFS_BACKEND=direct
  
  Original error from libvirt: invalid argument: JSON backing volume defintion '{"driver":"raw", "file":{"filename":"/var/tmp/backing.img"}}' lacks driver name [code=8 int1=-1]

But with libvirt built with your patches:

  $ killall libvirtd
  $ ../libvirt/run guestfish -a /var/tmp/overlay.qcow2 run
  libguestfs: error: could not create appliance through libvirt.
  
  Try running qemu directly without libvirt using this environment variable:
  export LIBGUESTFS_BACKEND=direct
  
  Original error from libvirt: invalid argument: JSON backing volume defintion '{"driver":"raw","file":{"filename":"/var/tmp/backing.img"}}' lacks driver name [code=8 int1=-1]

It could be that my test case is wrong in some way.  I enabled
debugging and it does appear to be using the new version of libvirt,
so I'm not sure what's up ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org


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