Bug 243395 - deskutils/virt-manager cannot create a Xen guest: libvirt.libvirtError: cannot fill file '/var/lib/libvirt/images/debian10.img': Invalid argument
Summary: deskutils/virt-manager cannot create a Xen guest: libvirt.libvirtError: canno...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Roman Bogorodskiy
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-01-16 17:01 UTC by Stefan Parvu
Modified: 2022-06-24 00:45 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (novel)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Parvu 2020-01-16 17:01:02 UTC
Im trying to use virt-manager on FreeBSD 12.1 with Xen 4.12.1. I simple trying tom create a Debian 10 amd64 guest using virt-manager. I get this error when trying to create a guest:

Unable to complete install: 'Couldn't create storage volume 'debian10.img': 'cannot fill file '/var/lib/libvirt/images/debian10.img': Invalid argument''

Traceback (most recent call last):
  File "/usr/local/share/virt-manager/virtinst/storage.py", line 682, in install
    vol = self.pool.createXML(xml, createflags)
  File "/usr/local/lib/python3.7/site-packages/libvirt.py", line 3429, in createXML
    if ret is None:raise libvirtError('virStorageVolCreateXML() failed', pool=self)
libvirt.libvirtError: cannot fill file '/var/lib/libvirt/images/debian10.img': Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/local/share/virt-manager/virtManager/createvm.py", line 2089, in _do_async_install
    guest.installer_instance.start_install(guest, meter=meter)
  File "/usr/local/share/virt-manager/virtinst/install/installer.py", line 536, in start_install
    dev.build_storage(meter)
  File "/usr/local/share/virt-manager/virtinst/devices/disk.py", line 769, in build_storage
    vol_object = self._storage_backend.create(meter)
  File "/usr/local/share/virt-manager/virtinst/diskbackend.py", line 630, in create
    return self._vol_install.install(meter=progresscb)
  File "/usr/local/share/virt-manager/virtinst/storage.py", line 692, in install
    "'%s': '%s'" % (self.name, str(e)))
RuntimeError: Couldn't create storage volume 'debian10.img': 'cannot fill file '/var/lib/libvirt/images/debian10.img': Invalid argument'


The user which has started virt-manager has permissions to write udner /var/lib/libvirt/images without any problems. 

the only workaround is to create a raw image using dd and then use that under virt-manager. But the question is why I cannot create the image using virt-manager ?