Bug 1000789 - Failed to create VM from template without any image disks
Summary: Failed to create VM from template without any image disks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.3.0
Assignee: Sergey Gotliv
QA Contact: Aharon Canan
URL:
Whiteboard: storage
: 979932 988319 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-25 09:00 UTC by Lior Vernia
Modified: 2018-12-04 15:48 UTC (History)
14 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-01-21 17:36:15 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
oVirt engine log (9.14 MB, text/x-log)
2013-08-25 09:00 UTC, Lior Vernia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 654333 0 None None None Never
Red Hat Product Errata RHSA-2014:0038 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.3.0 update 2014-01-21 22:03:06 UTC
oVirt gerrit 18475 0 None None None Never

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


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