Bug 1000789 - Failed to create VM from template without any image disks
Failed to create VM from template without any image disks
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
Unspecified Unspecified
high Severity medium
: ---
: 3.3.0
Assigned To: Sergey Gotliv
Aharon Canan
storage
:
: 979932 988319 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-25 05:00 EDT by Lior Vernia
Modified: 2016-02-10 15:18 EST (History)
14 users (show)

See Also:
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 12:36:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 654333 None None None Never
oVirt gerrit 18475 None None None Never

  None (edit)
Description Lior Vernia 2013-08-25 05:00:09 EDT
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 05:16:58 EDT
*** Bug 988319 has been marked as a duplicate of this bug. ***
Comment 3 Michal Skrivanek 2013-08-27 09:10:01 EDT
*** Bug 979932 has been marked as a duplicate of this bug. ***
Comment 4 David Botzer 2013-08-28 09:15:19 EDT
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 09:36:37 EDT
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 12:36:15 EST
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.