virt-clone fails with: Unknown driver 'iso'

Bug #1729858 reported by Juerg Haefliger
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Zesty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * unable to use util storage users (like virt-clone) to process iso files
   through qemu-img

 * an example is "virt-clone -o test-vm -n cloned-vm --auto-clone"

 * Fix by backporting upstream fix

[Test Case]

 * UVT Based test
    $ uvt-simplestreams-libvirt sync release=xenial arch=amd64
    $ uvt-kvm create test-vm release=xenial arch=amd64
    $ virsh destroy test-vm
    $ virt-clone -o test-vm -n cloned-vm --auto-clone

[Regression Potential]

 * This fix is upstream a while now, so it should be fairly safe.
   In general any user of virStorageBackendCreateQemuImgCmdFromVol could
   be affected (that is the function we change the behavior).
   It's purpose is to convert a volume to a qemu-img call (to clone it).
   Without the fix some image types fail.
   - users cloning type iso today fail, this is fixed by the change
   - the change does not effect other types than "iso"
   - there is only one user of this function (in the same file, so not too
     much alternative ways to invoke we have to consider).

[Other Info]

 * n/a

----

Cloning a uvt VM fails with error: Unknown driver 'iso'

To reproduce:

uvt-simplestreams-libvirt sync release=xenial arch=amd64
uvt-kvm create test-vm release=xenial arch=amd64
virsh destroy test-vm
virt-clone -o test-vm -n cloned-vm --auto-clone

Which results in:

WARNING The requested volume capacity will exceed the available pool space when the volume is fully allocated. (8192 M requested capacity > 3898 M available)
Allocating 'cloned-vm.qcow' | 8.0 GB 00:00:01
ERROR Couldn't create storage volume 'test-vm-ds-clone.qcow': 'internal error: Child process (/usr/bin/qemu-img convert -f iso -O iso /var/lib/uvtool/libvirt/images/test-vm-ds.qcow /var/lib/uvtool/libvirt/images/test-vm-ds-clone.qcow) unexpected exit status 1: qemu-img: Could not open '/var/lib/uvtool/libvirt/images/test-vm-ds.qcow': Unknown driver 'iso'
'

Revision history for this message
Juerg Haefliger (juergh) wrote :
Revision history for this message
Juerg Haefliger (juergh) wrote :

Backported and tested patch attached.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-storage-Don-t-pass-iso-format-to-qemu-img.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Jürg,
thanks for using the tool - I rarely do so I appreciate your testing.
Furthermore identifying the fix is nice.

So this went into libvirt in 3.2, so >=Artful is fixed.

Changed in libvirt (Ubuntu Xenial):
status: New → Triaged
Changed in libvirt (Ubuntu Zesty):
status: New → Triaged
Changed in libvirt (Ubuntu):
status: New → Fix Released
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

SRUs for Xenial and Zesty, testing the applicability of the patch and if it works in these ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Using the backport done by Jürg, slight adaptions for Zesty but all fine I think.
Now doing Test builds in ppa's and making the SRU template ready while that is going on.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Waiting for the test builds to be complete and testable (likely tmrw) before continuing.

description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Tested for this bug from https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3027
Worked for zesty and xenial with the fix as Jürg had already initially reported (was still worth to check before upload).

Basic (single arch) regression check on the ppa done as well to ensure we are not accidentally regress on another part due to the change.

That said, all is ready uploading into -unapproved for the SRU team to review.

Changed in libvirt (Ubuntu Xenial):
status: Triaged → In Progress
Changed in libvirt (Ubuntu Zesty):
status: Triaged → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Juerg, or anyone else affected,

