Bug 1692489
| Summary: | virt-install fails with "Storage pool not found: no storage pool with matching name 'default'" | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Christophe de Dinechin <dinechin> | |
| Component: | virt-manager | Assignee: | Cole Robinson <crobinso> | |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 8.0 | CC: | ehabkost, juzhou, knoel, mtessun, mzhan, toneata, tzheng, xiaodwan | |
| Target Milestone: | rc | Keywords: | ZStream | |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | virt-manager-2.2.0-1.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1714752 (view as bug list) | Environment: | ||
| Last Closed: | 2019-11-05 21:19:40 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1711806, 1714752 | |||
We narrowed this down after a debugging session. What happened was:
* The first virt-install invocation used --disk /var/lib/libvirt/images/some-preexisting-path.qcow2
* virt-install imports the parent directory /var/lib/libvirt/images as a pool, names it 'images' after the last directory bit
* next virt-install run uses --disk size=X
* virt-install tries to look up pool name=default. there is no pool named default
* next it tries to lookup a pool using the default path /var/lib/libvirt/images, finds pool name=images
* however it fails to return name=images up to caller, which then tries to blindly look up name=default, which throws the erro
This is fixed upstream now with:
commit a0ca387aad0fde19683aa8b5b5636add6455b8b4
Author: Cole Robinson <crobinso>
Date: Tue Mar 26 10:44:58 2019 -0400
cli: Fix pool=default when path belongs to another pool (bz 1692489)
I can reproduce this bug with build:
virt-manager-2.0.0-5.el8.noarch
Steps:
1. Remove default storage pool if it exists.
2. Define new storage pool that will point to the same directory as the default one with a different name then 'default:
# cat pool-images.xml
<pool type='dir'>
<name>images</name>
<target>
<path>/var/lib/libvirt/images</path>
</target>
</pool>
# virsh pool-define pool-images.xml
Pool images defined from pool-images.xml
# virsh pool-start images
Pool images started
3. Run virt-install command that will try to create new disk in default storage pool:
# virt-install --name def-disk --memory 512 --import --disk size=1
ERROR Error: --disk size=1: Storage pool not found: no storage pool with matching name 'default'
Then try to verify this bug with new build:
virt-install-2.2.0-2.el8.noarch
virt-manager-2.2.0-2.el8.noarch
libvirt-4.5.0-24.module+el8.1.0+3205+41ff0a42.x86_64
qemu-kvm-2.12.0-77.module+el8.1.0+3382+49219945.x86_64
Steps:
Rerun virt-install command that will try to create new disk in default storage pool:
# virt-install --name def-disk --memory 512 --import --disk size=1
WARNING No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.
Starting install...
Allocating 'def-disk.qcow2'
...
Result: No error reports, so I move this bug from ON_QA to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:3464 |
Description of problem: virt-install fails with: Storage pool not found: no storage pool with matching name 'default' Version-Release number of selected component (if applicable): virt-install.noarch 2.0.0-5.el8 @beaker-AppStream How reproducible: Always (with this image) Steps to Reproduce: Fresh install of RHEL-8.0.0-20190325.n.0 % yum module install virt % yum install virt-viewer virt-install virt-manager % virt-install -n rhel8 -r 4096 --vcpus 8 --disk size=20 -w type=direct,model=virtio,source=eno1 Actual results: Storage pool not found: no storage pool with matching name 'default' Expected results: virt-install should create the storage pool Additional info: Running with -debug: [root@virtlab605 ISO]# virt-install -n rhel8 -r 4096 --vcpus 8 --disk size=20 -w type=direct,model=virtio,source=eno1 ERROR Error: --disk size=20: Storage pool not found: no storage pool with matching name 'default' [root@virtlab605 ISO]# virt-install --debug -n rhel8 -r 4096 --vcpus 8 --disk size=20 -w type=direct,model=virtio,source=eno1 [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (cli:200) Launched with command line: /usr/share/virt-manager/virt-install --debug -n rhel8 -r 4096 --vcpus 8 --disk size=20 -w type=direct,model=virtio,source=eno1 [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (virt-install:243) Distilled --network options: ['type=direct,model=virtio,source=eno1'] [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (virt-install:159) Distilled --disk options: ['size=20'] [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (cli:214) Requesting libvirt URI default [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (cli:217) Received libvirt URI qemu:///system [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (cli:1195) Exception parsing inst=<DeviceDisk disk 140194183315408> optstr=size=20 Traceback (most recent call last): File "/usr/share/virt-manager/virtinst/cli.py", line 1181, in parse objs = self._parse(inst or self.guest) File "/usr/share/virt-manager/virtinst/cli.py", line 2033, in _parse poolobj = self.guest.conn.storagePoolLookupByName(poolname) File "/usr/lib64/python3.6/site-packages/libvirt.py", line 4699, in storagePoolLookupByName if ret is None:raise libvirtError('virStoragePoolLookupByName() failed', conn=self) libvirt.libvirtError: Storage pool not found: no storage pool with matching name 'default' [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (cli:253) File "/usr/share/virt-manager/virt-install", line 955, in <module> sys.exit(main()) File "/usr/share/virt-manager/virt-install", line 943, in main guest, installer = build_guest_instance(conn, options) File "/usr/share/virt-manager/virt-install", line 527, in build_guest_instance cli.parse_option_strings(options, guest, None) File "/usr/share/virt-manager/virtinst/cli.py", line 2813, in parse_option_strings parseret = parserobj.parse(inst, validate=not update) File "/usr/share/virt-manager/virtinst/cli.py", line 1198, in parse "options": self.optstr, "err": str(e)}) File "/usr/share/virt-manager/virtinst/cli.py", line 253, in fail logging.debug("".join(traceback.format_stack())) [Mon, 25 Mar 2019 12:52:26 virt-install 37995] ERROR (cli:254) Error: --disk size=20: Storage pool not found: no storage pool with matching name 'default' [Mon, 25 Mar 2019 12:52:26 virt-install 37995] DEBUG (cli:256) Traceback (most recent call last): File "/usr/share/virt-manager/virtinst/cli.py", line 1181, in parse objs = self._parse(inst or self.guest) File "/usr/share/virt-manager/virtinst/cli.py", line 2033, in _parse poolobj = self.guest.conn.storagePoolLookupByName(poolname) File "/usr/lib64/python3.6/site-packages/libvirt.py", line 4699, in storagePoolLookupByName if ret is None:raise libvirtError('virStoragePoolLookupByName() failed', conn=self) libvirt.libvirtError: Storage pool not found: no storage pool with matching name 'default' One attempt to virt-install with --import (not sure if it matters) Complete command history on this host since reimaging: 1 wget http://download-node-02.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8/compose/BaseOS/x86_64/images/rhel-guest-image-8.0-1839.x86_64.qcow2 2 yum module install virt 3 yum install virt-install 4 virt-install -n rhel8 -r 4096 --vcpus 8 --disk ./rhel-guest-image-8.0-1839.x86_64.qcow2 -w type=direct,model=virtio,source=eno1 --import 5 mv rhel-guest-image-8.0-1839.x86_64.qcow2 /var/lib/libvirt/images/ 6 cd /var/lib/libvirt/images/ 7 virt-install -n rhel8 -r 4096 --vcpus 8 --disk ./rhel-guest-image-8.0-1839.x86_64.qcow2 -w type=direct,model=virtio,source=eno1 --import 8 virsh list 9 virsh destroy rhel8 10 ls 11 virsh undefine rhel8 12 ls 13 yum install virt-viewer virt-manager 14 virt-install -n rhel8 -r 4096 --vcpus 8 --disk ./rhel-guest-image-8.0-1839.x86_64.qcow2 -w type=direct,model=virtio,source=eno1 --import --os-type linux --os-variant rhel8 15 osinfo-query os 16 osinfo-query os | grep rhel 17 virt-install -n rhel8 -r 4096 --vcpus 8 --disk ./rhel-guest-image-8.0-1839.x86_64.qcow2 -w type=direct,model=virtio,source=eno1 --import --os-type linux --os-variant rhel8.0 18 mkdir /ISO; mount virtlab202:/mnt/c3d_storage /ISO 19 vi /etc/fstab 20 mount /ISO/ 21 cd /ISO/ 22 wget http://download-node-02.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8/compose/BaseOS/x86_64/iso/RHEL-8.0.0-20190325.n.0-x86_64-dvd1.iso 23 setsebool -P virt_use_nfs 1 24 virt-install -n rhel8 -r 4096 --vcpus 8 --disk size=20 -w type=direct,model=virtio,source=eno1 --os-type linux --os-variant rhel8.0 25 cat /etc/os-release 26 virt-install -n rhel8 -r 4096 --vcpus 8 --disk size=20 -w type=direct,model=virtio,source=eno1 27 virt-install --debug -n rhel8 -r 4096 --vcpus 8 --disk size=20 -w type=direct,model=virtio,source=eno1 28 history