software

Lunacloud servers – Starting and stopping servers

1 min read

If you use Lunacloud’s services, you can start or stop virtual machines without going to the control panel. To do this on Linux, you can for example install the curl application (if you don’t have it installed yet):

text
sudo apt-get install curl<br>

To list the virtual machines of an account:

text
curl --user username:password -G  http://apicontrol.lunacloud.com:4465/paci/v1.0/ve<br>

This returns XML content listing the VMs. To start a virtual machine:

text
curl --user username:password -X PUT http://apicontrol.lunacloud.com:4465/paci/v1.0/ve/virtualmachinename/start<br>

To stop a virtual machine:

text
curl --user username:password -X PUT http://apicontrol.lunacloud.com:4465/paci/v1.0/ve/virtualmachinename/stop<br>

#lunacloud#services