virt-manager local directory storage failing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
Medium
|
Christian Ehrhardt | ||
Groovy |
Fix Released
|
Medium
|
Unassigned | ||
virt-manager (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* An upstream change in libvirt 6.6 [1] broke the logic of creating a
pool without an explicit yes/no for COW handling.
* Another upstream patch in libvirt 6.7 [2] fixes the issue.
* Backport the patch to avoid issues with tools like virt-manager but
also with any other automation that uses define+build via api or
cmdline
[1]: https:/
[2]: https:/
[Test Case]
* Define a dir pool and call pool-build:
$ virsh pool-define-as --name home --type dir --target /home --print-xml > home.xml
$ virsh pool-define home.xml
$ virsh pool-build home
error: Failed to build pool home
error: unable to control COW flag on '/home', not btrfs: Function not implemented
$ virsh pool-start home
With the fix (and with e.g. 6.0 in Focal) this works, but with libvirt 6.6 missing the fix it fails as shown above.
[Regression Potential]
* Gladly a one line change there aren't many side effects to consider.
It will help a certain set of use-cases and if anything could influence
actual execution on filesystems with COW support in that case btrfs.
Now one might think "but hey this influences BTRFS behavior", but no it
does not. The change is inside an "if btrfs magic" section. Therefore
BTRFS will not change, only the non-btrfs cases (formerly broken) will.
This is one of the rare cases I really fail to see an explicit
regression - implicit ones e.g. due to needing a rebuild could still
happen.
[Other Info]
* This is upstream issue:
https:/
--- ---
Installed KVM and Virt-Manager successfully.
When trying to add storage pool as local directory on my ext4 file system, I get this error:
Error creating pool: Could not build storage pool: unable to control COW flag on '/var/lib/
Traceback (most recent call last):
File "/usr/share/
callback(
File "/usr/share/
poolobj = pool.install(
File "/usr/share/
raise RuntimeError(
RuntimeError: Could not build storage pool: unable to control COW flag on '/var/lib/
It seems that virt-manager is trying to disable the COW flag and returns an error because my file system is not BTRFS.
Tested on 2 fresh installs of Ubuntu Studio 20.10
Tested on 1 install of Ubuntu 20.04.1 and virt-manager has no issues with local storage on ext4 file system.
ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: virt-manager 1:2.2.1-4ubuntu2
ProcVersionSign
Uname: Linux 5.8.0-25-lowlatency x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu50
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
Date: Sat Oct 24 02:15:08 2020
InstallationDate: Installed on 2020-10-07 (16 days ago)
InstallationMedia: Ubuntu-Studio 20.10 "Groovy Gorilla" - Beta amd64 (20200930)
PackageArchitec
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Sergio Durigan Junior (community): Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 73 lines (+51/-0)3 files modifieddebian/changelog (+8/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-1901242-util-Fix-logic-in-virFileSetCOW.patch (+42/-0)
- Sergio Durigan Junior (community): Approve
- Canonical Server packageset reviewers: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 73 lines (+51/-0)3 files modifieddebian/changelog (+8/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-1901242-util-Fix-logic-in-virFileSetCOW.patch (+42/-0)
Changed in libvirt (Ubuntu): | |
assignee: | nobody → Christian Ehrhardt (paelzer) |
tags: | added: server-next |
description: | updated |
Interesting workaround found to keep using virt-manager:
1. Install cockpit-machines /localhost: 9090
2. Login to https:/
3. Create the storage pool from cockpit, on same ext4 file system
The storage pool is added successfully, and immediately available on virt-manager too.