[Users] Bug? in tweak vm instance via REST/JSON 3.3.2

2014-01-09 Thread Sven Kieske
Hi,

we got a problem with starting a vm after changing some of its
parameters via REST (JSON)

this is the command to create the vm (this works):

POST request on https://virt-mgmt-01.internal/api/vms/
{name:vr2,cluster:{id:2ad11b5e-9e74-499a-b317-5a9a3027cfca},template:{id:374a12df-5ffc-4feb-a2bf-c912f059675f}}

Then we tweak memory and cpu:

PUT request on
https://virt-mgmt-01.internal/api/vms/42dba82f-e7ea-40ff-a76e-70056912b47f
{memory:2048,cpu:{topology:{sockets:1,cores:1}}}

and then we start it:

POST request on
https://virt-mgmt-01.internal/api/vms/42dba82f-e7ea-40ff-a76e-70056912b47f/start
{vm:{initialization:{cloudInit:{host:{address:vr2},networkConfiguration:{nics:{nics:[{name:eth0,bootProtocol:STATIC,network:{ip:{address:10.0.1.12,netmask:255.255.255.252,gateway:10.0.1.9}},onBoot:true}]},dns:{servers:{hosts:[{address:46.30.62.99},{address:46.30.62.98},{address:46.30.62.97}]}}},users:{users:[{name:root,password:lPzYG06qV63+Tne7},{name:vr2,password:lPzYG06qV63+Tne7}]},files:{files:[{name:\/foo\/ip-configuration,content:extern_v4address1
185.15.194.7\npassword1 lPzYG06qV63+Tne7,type:PLAINTEXT}]}

the error we get:

Operation Failed,detail:[Cannot run VM. There is no host that
satisfies current scheduling constraints. See bellow for details:]


when we start the vm without altering memory and cpu it starts just
fine.

Is this not supported via JSON, or is this a bug?

PS:
BTW there seems to be a spelling bug in the error message (bellow).

-- 
Mit freundlichen Grüßen / Regards

Sven Kieske

Systemadministrator
Mittwald CM Service GmbH  Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Bug? in tweak vm instance via REST/JSON 3.3.2

2014-01-09 Thread Oved Ourfalli


- Original Message -
 From: Sven Kieske s.kie...@mittwald.de
 To: users@ovirt.org
 Sent: Thursday, January 9, 2014 10:09:31 AM
 Subject: [Users] Bug? in tweak vm instance via REST/JSON 3.3.2
 
 Hi,
 
 we got a problem with starting a vm after changing some of its
 parameters via REST (JSON)
 
 this is the command to create the vm (this works):
 
 POST request on https://virt-mgmt-01.internal/api/vms/
 {name:vr2,cluster:{id:2ad11b5e-9e74-499a-b317-5a9a3027cfca},template:{id:374a12df-5ffc-4feb-a2bf-c912f059675f}}
 
 Then we tweak memory and cpu:
 
 PUT request on
 https://virt-mgmt-01.internal/api/vms/42dba82f-e7ea-40ff-a76e-70056912b47f
 {memory:2048,cpu:{topology:{sockets:1,cores:1}}}
 
 and then we start it:
 
 POST request on
 https://virt-mgmt-01.internal/api/vms/42dba82f-e7ea-40ff-a76e-70056912b47f/start
 {vm:{initialization:{cloudInit:{host:{address:vr2},networkConfiguration:{nics:{nics:[{name:eth0,bootProtocol:STATIC,network:{ip:{address:10.0.1.12,netmask:255.255.255.252,gateway:10.0.1.9}},onBoot:true}]},dns:{servers:{hosts:[{address:46.30.62.99},{address:46.30.62.98},{address:46.30.62.97}]}}},users:{users:[{name:root,password:lPzYG06qV63+Tne7},{name:vr2,password:lPzYG06qV63+Tne7}]},files:{files:[{name:\/foo\/ip-configuration,content:extern_v4address1
 185.15.194.7\npassword1 lPzYG06qV63+Tne7,type:PLAINTEXT}]}
 
 the error we get:
 
 Operation Failed,detail:[Cannot run VM. There is no host that
 satisfies current scheduling constraints. See bellow for details:]
 

Do you get any information below? Anything in the logs? (attaching them will be 
helpful).

 
 when we start the vm without altering memory and cpu it starts just
 fine.
 
 Is this not supported via JSON, or is this a bug?
 
 PS:
 BTW there seems to be a spelling bug in the error message (bellow).
 

Submitted a patch to address that (see below :-) ). I guess it will be merged 
soon.
Thank you for bringing this typo to our attention.
http://gerrit.ovirt.org/#/c/23087

Oved

 --
 Mit freundlichen Grüßen / Regards
 
 Sven Kieske
 
 Systemadministrator
 Mittwald CM Service GmbH  Co. KG
 Königsberger Straße 6
 32339 Espelkamp
 T: +49-5772-293-100
 F: +49-5772-293-333
 https://www.mittwald.de
 Geschäftsführer: Robert Meyer
 St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
 Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Bug? in tweak vm instance via REST/JSON 3.3.2

2014-01-09 Thread Sven Kieske
Hi, thanks for your fast reply.

well some of this got already resolved as we just put a little to less
memory (dev assumed it was counted in MB ) in the vm, it didn't start
that well with less than 1 MB ;)

So the VM starts just fine now, however the tweak of the cpu cores
still does not work (the vm boots with 1 socket and 1 core instead of 1
socket with 2 cores).

Am 09.01.2014 09:21, schrieb Oved Ourfalli:

 Do you get any information below? Anything in the logs? (attaching them will 
 be helpful).
 

 when we start the vm without altering memory and cpu it starts just
 fine.

 Is this not supported via JSON, or is this a bug?

 PS:
 BTW there seems to be a spelling bug in the error message (bellow).

 
 Submitted a patch to address that (see below :-) ). I guess it will be merged 
 soon.
 Thank you for bringing this typo to our attention.
 http://gerrit.ovirt.org/#/c/23087
 
 Oved

-- 
Mit freundlichen Grüßen / Regards

Sven Kieske

Systemadministrator
Mittwald CM Service GmbH  Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Bug? in tweak vm instance via REST/JSON 3.3.2

2014-01-09 Thread Oved Ourfalli


- Original Message -
 From: Sven Kieske s.kie...@mittwald.de
 To: Oved Ourfalli ov...@redhat.com
 Cc: users@ovirt.org
 Sent: Thursday, January 9, 2014 11:23:43 AM
 Subject: Re: [Users] Bug? in tweak vm instance via REST/JSON 3.3.2
 
 Hi, thanks for your fast reply.
 
 well some of this got already resolved as we just put a little to less
 memory (dev assumed it was counted in MB ) in the vm, it didn't start
 that well with less than 1 MB ;)
 
 So the VM starts just fine now, however the tweak of the cpu cores
 still does not work (the vm boots with 1 socket and 1 core instead of 1
 socket with 2 cores).
 

cc-ing Juan, the API maintainer, as I know there are some gaps in the JSON 
implementation.
When you GET the VM through the REST-API, do you see 1 socket with 1 core, or 1 
socket with 2 cores?
What happens if you do the same thing using XML?

Thank you,
Oved


 Am 09.01.2014 09:21, schrieb Oved Ourfalli:
 
  Do you get any information below? Anything in the logs? (attaching them
  will be helpful).
  
 
  when we start the vm without altering memory and cpu it starts just
  fine.
 
  Is this not supported via JSON, or is this a bug?
 
  PS:
  BTW there seems to be a spelling bug in the error message (bellow).
 
  
  Submitted a patch to address that (see below :-) ). I guess it will be
  merged soon.
  Thank you for bringing this typo to our attention.
  http://gerrit.ovirt.org/#/c/23087
  
  Oved
 
 --
 Mit freundlichen Grüßen / Regards
 
 Sven Kieske
 
 Systemadministrator
 Mittwald CM Service GmbH  Co. KG
 Königsberger Straße 6
 32339 Espelkamp
 T: +49-5772-293-100
 F: +49-5772-293-333
 https://www.mittwald.de
 Geschäftsführer: Robert Meyer
 St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
 Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Bug? in tweak vm instance via REST/JSON 3.3.2

2014-01-09 Thread Sven Kieske
Hi,

sorry for disturbing you all, this also was just an error
in an abstraction layer.

Indeed we are able to set the cores via REST/JSON!

Thanks anyway!

-- 
Mit freundlichen Grüßen / Regards

Sven Kieske

Systemadministrator
Mittwald CM Service GmbH  Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users