Accepted libvirt into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/1.3.1-1ubuntu10.15 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Changed in libvirt (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed-zesty
Revision history for this message
Chris J Arges (arges) wrote :

Hello Juerg, or anyone else affected,

Accepted libvirt into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/2.5.0-3ubuntu5.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

root@xenial-test:~# virsh list --all
 Id Name State
----------------------------------------------------
 - test-vm shut off

root@xenial-test:~# virt-clone -o test-vm -n cloned-vm --auto-clone
Allocating 'cloned-vm.qcow' | 8.0 GB 00:00:03
ERROR Couldn't create storage volume 'test-vm-ds-clone.qcow': 'internal error: Child process (/usr/bin/qemu-img convert -f iso -O iso /var/lib/uvtool/libvirt/images/test-vm-ds.qcow /var/lib/uvtool/libvirt/images/test-vm-ds-clone.qcow) unexpected exit status 1: qemu-img: Could not open '/var/lib/uvtool/libvirt/images/test-vm-ds.qcow': Unknown driver 'iso'
'
root@xenial-test:~# vim /etc/apt/sources.list
root@xenial-test:~# apt update &> /dev/null
root@xenial-test:~# apt install libvirt-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libvirt0
Suggested packages:
  radvd
The following packages will be upgraded:
  libvirt-bin libvirt0
2 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
Need to get 3544 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 libvirt-bin amd64 1.3.1-1ubuntu10.15 [2417 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 libvirt0 amd64 1.3.1-1ubuntu10.15 [1127 kB]
Fetched 3544 kB in 1s (1914 kB/s)
(Reading database ... 44195 files and directories currently installed.)
Preparing to unpack .../libvirt-bin_1.3.1-1ubuntu10.15_amd64.deb ...
Unpacking libvirt-bin (1.3.1-1ubuntu10.15) over (1.3.1-1ubuntu10.14) ...
Preparing to unpack .../libvirt0_1.3.1-1ubuntu10.15_amd64.deb ...
Unpacking libvirt0:amd64 (1.3.1-1ubuntu10.15) over (1.3.1-1ubuntu10.14) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up libvirt0:amd64 (1.3.1-1ubuntu10.15) ...
Setting up libvirt-bin (1.3.1-1ubuntu10.15) ...
Setting up libvirt-bin dnsmasq configuration.
Processing triggers for libc-bin (2.23-0ubuntu9) ...
root@xenial-test:~# virt-clone -o test-vm -n cloned-vm --auto-clone
Allocating 'cloned-vm-1.qcow' | 8.0 GB 00:00:06
Allocating 'test-vm-ds-clone.qcow' | 366 kB 00:00:00

Clone 'cloned-vm' created successfully.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (3.7 KiB)

root@zesty-test:~# virsh list --all
 Id Name State
----------------------------------------------------
 - test-vm shut off

root@zesty-test:~# virt-clone -o test-vm -n cloned-vm --auto-clone
Allocating 'cloned-vm.qcow' | 8.0 GB 00:00:04
ERROR Couldn't create storage volume 'test-vm-ds-clone.qcow': 'internal error: Child process (/usr/bin/qemu-img convert -f iso -O iso /var/lib/uvtool/libvirt/images/test-vm-ds.qcow /var/lib/uvtool/libvirt/images/test-vm-ds-clone.qcow) unexpected exit status 1: qemu-img: Could not open '/var/lib/uvtool/libvirt/images/test-vm-ds.qcow': Unknown driver 'iso'
'
root@zesty-test:~# vim /etc/apt/sources.list
root@zesty-test:~# apt update &> /dev/null
root@zesty-test:~# apt install libvirt-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libvirt-clients libvirt-daemon libvirt-daemon-system libvirt0
Suggested packages:
  numad radvd auditd systemtap nfs-common zfsutils pm-utils
The following packages will be upgraded:
  libvirt-bin libvirt-clients libvirt-daemon libvirt-daemon-system libvirt0
5 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
Need to get 3949 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 libvirt-daemon-system amd64 2.5.0-3ubuntu5.6 [142 kB]
Get:2 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 libvirt-clients amd64 2.5.0-3ubuntu5.6 [579 kB]
Get:3 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 libvirt-daemon amd64 2.5.0-3ubuntu5.6 [2042 kB]
Get:4 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 libvirt0 amd64 2.5.0-3ubuntu5.6 [1181 kB]
Get:5 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 libvirt-bin amd64 2.5.0-3ubuntu5.6 [4784 B]
Fetched 3949 kB in 1s (2669 kB/s)
Preconfiguring packages ...
(Reading database ... 46378 files and directories currently installed.)
Preparing to unpack .../libvirt-daemon-system_2.5.0-3ubuntu5.6_amd64.deb ...
Unpacking libvirt-daemon-system (2.5.0-3ubuntu5.6) over (2.5.0-3ubuntu5.5) ...
Preparing to unpack .../libvirt-clients_2.5.0-3ubuntu5.6_amd64.deb ...
Unpacking libvirt-clients (2.5.0-3ubuntu5.6) over (2.5.0-3ubuntu5.5) ...
Preparing to unpack .../libvirt-daemon_2.5.0-3ubuntu5.6_amd64.deb ...
Unpacking libvirt-daemon (2.5.0-3ubuntu5.6) over (2.5.0-3ubuntu5.5) ...
Preparing to unpack .../libvirt0_2.5.0-3ubuntu5.6_amd64.deb ...
Unpacking libvirt0:amd64 (2.5.0-3ubuntu5.6) over (2.5.0-3ubuntu5.5) ...
Preparing to unpack .../libvirt-bin_2.5.0-3ubuntu5.6_amd64.deb ...
Unpacking libvirt-bin (2.5.0-3ubuntu5.6) over (2.5.0-3ubuntu5.5) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libvirt0:amd64 (2.5.0-3ubuntu5.6) ...
Setting up libvirt-daemon (2.5.0-3ubuntu5.6) ...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Processing triggers for systemd (232-21ubuntu7.1) ...
Processing triggers for man-db (2.7....

Read more...

tags: added: verification-done verification-done-zesty
removed: verification-needed verification-needed-zesty
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

@paelzer,

We are seeing problems on Xenial when upgrading from -10.14 to -10.15

root@xxx:~# apt-get install libvirt-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libvirt0
Suggested packages:
policykit-1 apparmor radvd
Recommended packages:
libxml2-utils pm-utils
The following packages will be upgraded:
libvirt-bin libvirt0
2 upgraded, 0 newly installed, 0 to remove and 42 not upgraded.
Need to get 3544 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 libvirt-bin amd64 1.3.1-1ubuntu10.15 [2417 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 libvirt0 amd64 1.3.1-1ubuntu10.15 [1127 kB]
Fetched 3544 kB in 0s (8712 kB/s)
(Reading database ... 98926 files and directories currently installed.)
Preparing to unpack .../libvirt-bin_1.3.1-1ubuntu10.15_amd64.deb ...
Unpacking libvirt-bin (1.3.1-1ubuntu10.15) over (1.3.1-1ubuntu10.14) ...
Preparing to unpack .../libvirt0_1.3.1-1ubuntu10.15_amd64.deb ...
Unpacking libvirt0:amd64 (1.3.1-1ubuntu10.15) over (1.3.1-1ubuntu10.14) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up libvirt0:amd64 (1.3.1-1ubuntu10.15) ...
Setting up libvirt-bin (1.3.1-1ubuntu10.15) ...
A dependency job for virtlogd.service failed. See 'journalctl -xe' for details.
invoke-rc.d: initscript virtlogd, action "start" failed.
* virtlogd.service - Virtual machine log manager
Loaded: loaded (/lib/systemd/system/virtlogd.service; indirect; vendor preset: enabled)
Active: active (running) since Tue 2017-11-07 18:08:30 CET; 2 days ago
Docs: man:virtlogd(8)
http://libvirt.org
Main PID: 5729 (virtlogd)
CGroup: /system.slice/virtlogd.service
`-5729 /usr/sbin/virtlogd

Nov 07 18:19:59 xxx virtlogd[5729]: End of file while reading data: Input/output error
Nov 07 18:20:04 xxx virtlogd[5729]: End of file while reading data: Input/output error
Nov 07 18:25:35 xxx virtlogd[5729]: End of file while reading data: Input/output error
Nov 07 18:37:05 xxx virtlogd[5729]: Cannot open log file: '/var/log/libvirt/qemu/xxx.log': Device or resource busy
Nov 07 18:37:05 xxx virtlogd[5729]: End of file while reading data: Input/output error
Nov 07 18:37:09 xxx virtlogd[5729]: End of file while reading data: Input/output error
Nov 10 12:51:46 xxx systemd[1]: Reloading Virtual machine log manager.
Nov 10 12:51:46 xxx systemd[1]: Reloaded Virtual machine log manager.
Nov 10 12:51:47 xxx systemd[1]: Dependency failed for Virtual machine log manager.
Nov 10 12:51:47 xxx systemd[1]: virtlogd.service: Job virtlogd.service/start failed with result 'dependency'.
dpkg: error processing package libvirt-bin (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
libvirt-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: [Bug 1729858] Re: virt-clone fails with: Unknown driver 'iso'

Hi Jorge,
we have discussed about this issue before the SRU referenced here.
And given the changes it is in no way related to the current in flight
SRU update.

Please follow the recommendations to debug/analyze I have given via
IRC and open a new bug for it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.3.1-1ubuntu10.15

---------------
libvirt (1.3.1-1ubuntu10.15) xenial; urgency=medium

  * d/p/storage-Don-t-pass-iso-format-to-qemu-img.patch: fix issues in virt
    clone and other users of storage_utils functions by not passing
    iso to qemu-img (LP: #1729858).

 -- Christian Ehrhardt <email address hidden> Mon, 06 Nov 2017 16:36:11 +0100

Changed in libvirt (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for libvirt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 2.5.0-3ubuntu5.6

---------------
libvirt (2.5.0-3ubuntu5.6) zesty; urgency=medium

  * d/p/storage-Don-t-pass-iso-format-to-qemu-img.patch: fix issues in virt
    clone and other users of storage_utils functions by not passing
    iso to qemu-img (LP: #1729858).

 -- Christian Ehrhardt <email address hidden> Mon, 06 Nov 2017 16:31:48 +0100

Changed in libvirt (Ubuntu Zesty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.