Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
When a domain with a host-model CPU is started, its CPU changes into a custom one and this custom CPU is stored within a snapshot taken while the domain is running. The inactive config still contains host-model CPU. But once we revert to the active snapshot, even the CPU in the inactive config changes into the custom one, which is wrong.
Version-Release number of selected component (if applicable):
libvirt-3.7.0
How reproducible:
100%
Steps to Reproduce:
1. define a domain with <cpu mode='host-model'/>
2. start the domain: virsh start $DOM
3. create a snapshot: virsh snapshot-create-as $DOM snap
4. revert to the new snapshot: virsh snapshot-revert $DOM snap
5. check inactive domain XML: virsh dumpxml --inactive $DOM
Actual results:
After each of the first three steps the inactive domain XML correctly contains the host-model CPU, but after step 4 the CPU in the inactive domain XML changes to the custom one from the snapshot.
Expected results:
The inactive XML should contain the host-model CPU in all steps, i.e., even after reverting the domain to the snapshot.
Additional info:
Do not confuse this issue with bug 1485022 which fixes an issue with an offline, i.e., inactive snapshot.
Reproduce this bug in the following components:
Version:
libvirt-3.7.0-1.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.18.x86_64
kernel-3.10.0-693.el7.x86_64
Steps:
1. prepare a shutdown VM with 'host-model' CPU configuration
# virsh domstate test1
shut off
# virsh dumpxml test1 --inactive | grep "<cpu" -A2
<cpu mode='host-model' check='partial'>
<model fallback='allow'/>
</cpu>
2. Start VM and check cpu configuration in inactive dumpxml
# virsh start test1
Domain test1 started
# virsh dumpxml test1 --inactive|grep "<cpu" -A2
<cpu mode='host-model' check='partial'>
<model fallback='allow'/>
</cpu>
3. Create internal snapshot for VM and check cpu configuration in inactive dumpxml
# virsh snapshot-create-as test1 snap1
Domain snapshot snap1 created
# virsh dumpxml test1 --inactive|grep "<cpu" -A2
<cpu mode='host-model' check='partial'>
<model fallback='allow'/>
</cpu>
4. Revert VM from internal snapshot and check cpu configuration in inactive dumpxml
# virsh snapshot-revert test1 snap1
# virsh dumpxml test1 --inactive|grep "<cpu" -A2
<cpu mode='custom' match='exact' check='full'>
<model fallback='forbid'>Opteron_G5</model>
<vendor>AMD</vendor>
...
As step-4 shows, the CPU configuration in inactive dumpxml changed after reverting from internal snapshot.