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 1942275 - Can not restore guest from a block device
Summary: Can not restore guest from a block device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks: 2001392
TreeView+ depends on / blocked
 
Reported: 2021-03-24 02:54 UTC by Lili Zhu
Modified: 2022-05-10 13:23 UTC (History)
8 users (show)

Fixed In Version: libvirt-7.8.0-1.module+el8.6.0+12978+7d7a0321
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2001392 (view as bug list)
Environment:
Last Closed: 2022-05-10 13:18:42 UTC
Type: Bug
Target Upstream Version: 6.6.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:1759 0 None None None 2022-05-10 13:19:52 UTC

Description Lili Zhu 2021-03-24 02:54:02 UTC
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.

Comment 2 Michal Privoznik 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 6 Lili Zhu 2021-11-03 13:37:47 UTC
Verify this bug with:
libvirt-7.8.0-1.module+el8.6.0+12978+7d7a0321.x86_64
qemu-kvm-6.1.0-3.module+el8.6.0+12952+612d1b20.x86_64

Verification steps are the same with that in comment #0, guest can be restored from the block device, mark the bug as verified.

Comment 8 errata-xmlrpc 2022-05-10 13:18:42 UTC
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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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-2022:1759


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