VM API - stop/start

Status
Not open for further replies.

Palantus

Cadet
Joined
Feb 16, 2016
Messages
6
Hi

I'm having trouble starting and stopping VMs using the 1.0 and 2.0 API.

On 1.0 API, I cant find documentation for the "vm" endpoint. I can GET /api/v1.0/vm/vm, which is what the Angular interface uses to get status etc. on machines, but I can't figure out how to stop/start machines. The Angular interface seems to use Websocket to do this, which isn't useful in my case.

On 2.0 API the documentation says to POST to eg. /api/v2.0/vm/id/4/start to start the VM with id 4, but I get an internal server error saying "IndexError: list index out of range". I get the id from GET /api/v2.0/vm, so it should be correct.

Can anyone help with getting one of them to work? As I understand it, the 2.0 REST API isn't complete, so it is understandable if it isn't supposed to work yet, but is starting/stopping VMs possible on the 1.0 API (although not in documentation)?

I am using FreeNAS-11.1-U4.

Kind regards
Anders
 
D

dlavigne

Guest
For the version 2 error, please create a report at bugs.freenas.org that shows your code and the full error.
 
Status
Not open for further replies.
Top