RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2001392 - Can not restore guest from a block device
Summary: Can not restore guest from a block device
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On: 1942275
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-05 23:48 UTC by John Ferlan
Modified: 2021-09-09 11:13 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1942275
Environment:
Last Closed: 2021-09-09 11:13:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-96264 0 None None None 2021-09-05 23:49:50 UTC

Description John Ferlan 2021-09-05 23:48:45 UTC
+++ This bug was initially created as a clone of Bug #1942275 +++

Description of problem:
Can not restore guest from a block device

Version-Release number of selected component (if applicable):
libvirt-6.0.0-35.module+el8.4.0+10230+7a9b21e4.x86_64
qemu-kvm-4.2.0-48.module+el8.4.0+10368+630e803b.x86_64
selinux-policy-3.14.3-67.el8.noarch

How reproducible:
100%

Steps to Reproduce:
1. prepare a block device
# lsblk
NAME                            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                               8:0    0   223G  0 disk
├─sda1                            8:1    0     1G  0 part /boot
└─sda2                            8:2    0   222G  0 part
  ├─rhel_dell--per6415--04-root 253:0    0    70G  0 lvm  /
  ├─rhel_dell--per6415--04-swap 253:1    0  11.7G  0 lvm  [SWAP]
  └─rhel_dell--per6415--04-home 253:2    0 140.3G  0 lvm  /home
sdb                               8:16   0    20G  0 disk

2. check selinux mode
# getenforce 
Enforcing

3. save the guest to the block device
# virsh save avocado-vt-vm1 /dev/sdb

Domain avocado-vt-vm1 saved to /dev/sdb

4. check the context of sdb
# ll -aZ /dev/sdb
brw-rw----. 1 root root system_u:object_r:svirt_image_t:s0:c713,c725 8, 16 Mar 23 22:29 /dev/sdb

5. restore the guest from the block device
# virsh restore /dev/sdb
error: Failed to restore domain from /dev/sdb
error: internal error: child reported (status=125): unable to set security context 'system_u:object_r:virt_content_t:s0' on '/dev/sdb': No such file or directory
 
Expected results:
guest can be restored


Additional info:
when put put namespaces = [] in qemu.conf, it works well.
The same with Bug #1772838, difference is just the error msg.

--- Additional comment from Peter Krempa on 2021-03-24 08:06:04 UTC ---

It seems that the issue was already fixed upstream. Targetting to rhel-8.6 which will be rebased.

--- Additional comment from Michal Privoznik on 2021-03-24 08:40:29 UTC ---

Right, I think this was fixed upstream as:

https://gitlab.com/libvirt/libvirt/-/commit/824e349397b1f1fa5d7c1c5d21c88e04df21bf17

which aimed to fix bug 1851016.

Comment 1 Jiri Denemark 2021-09-09 11:13:04 UTC
This bug was never present in RHEL-9 (beta).


Note You need to log in before you can comment on or make changes to this bug.