Bug 1000789

Summary: Failed to create VM from template without any image disks
Product: Red Hat Enterprise Virtualization Manager Reporter: Lior Vernia <lvernia>
Component: ovirt-engineAssignee: Sergey Gotliv <sgotliv>
Status: CLOSED ERRATA QA Contact: Aharon Canan <acanan>
Severity: medium Docs Contact:
Priority: high    
Version: 3.3.0CC: acathrow, amureini, bazulay, dfediuck, gwatson, iheim, lpeer, mkalinin, pstehlik, Rhev-m-bugs, scohen, sgotliv, tjelinek, yeylon
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: is12 Doc Type: Bug Fix
Doc Text:
Previously a non-initialized array caused a null pointer exception when trying to create a virtual machine from a template without disks. This exception is now handled correctly, so virtual machines can be created from a template without disks.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 17:36:15 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:
Attachments:
Description Flags
oVirt engine log none

Description Lior Vernia 2013-08-25 09:00:09 UTC
Created attachment 790050 [details]
oVirt engine log

Description of problem:

When trying to create a VM from template the operation never finishes, the log reports a null pointer exception in AddVmFromTemplateCommand. I suspect this might be related to the template having no disks, works fine when a disk exists. See the log file, look for VMs "temp2" and "temp3".


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

oVirt 3.3


How reproducible:

Always, for that template.


Steps to Reproduce:
1. Create VM with a couple of NICs and attached profiles (probably irrelevant, but that's exactly what I did) but no disk.
2. Create a template from it.
3. Create VMs from template.

Actual results:

Actions stalls and engine reports a null pointer exception.


Expected results:

VM is created as usual.


Additional info:

Comment 2 Tomas Jelinek 2013-08-26 09:16:58 UTC
*** Bug 988319 has been marked as a duplicate of this bug. ***

Comment 3 Michal Skrivanek 2013-08-27 13:10:01 UTC
*** Bug 979932 has been marked as a duplicate of this bug. ***

Comment 4 David Botzer 2013-08-28 13:15:19 UTC
3.3/is11
This issue should be also tested when this BZ is fixed:

 >>>  I had created a VM without NIC, nor Disk
 >>>  I changed the display to VNC (with 2 monitors)
 >>>  I create a template from this VM,
 >>>  
 >>>  When I am trying to create new vm i get error (Webadmin - unexpected
 >>>  error)

From Tomas Jelinek:
I would say that the exception mentioned by you is just a consequence of
this one - so this should already be fixed and hopefully available in the
next IS.

2013-08-28 09:32:56,092 ERROR
[org.ovirt.engine.core.bll.AddVmFromTemplateCommand]
(ajp-/127.0.0.1:8702-5) Command
org.ovirt.engine.core.bll.AddVmFromTemplateCommand throw exception:
java.lang.NullPointerException at
org.ovirt.engine.core.bll.VmCommand.endActionOnDisks(VmCommand.java:206)
[bll.jar:] at
org.ovirt.engine.core.bll.VmCommand.endVmCommand(VmCommand.java:200)
[bll.jar:] at
org.ovirt.engine.core.bll.VmCommand.endSuccessfully(VmCommand.java:244)
[bll.jar:] at
org.ovirt.engine.core.bll.AddVmFromTemplateCommand.executeVmCommand(AddVmFr
omTemplateC

Comment 5 Aharon Canan 2013-09-09 13:36:37 UTC
verified using is12

verification steps - 
1. Create VM with a couple of NICs and attached profiles (probably irrelevant, but that's exactly what I did) but no disk.
2. Create a template from it.
3. Create VMs from template.

Comment 8 errata-xmlrpc 2014-01-21 17:36:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHSA-2014-0038.html