Bug 859062 - VMs created from template cannot be started
VMs created from template cannot be started
Status: CLOSED DUPLICATE of bug 857690
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.1.0
Assigned To: Michael Pasternak
Oded Ramraz
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-20 09:36 EDT by Michal Fojtik
Modified: 2016-02-10 11:38 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-20 10:33:54 EDT
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)

  None (edit)
Description Michal Fojtik 2012-09-20 09:36:26 EDT
Description of problem:

Can start VM created by API from the template.

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

RHEV-M 3.1 (si18.1)

Name        : rhevm-restapi
Arch        : noarch
Version     : 3.1.0
Release     : 16.el6ev

How reproducible:

You need to make a template first.

Steps to Reproduce:

1. Create new VM using API (POST /api/vms) using template you created.

POST /api/vms

<vm>
  <name>test-inst-4-1348147670</name>
  <template id="5558c5b6-9dd6-41b7-87f9-7cbce4fd40c5"/>
  <cluster>
    <name>Default</name>
  </cluster>
  <type>Server</type>
  <memory>536870912</memory>
  <cpu>
    <topology cores="1" sockets="1"/>
  </cpu>
  <os>
    <boot dev="hd"/>
  </os>
</vm>

2. Now execute an API call to start that instance

url -k -X POST -d '<action/>' -H 'Content-Type: application/xml' --user 'admin@internal:redhat' https://rhevm/api/vms/665e2506-fa8a-4f0e-8e62-f313346d8958/start

The action will report:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <status>
        <state>complete</state>
    </status>
</action>

3. However in webadmin you will get this:

VM test-inst-0-1348147544 is down. Exit message: Bad volume specification {'index': '2', 'iface': 'ide', 'specParams': {'path': ''}, 'readonly': 'true', 'deviceId': '8b377391-0e21-4e34-bf88-3bb6816b6a72', 'device': 'cdrom', 'shared': 'false', 'type': 'disk'}.
  
Actual results:

VM created from template using API cannot be started.

Expected results:

The VM should be started.

Additional info:

A workaround for this is to login into webadmin, edit the created stopped VM save it.
After this this machine could be started.
Comment 1 Oded Ramraz 2012-09-20 09:39:20 EDT
Seems like duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=857690
Comment 2 Michael Pasternak 2012-09-20 09:45:26 EDT
can you run vm created in GUI from same template?
Comment 3 Michal Fojtik 2012-09-20 09:53:28 EDT
(In reply to comment #2)
> can you run vm created in GUI from same template?

Yes, without any problem.
Comment 4 Michal Fojtik 2012-09-20 09:55:14 EDT
(In reply to comment #1)
> Seems like duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=857690

Right, that looks very similar to what I get. If you feel to close this as a dup feel free :-)
Comment 5 Michael Pasternak 2012-09-20 09:58:14 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > can you run vm created in GUI from same template?
> 
> Yes, without any problem.

(In reply to comment #3)
> (In reply to comment #2)
> > can you run vm created in GUI from same template?
> 
> Yes, without any problem.

note: 

you've created vm <name>test-inst-4-1348147670</name>,
but event talking about test-inst-0-1348147544 ...
Comment 6 Michal Fojtik 2012-09-20 10:24:05 EDT
yeah sorry, I think I copied wrong line, but the behaviour for test-inst-4-1348147670 is the same (I created 5 machines using script.)
Comment 7 Michal Fojtik 2012-09-20 10:33:54 EDT

*** This bug has been marked as a duplicate of bug 857690 ***

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