Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1983638

Summary: Can't run VM from an attached copied OS disk from another working VM
Product: [oVirt] ovirt-engine Reporter: sshmulev
Component: BLL.StorageAssignee: Arik <ahadas>
Status: CLOSED NOTABUG QA Contact: sshmulev
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.8CC: ahadas, bugs, eshames, michal.skrivanek, ymankad
Target Milestone: ---Keywords: Automation, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-03 07:41:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sshmulev 2021-07-19 10:10:13 UTC
Description of problem:
Can't run a VM that its bootable disk is copied from another VM.
Tried to enable the "Enable menu to select boot device" to see that the device is existing - and it can be seen from the boot menu(first option).


Version-Release number of selected component (if applicable):
QEMU emulator version 5.2.0 (qemu-kvm-5.2.0-16.module+el8.4.0+11721+c8bbc1be.3)
vdsm-4.40.80.1-1.el8ev.x86_64
ovirt-engine-4.4.8-0.19.el8ev.noarch

How reproducible:
Reproduces once in every two runs of tier1.

Steps to Reproduce:
1.Create a VM from template (latest-rhel-guest-image-8.3-infra (Thin/Dependent))
comes with OS disk:
Interface: VirtIO, Allocation:Thin provision, Storage domain:ISCSI,  SIZE:10
2. Run the VM to see that it is going up.
3. power off the VM.
4. Copy the bootable disk of the VM.
5. create another VM:
-Template: Blank
-operating system: Other OS
-nic1 :ovirtmgmt/ovirtmgmt
-No change in boot options: First device will be Hard Disk.
6. Attach the copied disk to the new VM and set it as a bootable disk.
7. Run the VM.

Actual results:
from the console can see this message forever:
"Probing EDD (edd=off to disable)... ok"


Expected results:
The VM should run from the OS disk , boot from the hard drive

Additional info:
This issue happens from time to time, So I wouldn't say it is a regression.
This first reproduced in our tier1 automation,which failed on  VM couldn't get IP and also could reproduce it today manually.

Comment 4 Eyal Shenitzky 2021-07-19 14:18:34 UTC
Arik, can you please have a look?

Comment 5 Arik 2021-07-19 20:28:10 UTC
(In reply to Eyal Shenitzky from comment #4)
> Arik, can you please have a look?

If the bootable disk of the original VM was copied properly and attached as a bootable disk to a different VM, it should work
I'd compare the configuration of both VMs to see they are set with the same firmware and that the original disk is indeed set as the bootable device of the second VM

Comment 6 Michal Skrivanek 2021-07-20 09:56:50 UTC
- there's no VM creation in the NewVM/NEW_VM_vdsm.log

- from engine log I can see the VMs are different, the original has 3 virtio, 2 virtio-scsi, new VM has 4 virtio, 1 virtio-scsi disks. Are they supposed to be the same?

Comment 7 sshmulev 2021-07-20 11:05:24 UTC
I took these logs from the automation test (all 5 disks, including the OS disk should be coppied to the new VM ,so 4 disks were copied as well from the origin VM) but lets focus on the copy of the OS disk which is the main issue:
In our case:
OS disk ID(origin VM): 140abbca-6b6b-45a9-bd02-b68283405511
Coppied OS disk ID:8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce
New VM ID:5e6bb7cf-dfcc-4d19-98f9-573f2d0f1bfd



-From engine log can see the new VM creation:

2021-07-19 09:49:40,786+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-30) [524db305] EVENT_ID: USER_ADD_VM(34), VM vm_test_copy_disk_iscsi_1909493915 was created by admin@internal-authz.
2021-07-19 09:49:40,789+03 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (default task-30) [524db305] Lock freed to object 'EngineLock:{exclusiveLocks='[vm_test_copy_disk_iscsi_1909493915=VM_NAME]', sharedLocks=''}'
2021-07-19 09:49:41,370+03 INFO  [org.ovirt.engine.core.bll.SerialChildCommandsExecutionCallback] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-90) [vms_create_c55db8c9-69a6-4f1a] Command 'AddVmFromScratch' id: '4d466025-26de-4d69-9508-916c5d31e427' child commands '[]' executions were completed, status 'SUCCEEDED'
2021-07-19 09:49:42,398+03 INFO  [org.ovirt.engine.core.bll.AddVmFromScratchCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-40) [vms_create_c55db8c9-69a6-4f1a] Ending command 'org.ovirt.engine.core.bll.AddVmFromScratchCommand' successfully.
2021-07-19 09:49:42,427+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-40) [vms_create_c55db8c9-69a6-4f1a] EVENT_ID: USER_ADD_VM_FINISHED_SUCCESS(53), VM vm_test_copy_disk_iscsi_1909493915 creation has been completed.



-Copy the bootable disk from origin VM:

2021-07-19 09:51:13,541+03 INFO  [org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommand] (default task-30) [disks_syncAction_fa2e7dda-79d5-48b3] Lock Acquired to object 'EngineLock:{exclusiveLocks='[140abbca-6b6b-45a9-bd02-b68283405511=DISK]', sharedLocks=''}'
2021-07-19 09:51:16,055+03 INFO  [org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommand] (default task-30) [disks_syncAction_fa2e7dda-79d5-48b3] Running command: MoveOrCopyDiskCommand internal: false. Entities affected :  ID: 140abbca-6b6b-45a9-bd02-b68283405511 Type: DiskAction group CONFIGURE_DISK_STORAGE with role type USER,  ID: 5faa8c84-7ad4-4fdf-8f36-bcf2f1a9dd82 Type: StorageAction group CREATE_DISK with role type USER
2021-07-19 09:51:16,081+03 INFO  [org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand] (default task-30) [disks_syncAction_fa2e7dda-79d5-48b3] Running command: CopyImageGroupCommand internal: true. Entities affected :  ID: 5faa8c84-7ad4-4fdf-8f36-bcf2f1a9dd82 Type: Storage
2021-07-19 09:51:16,119+03 INFO  [org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupWithDataCommand] (default task-30) [disks_syncAction_fa2e7dda-79d5-48b3] Running command: CopyImageGroupWithDataCommand internal: true.

2021-07-19 09:51:31,364+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CopyVolumeDataVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-77) [disks_syncAction_fa2e7dda-79d5-48b3] START, CopyVolumeDataVDSCommand(HostName = host_mixed_2, CopyVolumeDataVDSCommandParameters:{hostId='dc099e57-1950-44cb-a95d-b4961e57cb97', storageDomainId='null', jobId='119dadf3-4436-432e-8551-d77b2d878eed', srcInfo='VdsmImageLocationInfo[storageDomainId=5faa8c84-7ad4-4fdf-8f36-bcf2f1a9dd82, imageGroupId=140abbca-6b6b-45a9-bd02-b68283405511, imageId=0bbda5b2-093a-48ff-8b7c-edddbe2efbc3, generation=null, prepared=false]', dstInfo='VdsmImageLocationInfo[storageDomainId=5faa8c84-7ad4-4fdf-8f36-bcf2f1a9dd82, imageGroupId=8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce, imageId=10e73001-85ec-4c0f-9460-09d80bf018b8, generation=0, prepared=false]', collapse='true', copyBitmaps='false'}), log id: 4cb56c5d



copy is done:

2021-07-19 09:52:08,878+03 INFO  [org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-71) [] Lock freed to object 'EngineLock:{exclusiveLocks='[140abbca-6b6b-45a9-bd02-b68283405511=DISK]', sharedLocks=''}'



The new disk is coppied:

2021-07-19 09:51:17,723+03 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CreateVolumeVDSCommand] (default task-30) [disks_syncAction_fa2e7dda-79d5-48b3] START, CreateVolumeVDSCommand( CreateVolumeVDSCommandParameters:{storagePoolId='b5eded6d-086b-4781-9ae9-070dc99f5336', ignoreFailoverLimit='false', storageDomainId='5faa8c84-7ad4-4fdf-8f36-bcf2f1a9dd82', imageGroupId='8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce', imageSizeInBytes='10737418240', volumeFormat='COW', newImageId='10e73001-85ec-4c0f-9460-09d80bf018b8', imageType='Sparse', newImageDescription='{"DiskAlias":"bootable_copy_disk","DiskDescription":""}', imageInitialSizeInBytes='3426942976', imageId='00000000-0000-0000-0000-000000000000', sourceImageGroupId='00000000-0000-0000-0000-000000000000', shouldAddBitmaps='false'}), log id: 610223cc

2021-07-19 09:51:31,363+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-77) [disks_syncAction_fa2e7dda-79d5-48b3] EVENT_ID: COPY_VOLUME_DATA_EXECUTION_HOST(4,200), Copying data of image '10e73001-85ec-4c0f-9460-09d80bf018b8' of disk '8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce' to domain 'iscsi_2' using 'host_mixed_2'.

2021-07-19 09:52:08,643+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetQemuImageInfoVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-71) [disks_syncAction_fa2e7dda-79d5-48b3] START, GetQemuImageInfoVDSCommand(HostName = host_mixed_1, GetVolumeInfoVDSCommandParameters:{hostId='e97a3053-b5b5-4d13-9ab2-ed48f63df8a1', storagePoolId='b5eded6d-086b-4781-9ae9-070dc99f5336', storageDomainId='5faa8c84-7ad4-4fdf-8f36-bcf2f1a9dd82', imageGroupId='8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce', imageId='10e73001-85ec-4c0f-9460-09d80bf018b8'}), log id: 77da5417



Attach the new copied disk to the new vm:

2021-07-19 09:52:16,100+03 INFO  [org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand] (default task-30) [diskattachments_create_c8a21192-57c9] Lock Acquired to object 'EngineLock:{exclusiveLocks='[8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce=DISK, 5e6bb7cf-dfcc-4d19-98f9-573f2d0f1bfd=VM_DISK_BOOT]', sharedLocks=''}'

2021-07-19 09:52:16,132+03 INFO  [org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand] (default task-30) [diskattachments_create_c8a21192-57c9] Running command: AttachDiskToVmCommand internal: false. Entities affected :  ID: 5e6bb7cf-dfcc-4d19-98f9-573f2d0f1bfd Type: VMAction group CONFIGURE_VM_STORAGE with role type USER,  ID: 8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce Type: DiskAction group ATTACH_DISK with role type USER

2021-07-19 09:52:16,149+03 INFO  [org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand] (default task-30) [diskattachments_create_c8a21192-57c9] Lock freed to object 'EngineLock:{exclusiveLocks='[8c7f9299-f00e-4fe4-93ec-9f5f2d7a0fce=DISK, 5e6bb7cf-dfcc-4d19-98f9-573f2d0f1bfd=VM_DISK_BOOT]', sharedLocks=''}'

Comment 31 Arik 2021-12-20 15:32:54 UTC
Sophie, let's have a separate bug on the last error we saw with the OVA please and try to reproduce it the way you managed to do on latest versions of RHV

Comment 32 Arik 2021-12-20 16:25:35 UTC
(In reply to Arik from comment #31)
> ... on latest versions of RHV

on the latest version*