Hey all,
I''m having trouble using blktap2 qcow2 with Xen. I currently have a Xen
4.2.2 built in a RHEL6 environment with a 3.4 Dom0 kernel from Centos,
which is supposed to have the blktap2 support with qcow2 (and does, sort
of), along with other nice goodies of a new kernel. Libvirt version
0.10.2.4 is also being used, which is specifically built for Xen.
First, the good news - qcow2 images work when launching a VM using xl.
If I stop the xend service and boot the VM using the xl command with a
tap2:qcow2 disk, it will boot without any issues. The problem is if I
try to use the exact same hvm config file with xm (xend running of
course), it will fail with: Error: (''create'',
''-aqcow2:/home/Centos_63_nvidia.qcow2'') failed (512  ) The
config disk
spec is below and the full traceback error in the xend.log is given at
the end of the email.
disk = [ ''tap2:qcow2:/home/Centos_63_nvidia.qcow2,xvda,w'' ]
While I''m fine using xl command line versus xm, the real problem I have
is the same situation arises with using libvirt, which is a necessity
for my work. Using the libvirt xml for the disk given below, I get the
exact same error as when using xend/xm command.
<disk type=''file'' device=''disk''>
      <driver name=''tap'' type=''qcow2''
/>
      <source file=''/home/Centos_63_nvidia.qcow2''/>
      <target dev=''xvda'' bus=''xen''/>
</disk>
I was told via IRC chats that there is a way to enable qcow2 images with
Libvirt and (tangentially) xm, but I have yet to find a solution. Does
anybody have any help or advice for enabling qcow2 Xen images in libvirt?
Thanks,
Andrew
[2013-07-10 14:49:31 7634] ERROR (XendDomainInfo:108) Domain
construction failed
Traceback (most recent call last):
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 106, in create
    vm.start()
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendTask.py", line
209, in log_progress
    retval = func(*args, **kwds)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2920, in _initDomain
    self._createDevices()
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2365, in _createDevices
    devid = self._createDevice(devclass, config)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2327, in _createDevice
    return self.getDeviceController(deviceClass).createDevice(devConfig)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/server/BlktapController.py",
line
174, in createDevice
    device = TapdiskController.create(params, file)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/server/BlktapController.py",
line
286, in create
    return TapdiskController.exc(''create'',
''-a%s:%s'' % (dtype, image))
  File
"/usr/lib64/python2.6/site-packages/xen/xend/server/BlktapController.py",
line
233, in exc
    (args, rc, out, err))
TapdiskException: (''create'',
''-aqcow2:/home/Centos_63_nvidia.qcow2'')
failed (512  )
[2013-07-10 14:49:31 7634] ERROR (xmlrpclib2:181) Internal error
handling xend.domain.create
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/xen/util/xmlrpclib2.py",
line
134, in _marshaled_dispatch
    response = self._dispatch(method, params)
  File "/usr/lib64/python2.6/SimpleXMLRPCServer.py", line 418, in
_dispatch
    return func(*params)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/server/XMLRPCServer.py",
line 80, in domain_create
    info = XendDomain.instance().domain_create(config)
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendDomain.py",
line
1001, in domain_create
    dominfo = XendDomainInfo.create(config)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 106, in create
    vm.start()
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 474, in start
    XendTask.log_progress(31, 60, self._initDomain)
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendTask.py", line
209, in log_progress
    retval = func(*args, **kwds)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2920, in _initDomain
    self._createDevices()
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2365, in _createDevices
    devid = self._createDevice(devclass, config)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2327, in _createDevice
    return self.getDeviceController(deviceClass).createDevice(devConfig)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/server/BlktapController.py",
line
174, in createDevice
    device = TapdiskController.create(params, file)
  File
"/usr/lib64/python2.6/site-packages/xen/xend/server/BlktapController.py",
line
286, in create
    return TapdiskController.exc(''create'',
''-a%s:%s'' % (dtype, image))
  File
"/usr/lib64/python2.6/site-packages/xen/xend/server/BlktapController.py",
line
233, in exc
    (args, rc, out, err))
TapdiskException: (''create'',
''-aqcow2:/home/Centos_63_nvidia.qcow2'')
failed (512  )
-- 
Andrew J. Younge
Information Sciences Institute
University of Southern California