Skip to content

Latest commit

 

History

History
483 lines (298 loc) · 14.1 KB

servers.rst

File metadata and controls

483 lines (298 loc) · 14.1 KB

Servers / VMs

Hypervisors

Servers have hypervisor and cpu_type parameters <hypervisors> whose combination must match the one in the capabilities of the cloud. This page deals with generic server operations. There are specifics for each type of hypervisor:

  • kvm <servers_kvm>
  • solaris_kz <servers_solariskz>

The default hypervisor is kvm to maintain backwards compatibility and the default cpu_type is amd. If you specifiy a different hypervisor and no cpu_type, the API will still use amd.

Allowed HTTP methods

Method Description
GET get / list object/s
POST create new object/s
PUT update / modify object/s
DELETE delete object/s

Note

See 2616#section-9 for more details on HTTP methods semantics

Listing

Detailed listing

Creating

Editing

Attach a drive

Metadata

It is possible to add arbitrary key-value data to a server definition. See meta for more information.

Deleting

Single server

Delete Server together with attached drives (recursive delete)

It is possible to delete a server together with its drives (recursive delete). There are three options: delete all attached drives, delete only disks(non-cdrom drives), or delete only attached cdroms. To recursively delete drives, supply a recurse URL parameter with a value as described in the following table:

Recurse option Effect
all_drives All attached drives regardless of media type will be deleted
disks Only attached drives with media type disk will be deleted
cdroms Only attached drives with media type cdrom will be deleted

Example request to delete a server with all attached drives:

A server is created with a cdrom and disk drives:

dumps/response_server_recurse_del_all_drives_create

The following drives are available in the account:

dumps/response_server_recurse_del_all_drives_drives_before

The server is recursively deleted with all drives:

dumps/request_server_recurse_del_all_drives_delete

After DELETE of the server the, drives attached to the server are deleted:

dumps/response_server_recurse_del_all_drives_drives_after

Example request to delete a server with attached disk drives and leave CDROMs:

A server is created with a cdrom and disk drives:

dumps/response_server_recurse_del_all_drives_create

The following drives are available in the account:

dumps/response_server_recurse_del_disks_drives_before

The server is recursively deleted with all attached drives with media type disk:

dumps/request_server_recurse_del_disks_delete

After DELETE of the server, only drives with media type disk attached to the server are deleted. CDROMs are left intact:

dumps/response_server_recurse_del_disks_drives_after

Server Runtime and Server Details

Server Actions

Start

Warning

Servers have some default network restrictions, applied depending on your user state. Please refer to the default restrictions <firewall_restrictions> section the Firewall policies documentation

Stop

ACPI Shutdown

Start in a separate availability group

It is possible to hint the system which servers are preferred to run on separate hardware host. See servers-avoid.

Open Serial Console Connection

Close Serial Console Connection

Cloning

statuscode 202

Action accepted, execution is proceeding.

Clones a server. Does cascading clone of server drives, i.e. all disk drives attached to the server are cloned and attached to the new server. CDROM drives attached to the clone source are attached to the clone. IPs of the cloned server are set to DHCP. All other properties of the clone are equal to the original.

The optional body can contain a name attribute, which will be the name of the newly-cloned server and/or random_vnc_password boolean attribute which if set will generate a new vnc password for the new server.

Example clone source server:

dumps/response_server_get_clone_source

Example clone request:

dumps/request_server_clone

Example clone response:

dumps/response_server_clone

Note

The name of the cloned drive will be changed using the clone naming strategy set in the profile. See clone_naming for more information

Cloning with Drives on Different Storage (Avoid)

It is possible to hint the system which drives are preferred to be on separate physical storage host. See drives-avoid. I

Server NIC Configurations

The network interfaces are configured in the "nics" attribute. For more information on configuring network interfaces check network_interfaces section.

Here is an example of defining a network interface with a dynamically assigned IP (for brevity only the "nics" attribute of the definitions is shown):

dumps/request_server_add_private_nic

dumps/response_server_add_private_nic

Availability groups

It is possible to query which servers share common hardware hosts. See server-availability.

Public keys

The pubkeys attribute contains a list of keypairs <keypairs> references. The attached pubkeys are available in the server context <server_context>, and can be used by scripts inside the VM, such as cloudinit, to set the public keys automatically. See the attaching keys to a server <attach_pubkeys_to_server> section.

Server State Diagram

image

Schema

dumps/response_server_schema