Created attachment 1748797 [details] vm xml config before and after restore Description of problem: After restore, vm has warning Pending virtual machine changes : cluster cpu type Version-Release number of selected component (if applicable): ovirt 4.4.3 Red Hat Virtualization Host 4.4.3 (el8.3) 4.18.0 - 240.1.1.el8_3.x86_64 KVM Version:5.1.0 - 14.module+el8.3.0+8438+644aff69 LIBVIRT Version:libvirt-6.6.0-7.module+el8.3.0+8424+5ea525c5 VDSM Version:vdsm-4.40.35.1-1.el8ev How reproducible: Steps to Reproduce: 1.Backup vm and delete it. 2.Create new vm from backup OVF 3.Restore all required data Actual results: Chipset and CPU showed as cluster default, but vm has warning about incorrect CPU type Expected results: Vm without warning Additional info: if manually change chipset or CPU type warning is gone
It doesn't mean the CPU type is incorrect, it means that the cluster CPU type has changed and the VM is running with the previous setting.
I closed it since that's the expected behaviour but of course, if you haven't made any change to the cluster and don't see why its CPU type has changed, feel free to open. In that case, I'd suggest first to restore the VM from the backup and run it - to see if this message appears when there's no change to the cluster.
Hello, Arik. > I closed it since that's the expected behaviour but of course, if you haven't made any change to the cluster and don't see why its CPU type has changed, feel free to open. > In that case, I'd suggest first to restore the VM from the backup and run it - to see if this message appears when there's no change to the cluster. Yes, i don't made any changes. And after vm reboot this warning still present.
OK, so please provide engine.log and either database dump or the output of 1. select name, cpu_name, cpu_flags from cluster; 2. select vm_guid, vm_name, cpu_name from vms; Thanks!
Created attachment 1749154 [details] logs and configuration screen
Thanks, and can you please provide the output of (assuming the vm is def-cent82): select cpu_name, cluster_cpu_verb from vms where vm_name='def-cent82';
Hello, Arik. [root@pan-rhv44man ~]# psql engine -U engine -c "select cpu_name, cluster_cpu_verb from vms where vm_name='def-cent82'" cpu_name | cluster_cpu_verb ----------+------------------ | SandyBridge
Hi Yury, Was that output taken while the VM is running?
yes
OK, so that explains it but I can't reproduce that. Can you please provide the whole configuration of that VM using: select * from vms where vm_name='def-cent82'
Created attachment 1749683 [details] vm query output Hello, Arik. query output in attach
Thanks Yury, now it's clear. Looking at the configuration of the running VM, it's not only the CPU name that is missing but also other fields like boot_time and runtime_name. This can be explained by the log: 2021-01-18 12:22:32,268+01 INFO [org.ovirt.engine.core.vdsbroker.monitoring.VmAnalyzer] (ForkJoinPool-1-worker-25) [5b62fe8a] VM 'ff8e01d6-f781-4bee-9bfa-1ec3ec87713f'(def-cent82) was unexpectedly detected as 'PoweringUp' on VDS '9d30eb4c-c4d9-4eec-bc1f-d49cd225e200'(pan-rhv44rel2) (expected on 'null') When we run the VM, the engine changes few fields like cpu_name, boot_time, runtime_name, then calls VDSM to run the VM and if the call succeeds, it stores the updated configuration in the database. But in this case, those updates are overridden by the monitoring. 1. The monitoring reads the VM from the database before the above mentioned changes are persisted 2. The engine stores those changes to the database 3. The monitoring makes changes to the configuration that was read in #1 according to the information we get from the host and persist it It's doesn't seem to be something new, but now it's visible because when cpu_name is empty in the database, it leads to showing that message (that the CPU type doesn't comply with the cluster's CPU type) in the webadmin.
Need feedback from Yash
That's a RHV issue, nothing needed from the platform side for this.
OK, so what happened here is that ImportVmFromConfiguration was called and then RunVm. The problem is that ovirt-engine allowed RunVm to be executed before ImportVmFromConfiguration is finished (while the latter is in its async execution phase) and so when ImportVmFromConfiguration finishes it changes the VM to Down and also clears its CPU type and other information that is set right after calling to start the VM, although the VM is running.
The bug has been verified with success according to the following steps of Full backup API flow: 1. Attach snapshots disk of source VM to backup VM 2. Start source and backup VMs 3. Make sure tempfile (i.e. /var/lib/vdsm/transient/) is created on the host that is running the backup VM 4. Backup disk with backup software on backup VM 5. Backup OVF of source VM on backup VM 6. Detach snapshot disk of source VM from backup VM 7. Remove source VM 8. Create new VM (to be restored from OVF) 9. Restore source VM that has backup to newly created VMs Version : ovirt-engine-4.4.6.5-447.gd80dda7.9.el8ev.noarch Expected result: VM should be running without the warning "Pending virtual machine changes : cluster cpu type" after starting to restore it from the backup. Actual result: No warnings or error log during and after the restore from backup.
Yury, would you be able to verify this bug with the automation scripts you use?
This bugzilla is included in oVirt 4.4.6 release, published on May 4th 2021. Since the problem described in this bug report should be resolved in oVirt 4.4.6 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.
Hello, Arik > Yury, would you be able to verify this bug with the automation scripts you use? I didn't face with that bug in the latest version
(In reply to Yury.Panchenko from comment #31) > Hello, Arik > > > Yury, would you be able to verify this bug with the automation scripts you use? > I didn't face with that bug in the latest version Thanks!