Bug 1453010 - The template created from vm snapshot contains no vm disk
Summary: The template created from vm snapshot contains no vm disk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.1.3
: 4.1.3
Assignee: Michal Skrivanek
QA Contact: Israel Pinto
URL:
Whiteboard:
: 1455505 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-21 22:17 UTC by Pan Liyang
Modified: 2019-04-28 14:38 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:22:56 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 77075 0 master MERGED core: Set disks from db when init CreateAllTemplateDisksFromSnapshotCommand 2017-05-23 11:34:06 UTC
oVirt gerrit 77076 0 ovirt-engine-4.1 MERGED core: Set disks from db when init CreateAllTemplateDisksFromSnapshotCommand 2017-05-23 13:51:57 UTC

Description Pan Liyang 2017-05-21 22:17:33 UTC
Description of problem:
see title

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. create vm with at least one disk
2. make a snapshot of the vm
3. create template from the snapshot

Actual results:
the created template contains no vm disk

Expected results:
the created template contains vm disk just like the original vm

Additional info:
engine.log output when executing (create template 'ffffff' from vm 'test', vm 'test' has a disk attached and is active,not sharable):

2017-05-21 17:38:17,657-04 INFO  [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-39) [7796f63c-9c5b-470f-96b5-438a89397066] Lock Acquired to object 'EngineLock:{exclusiveLocks='[ff73a4ac-1245-4571-8a68-cca855823dca=<TEMPLATE, ACTION_TYPE_FAILED_TEMPLATE_IS_BEING_CREATED>, 510f5c34-a4cd-4d4f-922e-d5dbcfe203aa=<DISK, ACTION_TYPE_FAILED_TEMPLATE_IS_BEING_CREATED>, ffffff=<TEMPLATE_NAME, ACTION_TYPE_FAILED_TEMPLATE_NAME_IS_USED>]', sharedLocks='[704e5bea-75c9-49b9-a5ce-552158a7f96e=<VM, ACTION_TYPE_FAILED_OBJECT_LOCKED>]'}'
2017-05-21 17:38:17,977-04 INFO  [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (default task-39) [7796f63c-9c5b-470f-96b5-438a89397066] Running command: AddVmTemplateFromSnapshotCommand internal: false. Entities affected :  ID: 1b723d35-649b-46c0-8a21-56fc0772cbc0 Type: StoragePoolAction group CREATE_TEMPLATE with role type USER
2017-05-21 17:38:17,985-04 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (default task-39) [7796f63c-9c5b-470f-96b5-438a89397066] START, SetVmStatusVDSCommand( SetVmStatusVDSCommandParameters:{runAsync='true', vmId='704e5bea-75c9-49b9-a5ce-552158a7f96e', status='ImageLocked', exitStatus='Normal'}), log id: 5fec7c0c
2017-05-21 17:38:18,004-04 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (default task-39) [7796f63c-9c5b-470f-96b5-438a89397066] FINISH, SetVmStatusVDSCommand, log id: 5fec7c0c
2017-05-21 17:38:18,191-04 INFO  [org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand] (default task-39) [7796f63c-9c5b-470f-96b5-438a89397066] Running command: CreateAllTemplateDisksFromSnapshotCommand internal: true.
2017-05-21 17:38:18,345-04 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-39) [7796f63c-9c5b-470f-96b5-438a89397066] EVENT_ID: USER_ADD_VM_TEMPLATE(48), Correlation ID: 7796f63c-9c5b-470f-96b5-438a89397066, Job ID: 5800af0c-fc95-454c-bdf0-27fb237b88e2, Call Stack: null, Custom Event ID: -1, Message: Creation of Template ffffff from VM test was initiated by admin@internal-authz.
2017-05-21 17:38:18,870-04 INFO  [org.ovirt.engine.core.bll.SerialChildCommandsExecutionCallback] (DefaultQuartzScheduler6) [7796f63c-9c5b-470f-96b5-438a89397066] Command 'AddVmTemplateFromSnapshot' id: '17b974c3-5a58-4eea-94d7-242653380b30' child commands '[26316cf7-a13f-41da-858b-d4606877bbe1]' executions were completed, status 'SUCCEEDED'
2017-05-21 17:38:20,098-04 INFO  [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (DefaultQuartzScheduler6) [7796f63c-9c5b-470f-96b5-438a89397066] Ending command 'org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand' successfully.
2017-05-21 17:38:20,103-04 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (DefaultQuartzScheduler6) [7796f63c-9c5b-470f-96b5-438a89397066] START, SetVmStatusVDSCommand( SetVmStatusVDSCommandParameters:{runAsync='true', vmId='704e5bea-75c9-49b9-a5ce-552158a7f96e', status='Down', exitStatus='Normal'}), log id: 3e479981
2017-05-21 17:38:20,108-04 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (DefaultQuartzScheduler6) [7796f63c-9c5b-470f-96b5-438a89397066] FINISH, SetVmStatusVDSCommand, log id: 3e479981
2017-05-21 17:38:20,153-04 INFO  [org.ovirt.engine.core.bll.AddVmTemplateFromSnapshotCommand] (DefaultQuartzScheduler6) [7796f63c-9c5b-470f-96b5-438a89397066] Lock freed to object 'EngineLock:{exclusiveLocks='[ff73a4ac-1245-4571-8a68-cca855823dca=<TEMPLATE, ACTION_TYPE_FAILED_TEMPLATE_IS_BEING_CREATED>, 510f5c34-a4cd-4d4f-922e-d5dbcfe203aa=<DISK, ACTION_TYPE_FAILED_TEMPLATE_IS_BEING_CREATED>, ffffff=<TEMPLATE_NAME, ACTION_TYPE_FAILED_TEMPLATE_NAME_IS_USED>]', sharedLocks='[704e5bea-75c9-49b9-a5ce-552158a7f96e=<VM, ACTION_TYPE_FAILED_OBJECT_LOCKED>]'}'
2017-05-21 17:38:20,170-04 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (DefaultQuartzScheduler6) [7796f63c-9c5b-470f-96b5-438a89397066] EVENT_ID: USER_ADD_VM_TEMPLATE_FINISHED_SUCCESS(51), Correlation ID: 7796f63c-9c5b-470f-96b5-438a89397066, Job ID: 5800af0c-fc95-454c-bdf0-27fb237b88e2, Call Stack: null, Custom Event ID: -1, Message: Creation of Template ffffff from VM test has been completed.

Comment 1 Pan Liyang 2017-05-21 22:22:07 UTC
Update:

Additional info:
engine.log output when executing (create template 'ffffff' from snapshot 'test' of vm 'test', snapshot 'test' has a disk attached and is active,not sharable):

Comment 2 Allon Mureinik 2017-05-25 14:43:38 UTC
*** Bug 1455505 has been marked as a duplicate of this bug. ***

Comment 3 Israel Pinto 2017-05-28 19:27:58 UTC
Verify with:
Red Hat Virtualization Manager Version: 4.1.3-0.1.el7
Host:
OS Version:RHEL - 7.3 - 7.el7
Kernel Version:3.10.0 - 514.16.1.el7.x86_64
KVM Version:2.6.0 - 28.el7_3.10
LIBVIRT Version:libvirt-2.0.0-10.el7_3.5
VDSM Version:vdsm-4.19.16-1.el7ev
SPICE Version:0.12.4 - 20.el7_3

Steps:
1. Create vm with at least one disk
2. Make a snapshot of the vm
3. Create template from the snapshot
4. Created Vm from new template
Results:
Template and VM created with disk
PASS


Note You need to log in before you can comment on or make changes to this bug.