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

Bug 1626426

Summary: Failed to create template from VM snapshot
Product: [oVirt] ovirt-engine Reporter: Meina Li <meili>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED DUPLICATE QA Contact: Elad <ebenahar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2.5.1CC: bugs, dyuan, hhan, jiyan, meili, xuzhang
Target Milestone: ---   
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: 2018-09-16 12:45:34 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 Meina Li 2018-09-07 09:46:28 UTC
Description of problem:
Failed to create template from VM snapshot

Version-Release number of selected component (if applicable):
rhvm-4.2.5.1-0.1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create vm with at least one disk
2. Make snapshots of the vm
3. Create template from one snapshot

Actual results:
pop up error: Error while executing action AddVmTemplateFromSnapshot: Internal Engine Error
Failed to create Template t1 or its disks from VM <UNKNOWN>.

Expected results:
Template will created

Additional info:
2018-09-07 05:18:09,720-04 ERROR [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-112) [07087791-d1be-46c9-9191-4b40e59ded4a] Command 'org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand' failed: EngineException: ENGINE (Failed with error ENGINE and code 5001)
2018-09-07 05:18:09,723-04 INFO  [org.ovirt.engine.core.bll.CommandCompensator] (default task-112) [07087791-d1be-46c9-9191-4b40e59ded4a] Command [id=588b1728-b04f-4953-902b-e15efe94bbdc]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.VmTemplate; snapshot: 86e924bf-85c3-4595-96bd-6ae9f5e45418.
2018-09-07 05:18:09,727-04 INFO  [org.ovirt.engine.core.bll.CommandCompensator] (default task-112) [07087791-d1be-46c9-9191-4b40e59ded4a] Command [id=588b1728-b04f-4953-902b-e15efe94bbdc]: Compensating CHANGED_STATUS_ONLY of org.ovirt.engine.core.common.businessentities.VmDynamic; snapshot: EntityStatusSnapshot:{id='51fec28c-ad66-46a1-ab15-6fdc2966e38c', status='Up'}.
2018-09-07 05:18:09,762-04 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-112) [07087791-d1be-46c9-9191-4b40e59ded4a] EVENT_ID: USER_ADD_VM_TEMPLATE_CREATE_TEMPLATE_FAILURE(1,322), Failed to create Template t1 or its disks from VM <UNKNOWN>.
2018-09-07 05:18:09,771-04 INFO  [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-112) [07087791-d1be-46c9-9191-4b40e59ded4a] Lock freed to object 'EngineLock:{exclusiveLocks='[b925e00c-b729-4297-b383-5c64cd57405c=DISK, 86e924bf-85c3-4595-96bd-6ae9f5e45418=TEMPLATE, t1=TEMPLATE_NAME]', sharedLocks='[51fec28c-ad66-46a1-ab15-6fdc2966e38c=VM]'}'
2018-09-07 05:18:11,870-04 INFO  [org.ovirt.engine.core.bll.SerialChildCommandsExecutionCallback] (EE-ManagedThreadFactory-engineScheduled-Thread-15) [07087791-d1be-46c9-9191-4b40e59ded4a] Command 'AddVmTemplateFromSnapshot' (id: '588b1728-b04f-4953-902b-e15efe94bbdc') waiting on child command id: '176ff4a3-fd01-4ce0-a47b-cdbc51ba4da9' type:'CreateAllTemplateDisksFromSnapshot' to complete
2018-09-07 05:18:13,830-04 INFO  [org.ovirt.engine.core.vdsbroker.monitoring.VmAnalyzer] (EE-ManagedThreadFactory-engineScheduled-Thread-93) [] VM '51fec28c-ad66-46a1-ab15-6fdc2966e38c'(lmn-test) was unexpectedly detected as 'Up' on VDS '31e6b6cb-abc3-4f51-ae5a-6706a5e89c0b'(host1) (expected on 'null')
2018-09-07 05:18:16,299-04 INFO  [org.ovirt.engine.core.bll.SerialChildCommandsExecutionCallback] (EE-ManagedThreadFactory-engineScheduled-Thread-23) [07087791-d1be-46c9-9191-4b40e59ded4a] Command 'AddVmTemplateFromSnapshot' (id: '588b1728-b04f-4953-902b-e15efe94bbdc') waiting on child command id: '176ff4a3-fd01-4ce0-a47b-cdbc51ba4da9' type:'CreateAllTemplateDisksFromSnapshot' to complete

Comment 1 Tal Nisan 2018-09-13 12:59:28 UTC
Hi Meina,
Was the VM snapshot created with saving memory?

Comment 2 Meina Li 2018-09-14 02:14:27 UTC
(In reply to Tal Nisan from comment #1)
> Hi Meina,
> Was the VM snapshot created with saving memory?

Yes, it was created with saving memory. And I also have tried them without saving memory, it can also hit this issue.

Comment 3 Tal Nisan 2018-09-16 12:45:34 UTC
Hi Meina,
This bug was solved in bug 1607736 and bug 1573421, both fixes will be available in 4.2.7

*** This bug has been marked as a duplicate of bug 1607736 ***