Bug 1500163 - Error while executing action CloneVm: Internal Engine Error (when VM is configured with cloud-init)
Summary: Error while executing action CloneVm: Internal Engine Error (when VM is confi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.5.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: jniederm
QA Contact: Vladimir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-10 06:06 UTC by Shamam
Modified: 2018-05-31 02:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-22 09:58:22 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 84542 0 master MERGED core: Fix of NPE when cloning a VM 2020-02-03 19:48:19 UTC

Description Shamam 2017-10-10 06:06:00 UTC
Description of problem:

We are using oVirt release Version 4.1.5.2.  I was trying to make a clone of a VM but I got the following message "Error while executing action CloneVm: Internal Engine Error", I found that when cloud-init is used in the vm's edit section, this error occurs, but when the vm is configured without cloud init, the clone was completed successfully. 
Version-Release number of selected component (if applicable):
4.1.5.2

How reproducible:
100%

Steps to Reproduce:
1.create a centos VM and use cloud-init configuration in the Edit Section of this VM
2.choose the VM while it is down and click Clone, in order to make a clone of this VM.

Actual results:
Error while executing action CloneVm: Internal Engine Error

Expected results:
A clone must be completed without such error.

Additional info:
The log file is https://paste.fedoraproject.org/paste/f~sHprL93BNZ-iJzoFDyww

Comment 1 Arik 2017-10-10 08:43:56 UTC
Additional insights:
The template that the original VM is based on is not configured with VM-init.
This leads to an NPE on add-vm:
2017-10-03 14:35:11,863+03 ERROR [org.ovirt.engine.core.bll.CloneVmCommand] (default task-165) [] Exception: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.AddVmCommand.addVmInit(AddVmCommand.java:1155) [bll.jar:]
	at org.ovirt.engine.core.bll.AddVmCommand.lambda$executeVmCommand$3(AddVmCommand.java:933) [bll.jar:]
	at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [utils.jar:]
	at org.ovirt.engine.core.bll.AddVmCommand.executeVmCommand(AddVmCommand.java:925) [bll.jar:]
	at org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.executeVmCommand(AddVmAndCloneImageCommand.java:295) [bll.jar:]

Comment 2 Red Hat Bugzilla Rules Engine 2017-10-10 08:44:01 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 3 Vladimir 2018-02-12 14:06:38 UTC
Verified on  4.1.9.2-0.1.el7

Verified scenarios:
1. Create Vm from template without cloud-init configured, clone it, run cloned vm - PASS
2. Create Vm from template with cloud-init configured, clone it, run cloned vm - PASS
3. Clone pool vm with cloud-init configured - PASS
4. Clone pool VM without cloud-init configured - PASS

Comment 4 Vladimir 2018-02-12 14:10:20 UTC
Also verified mentioned scenarios on 4.2.1.6-0.1.el7

Comment 5 Sandro Bonazzola 2018-02-22 09:58:22 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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