Next you need the TemplateID. Since you have created your own template from a transfer, you use the following command:
List Templates TemplateFilter=self filter=name,id
This will return (using my own as an example):
id |
name |
0c8f4b3b-cc0a-488e-b3c5-214b9b63ec0a |
tv-Template-MS-Server-2012R2-RDP |
If you wish to use the SafeSwissCloud provided templates, use TemplateFilter=featured.
Now that you have this information you are ready to deploy your VM with the following command:
Deploy VirtualMachine ZoneID=<zoneid> ServiceOfferingID=<serviceofferingid> TemplateID=<templateid> StartVM=false IPAddress=192.168.30.10 Name=My-VirtualMachine DisplayName=“My Virtual Machine”
(Replace <zoneid> etc with valid IDs) (Command line is not case sensitive)
StartVM=false allows you to create the VM in a “stopped” state. Default value is “true”.
IPAddress=<IP Address> allows you to manually set the VM IP address, must be within the network CIDR range and not already allocated. An error will be returned if you try to set a wrong or pre-allocated IP.
Name and DisplayName should be set otherwise the VM name will be the GUID. Once created you can only change the DisplayName. To change the VM Name you will have to destroy and recreate the VM.