Do you know how to start a virtual machine (win10) without going through the Truenas web interface.

Joined
May 13, 2021
Messages
1
Hello
I am looking to start a virtual machine (win10) without going through the Truenas web interface.
I use the remote desktop of window to control it.
Thanks in advance for your help.
 

Viandoriel

Dabbler
Joined
Jul 17, 2021
Messages
20
Meanwhile we got lots of updates for TrueNAS and I was also hoping to find a solution for this. Something like WOL?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I am looking to start a virtual machine (win10) without going through the Truenas web interface.
I use the remote desktop of window to control it.
Unless you're prepared to use a script to call the API, you're out of options...

I was also hoping to find a solution for this. Something like WOL?
You can't wake a not-running guest from a WOL magic packet as there's nothing there to listen for it.

Somebody could probably write something to listen to the network for a WOL packet and then launch a script to call the API and start a guest, but that would not then be able to listen on the same IP as the WOL listener... the whole thing is nonsense from the start.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
you can use api calls to start a vm, there's documentation in the API-Docs, but i never used it myself.

vm.start
Arguments:
{ "type": "integer", "_name_": "id", "title": "id" }
{ "type": "object", "properties": { "overcommit": { "type": "boolean", "_name_": "overcommit", "title": "overcommit", "default": false, "_required_": false } }, "additionalProperties": false, "_name_": "options", "title": "options", "default": {}, "_attrs_order_": [ "overcommit" ] }
Start a VM.
options.overcommit defaults to false, meaning VMs are not allowed to start if there is not enough available memory to hold all configured VMs. If true, VM starts even if there is not enough memory for all configured VMs.
Error codes:
ENOMEM(12): not enough free memory to run the VM without overcommit
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Top