Public bug reported: virt-sysprep can't seem to access a libvirt-managed guest image: $ virt-clone --auto-clone --original <some domain> --name test-domain Allocating 'test-domain.img'
Clone 'test-domain' created successfully. $ virt-sysprep -d test-domain [ 0.0] Examining the guest ... virt-sysprep: error: libguestfs error: /var/lib/libvirt/images/test-domain.img: Permission denied If reporting bugs, run virt-sysprep with debugging enabled and include the complete output: virt-sysprep -v -x [...] I don't believe it's a livbvirt/user permission issue as the domain can be started just fine: $ virsh start test-domain Domain test-domain started And the full output as requested: $ virt-sysprep -v -x -d test-domain [ 0.0] Examining the guest ... libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: set_network false libguestfs: trace: set_network = 0 libguestfs: trace: add_domain "test-domain" "readonly:false" "allowuuid:true" "readonlydisk:ignore" "discard:besteffort" libguestfs: opening libvirt handle: URI = NULL, auth = default+wrapper, flags = 0 libguestfs: successfully opened libvirt handle: conn = 0x55bfd8f36030 libguestfs: trace: add_libvirt_dom (virDomainPtr)0x55bfd8f3ad00 "readonlydisk:ignore" "discard:besteffort" libguestfs: original domain XML:\n<domain type='kvm'>\n <name>test-domain</name>\n <uuid>d94e3efb-3baa-4457-bc45-833504774f43</uuid>\n <memory unit='KiB'>2097152</memory>\n <currentMemory unit='KiB'>2097152</currentMemory>\n <vcpu placement='static'>2</vcpu>\n <resource>\n <partition>/machine</partition>\n </resource>\n <os>\n <type arch='x86_64' machine='pc-i440fx-5.0'>hvm</type>\n <boot dev='hd'/>\n </os>\n <features>\n <acpi/>\n <apic/>\n <pae/>\n </features>\n <cpu mode='host-model' check='partial'>\n <topology sockets='1' dies='1' cores='1' threads='2'/>\n </cpu>\n <clock offset='utc'/>\n <on_poweroff>destroy</on_poweroff>\n <on_reboot>restart</on_reboot>\n <on_crash>destroy</on_crash>\n <devices>\n <emulator>/usr/bin/kvm-spice</emulator>\n <disk type='file' device='disk'>\n <driver name='qemu' type='qcow2'/>\n <source file='/var/lib/libvirt/images/test-domain.img'/>\n <target dev='vda' bus='virtio'/>\n <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>\n </disk>\n <controller type='usb' index='0' model='piix3-uhci'>\n <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>\n </controller>\n <controller type='pci' index='0' model='pci-root'/>\n <interface type='network'>\n <mac address='52:54:00:9c:9f:b7'/>\n <source network='default'/>\n <model type='virtio'/>\n <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>\n </interface>\n <serial type='pty'>\n <target type='isa-serial' port='0'>\n <model name='isa-serial'/>\n </target>\n </serial>\n <console type='pty'>\n <target type='serial' port='0'/>\n </console>\n <input type='mouse' bus='ps2'/>\n <input type='keyboard' bus='ps2'/>\n <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>\n <listen type='address' address='127.0.0.1'/>\n </graphics>\n <video>\n <model type='cirrus' vram='16384' heads='1' primary='yes'/>\n <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>\n </video>\n <memballoon model='virtio'>\n <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>\n </memballoon>\n </devices>\n</domain>\n libguestfs: trace: clear_backend_setting "internal_libvirt_norelabel_disks" libguestfs: trace: clear_backend_setting = 0 libguestfs: disk[0]: filename: /var/lib/libvirt/images/test-domain.img libguestfs: trace: add_drive "/var/lib/libvirt/images/test-domain.img" "readonly:false" "format:qcow2" "discard:besteffort" libguestfs: trace: add_drive = -1 (error) libguestfs: trace: add_libvirt_dom = -1 (error) libguestfs: trace: add_domain = -1 (error) virt-sysprep: error: libguestfs error: /var/lib/libvirt/images/test-domain.img: Permission denied libguestfs: trace: close libguestfs: closing guestfs handle 0x55bfd8f2fae0 (state 0) ** Affects: libguestfs (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1935815 Title: virt-sysprep: /var/lib/libvirt/images/test-domain.img: Permission denied To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1935815/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs