Description of problem: Cannot create a new vm using a template created as a snapshot of a vm that uses mbs disks. Version-Release number of selected component (if applicable): 4.4.7.6 How reproducible: always Steps to Reproduce: 1. Create a vm using mbs disk. 2. Create a snapshot of the vm disk. 3. Create a template from the snapshot. 4. Create a new vm using template. Actual results: The new vm creation failed. Expected results: The new vm creation success. Additional info: cinderlib version is 3.0.0. cinder version is openstack-victoria.
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.
Hi, Can you please provide engine and VDSM logs?
(In reply to Eyal Shenitzky from comment #2) > Hi, > > Can you please provide engine and VDSM logs? Sorry for being late. The vm is created normally and the snapshot is also created normally. Below is the engine log when creating a template and creating a new vm. No VDSM log. Engine log 1. Create template from snapshot 2021-09-23 15:22:51,636+09 INFO [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-67) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Lock Acquired to object 'EngineLock:{exclusiveLocks='[temp=TEMPLATE_NAME, c9e4c386-aa88-46e7-a5ff-52e640409319=TEMPLATE]', sharedLocks='[37f8c0d9-dcc6-40ce-aa41-62d05cd15b9d=VM]'}' 2021-09-23 15:22:51,969+09 INFO [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-67) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Running command: AddVmTemplateFromSnapshotCommand internal: false. Entities affected : ID: c95bd4b8-1513-11ec-8b6f-480fcf63834f Type: StoragePoolAction group CREATE_TEMPLATE with role type USER 2021-09-23 15:22:52,511+09 INFO [org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand] (default task-67) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Running command: CreateAllTemplateDisksFromSnapshotCommand internal: true. 2021-09-23 15:22:52,855+09 INFO [org.ovirt.engine.core.bll.ConcurrentChildCommandsExecutionCallback] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-58) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Command 'CreateAllTemplateDisksFromSnapshot' id: '3d8a3de2-3064-4609-9328-b4c26a1680e6' child commands '[]' executions were completed, status 'SUCCEEDED' 2021-09-23 15:22:53,112+09 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-67) [dc519857-8caf-48ed-8ced-3ca2eea1376c] EVENT_ID: USER_ADD_VM_TEMPLATE(48), Creation of Template temp from VM <UNKNOWN> was initiated by admin@internal-authz. 2021-09-23 15:22:54,175+09 INFO [org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-59) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Ending command 'org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand' successfully. 2021-09-23 15:22:55,542+09 INFO [org.ovirt.engine.core.bll.SerialChildCommandsExecutionCallback] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-24) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Command 'AddVmTemplateFromSnapshot' id: '4335add9-bc44-4fa0-8b45-0b3d15e93e5a' child commands '[3d8a3de2-3064-4609-9328-b4c26a1680e6]' executions were completed, status 'SUCCEEDED' 2021-09-23 15:22:56,944+09 INFO [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-76) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Ending command 'org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand' successfully. 2021-09-23 15:22:57,056+09 INFO [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-76) [dc519857-8caf-48ed-8ced-3ca2eea1376c] Lock freed to object 'EngineLock:{exclusiveLocks='[temp=TEMPLATE_NAME, c9e4c386-aa88-46e7-a5ff-52e640409319=TEMPLATE]', sharedLocks='[37f8c0d9-dcc6-40ce-aa41-62d05cd15b9d=VM]'}' 2021-09-23 15:22:57,081+09 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-76) [dc519857-8caf-48ed-8ced-3ca2eea1376c] EVENT_ID: USER_ADD_VM_TEMPLATE_FINISHED_SUCCESS(51), Creation of Template temp from VM <UNKNOWN> has been completed. 2. Create new vm from template 2021-09-23 15:26:43,886+09 INFO [org.ovirt.engine.core.bll.AddVmFromTemplateCommand] (default task-67) [566edbf3-0b0d-4ff1-9faf-4726aa26999a] Lock Acquired to object 'EngineLock:{exclusiveLocks='[from_temp=VM_NAME]', sharedLocks='[c9e4c386-aa88-46e7-a5ff-52e640409319=TEMPLATE]'}' 2021-09-23 15:26:43,918+09 INFO [org.ovirt.engine.core.bll.AddVmFromTemplateCommand] (default task-67) [566edbf3-0b0d-4ff1-9faf-4726aa26999a] Running command: AddVmFromTemplateCommand internal: false. Entities affected : ID: c95d8b14-1513-11ec-a2d4-480fcf63834f Type: ClusterAction group CREATE_VM with role type USER, ID: c9e4c386-aa88-46e7-a5ff-52e640409319 Type: VmTemplateAction group CREATE_VM with role type USER 2021-09-23 15:26:44,152+09 INFO [org.ovirt.engine.core.bll.AddRngDeviceCommand] (default task-67) [4bc543ec] Running command: AddRngDeviceCommand internal: true. Entities affected : ID: e5c19e1a-7b58-43a3-ab92-d75465d46db2 Type: VMAction group EDIT_VM_PROPERTIES with role type USER 2021-09-23 15:26:44,247+09 INFO [org.ovirt.engine.core.bll.AddGraphicsDeviceCommand] (default task-67) [452c711a] Running command: AddGraphicsDeviceCommand internal: true. Entities affected : ID: e5c19e1a-7b58-43a3-ab92-d75465d46db2 Type: VMAction group EDIT_VM_PROPERTIES with role type USER 2021-09-23 15:26:44,252+09 INFO [org.ovirt.engine.core.bll.AddGraphicsDeviceCommand] (default task-67) [758517dc] Running command: AddGraphicsDeviceCommand internal: true. Entities affected : ID: e5c19e1a-7b58-43a3-ab92-d75465d46db2 Type: VMAction group EDIT_VM_PROPERTIES with role type USER 2021-09-23 15:26:44,660+09 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-67) [758517dc] EVENT_ID: USER_ADD_VM_STARTED(37), VM from_temp creation was initiated by admin@internal-authz. 2021-09-23 15:26:44,840+09 INFO [org.ovirt.engine.core.bll.network.vm.ReorderVmNicsCommand] (default task-67) [c304573c-47ba-4828-9280-24c995802dc1] Running command: ReorderVmNicsCommand internal: false. Entities affected : ID: e5c19e1a-7b58-43a3-ab92-d75465d46db2 Type: VMAction group CREATE_VM with role type USER 2021-09-23 15:26:46,154+09 INFO [org.ovirt.engine.core.bll.SerialChildCommandsExecutionCallback] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-65) [566edbf3-0b0d-4ff1-9faf-4726aa26999a] Command 'AddVmFromTemplate' id: 'ede77bb6-f051-4d42-9fdc-fca82e37e1ca' child commands '[]' executions were completed, status 'SUCCEEDED' 2021-09-23 15:26:47,260+09 INFO [org.ovirt.engine.core.bll.AddVmFromTemplateCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-3) [566edbf3-0b0d-4ff1-9faf-4726aa26999a] Ending command 'org.ovirt.engine.core.bll.AddVmFromTemplateCommand' successfully. 2021-09-23 15:26:47,269+09 INFO [org.ovirt.engine.core.bll.AddVmFromTemplateCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-3) [566edbf3-0b0d-4ff1-9faf-4726aa26999a] Lock freed to object 'EngineLock:{exclusiveLocks='[from_temp=VM_NAME]', sharedLocks='[c9e4c386-aa88-46e7-a5ff-52e640409319=TEMPLATE]'}' 2021-09-23 15:26:47,294+09 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-3) [566edbf3-0b0d-4ff1-9faf-4726aa26999a] EVENT_ID: USER_ADD_VM_FINISHED_SUCCESS(53), VM from_temp creation has been completed. 3. Run the new vm 2021-09-23 15:29:06,606+09 INFO [org.ovirt.engine.core.bll.RunVmCommand] (default task-67) [782ee5bc-796a-4e41-b1d9-8a39e1970f26] Lock Acquired to object 'EngineLock:{exclusiveLocks='[e5c19e1a-7b58-43a3-ab92-d75465d46db2=VM]', sharedLocks=''}' 2021-09-23 15:29:06,685+09 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-67) [782ee5bc-796a-4e41-b1d9-8a39e1970f26] EVENT_ID: USER_FAILED_RUN_VM(54), Failed to run VM from_temp due to a failed validation: [Cannot run VM without at least one bootable disk. Alternatives: - Create a disk for this VM, and rerun the VM. - Change the boot sequence using the Edit VM command (Boot Option Sub-Tab). - Use the 'Run Once' command to select a different boot option and rerun the VM.] (User: admin@internal-authz). 2021-09-23 15:29:06,685+09 WARN [org.ovirt.engine.core.bll.RunVmCommand] (default task-67) [782ee5bc-796a-4e41-b1d9-8a39e1970f26] Validation of action 'RunVm' failed for user admin@internal-authz. Reasons: VAR__ACTION__RUN,VAR__TYPE__VM,VM_CANNOT_RUN_FROM_DISK_WITHOUT_DISK 2021-09-23 15:29:06,686+09 INFO [org.ovirt.engine.core.bll.RunVmCommand] (default task-67) [782ee5bc-796a-4e41-b1d9-8a39e1970f26] Lock freed to object 'EngineLock:{exclusiveLocks='[e5c19e1a-7b58-43a3-ab92-d75465d46db2=VM]', sharedLocks=''}' Error message from portal Error while executing action: from_temp: Cannot run VM without at least one bootable disk. Alternatives: - Create a disk for this VM, and rerun the VM. - Change the boot sequence using the Edit VM command (Boot Option Sub-Tab). - Use the 'Run Once' command to select a different boot option and rerun the VM.
From a brief look, it seems that the MBS disks are being filtered out while selecting the disks on AddVmTemplateFromSnapshotCommand and CreateAllTemplateDisksFromSnapshotCommand. So the template is being created successfully, but without the attached MBS disks. - By having the bootable disk as an nfs disk, the VM would be able to run (but it's not related to the MBS issue). - In order to include the MBS disks, we need to add this line to getVmDisksFromDB() on those two classes: disksFromDb.addAll(DisksFilter.filterManagedBlockStorageDisks(getVm().getDiskMap().values(), ONLY_PLUGGED)); With that line, the clone VM from snapshot is being blocked, as it's not supported for MBS disks: │2022-02-24 19:05:48,054+02 WARN [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-4) [38b2beab-0f83-4157-bf3c-fe6cfd86bad6] Validation of action 'AddVmTemplateFromSnapshot' failed for user admin@internal-authz. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM_TEMPLATE,ACTION_TYPE_FAILED_UNSUPPORTED_ACTION_FOR_MANAGED_BLOCK_STORAGE_TYPE │2022-02-24 19:05:48,055+02 INFO [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-4) [38b2beab-0f83-4157-bf3c-fe6cfd86bad6] Lock freed to object 'EngineLock:{exclusiveLocks='[c0ada829-7eb0-4397-afbd-7485202c51af=TEMPLATE, 6fb55358-9593-4ed5-ab9a-6f9b75b0c968=DISK, t-s2=TEMPLATE_NAME]', sharedLocks='[13df1291-3a6d-4230-bb1f-f552f987dc98=VM]'}' Benny/Arik, what should be the right attitude on this one?
It's not implemented so it should be blocked until implemented
(In reply to Benny Zlotnik from comment #5) > It's not implemented so it should be blocked until implemented +1 It's similar to add VM from snapshot that we chose to keep blocked because of the relation that we'll have between the snapshot and the clone disk In that case, add template from snapshot should also be blocked
Ack, Will upload a patch that avoids MBS disks' filtering and therefore blocks the operation. (instead of letting it succeed "flaky" without the MBS disks)
We are past 4.5.0 feature freeze, please re-target.
Shani, did
Unfortunately this request was not prioritized and didn't make it into the latest major version of oVirt 4.5 and there is no activity on this request for a while. Closing.
The creation of a template from a snapshot that has MBS disks should be blocked now
QE doesn't have the capacity to verify this bug during 4.5.1. The team focuses on CBT tasks.
It's just about blocking the operation (as opposed to the original request to make it work) - there's no sense in pushing it out to 4.5.2. We'll close it without additional verification, based on developer's verification, if needed
Verified. ovirt-engine-4.5.1.1-0.14.el8ev vdsm-4.50.1.2-1.el8ev When trying to create a template from the snapshot with the MBS disk the following message pops up: "Cannot add Template. Managed Block Storage is not supported this operation."
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.1 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.