Back to Top

How to Deploy a VM in Stopped Sates and with Assigned IP Address using CloudMonkey

Here are the CloudMonkey commands to Create/Deploy a virtual machine in a stopped state (and with IP Address).
To deploy a VM, the minimum information you need are the following:
  • ZoneID
  • ServiceOfferingID
  • TemplateID
To get the ZoneID type the following command:
List Zones filter=name,id
This will return the following:
name id
DC-ZURICH-GLATTBRUGG 3d1dcf11-d482-4f28-a2dd-6afcb51545d2
Next use the following command to get the ServiceOfferingID:
List ServiceOfferings filter=name,id
This will return the following:
name id
FREE - Clustered (1 vCPU - 512M RAM)   bbd12548-9a33-46df-a9f9-97b190c4d2a2
Micro - Clustered HA (1 vCPU - 1 GB) 632e628e-4ee9-4808-a27b-53a8e580187f
Mini - Clustered HA (2 vCPU, 2GB) efd10c0c-431e-4819-abb4-c13c5a28e8fd
Small - Clustered HA (2 vCPU - 4GB) 013c5e22-2f83-48e5-afec-31e1307f4b15
Medium-S Clustered HA (4 vCPU - 4 GB) 90ffeca2-1116-4bbe-bce4-61351a60fcd6
Medium - Clustered HA (4 vCPU - 8GB) f202ca2c-790a-4047-85cb-d831e4e94e7e
Medium-L - Clustered HA (4 vCPU - 16GB) 992ec625-9180-44a2-8bf1-e08bb87025d5
Large-S - Clustered HA (8 vCPU - 8 GB) 9a953625-8081-4e56-aa14-5507ae0b0bcf
Large-6-16 - Clustered HA (6 vCPU - 16 GB) 482a5570-2f7e-4fec-9aa8-ff8ef10bd311
Large - Clustered HA (8 vCPU - 16 GB) 6dadbc20-2020-4980-af15-5ce3c247e21c
XLarge - Clustered HA (8 vCPU - 32 GB)  b738293e-98bf-49c8-837b-09dc0b192ec7
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= 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.