Bug 859062 - VMs created from template cannot be started
Summary: VMs created from template cannot be started
Keywords:
Status: CLOSED DUPLICATE of bug 857690
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.1.0
Assignee: Michael Pasternak
QA Contact: Oded Ramraz
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-20 13:36 UTC by Michal Fojtik
Modified: 2016-02-10 16:38 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-20 14:33:54 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Fojtik 2012-09-20 13:36:26 UTC
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 13:39:20 UTC
Seems like duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=857690

Comment 2 Michael Pasternak 2012-09-20 13:45:26 UTC
can you run vm created in GUI from same template?

Comment 3 Michal Fojtik 2012-09-20 13:53:28 UTC
(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 13:55:14 UTC
(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 13:58:14 UTC
(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 14:24:05 UTC
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 14:33:54 UTC

*** 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.