Skip Headers
Oracle® Enterprise Manager Ops Center Cloud Infrastructure API and CLI Reference Guide
12c Release 1 (12.1.3.0.0)

Part Number E25150-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

3 Managing Resources

This chapter describes how a cloud user can manage different resources in an account by using the APIs and CLI. It also includes a basic example for each action that a cloud user can perform to manage these resources by using the cloud infrastructure API and cloud infrastructure CLI.

For a complete reference and other examples that use the cloud infrastructure API and CLI, see also:

Note:

For more information about the cloud infrastructure Java client API, see the Javadoc files included in the package of the API.

3.1 Overview of Cloud User Resources

This section describes the following different resources that a cloud user can manage by using the APIs and CLI:

These resources have both attributes and tags:

Note:

Availability and management of some of these resources might vary depending on the configuration of the vDC. Contact your cloud administrator for more information.

3.1.1 Status of Account Resources

The status attribute is displayed when viewing information or attributes of any of the following account resources:

  • vServers

  • vNets

  • Server templates

  • Volumes

  • Snapshots

  • Distribution groups

This section explains the meaning and usage of the status attribute. The status attribute of an account resource is useful to know because:

  • When a cloud user creates a new account resource, the status indicates if the creation job has completed or the account resource creation is still in progress.

  • The status field indicates whether an account resource is in a usable state or in an unusable state.

An account resource can have one of the following different states:

  • Pending status – Resource creation is in progress.

    • SCHEDULED – Indicates that the creation job is in progress. Wait for the resource to transition from this state before using it.

    • FAILED – Indicates that the creation of the resource failed. A failed job is reflected in the user interface (UI).

  • Healthly status – The resource exists. The following values indicate that a resource is usable.

    • OK – Indicates that the resource is healthy and usable as normal.

    • INFO – Indicates that the resource is healthy but an informational event is awaiting attention in the UI.

    Note:

    For vServer resources, the healthy status values of "OK", "INFO", and "UNKNOWN" is swapped with the runtime state of the vServer. Instead of OK or INFO, a vServer can present one of the following status: RUNNING, BLOCKED, PAUSED, SHUTDOWN, DYING, CRASHED, NOSTATE, SUSPENDED, INSTALLING, SHUTDOWNDETACHED, MIGRATING_SRC, and MIGRATING_DST. Of these running vServer states, BLOCKED, DYING, CRASHED, NOSTATE, and FAILED can be regarded as unhealthy.
  • Unhealthy status – A resource exists. The following values indicate that a resource might not be usable. This does not apply to the WARNING state.

    Note:

    Which status applies depends on the resource; for example, NEEDS_POWERON does not apply to a volume.
    • CRITICAL

    • DECONFIGURED

    • FAULTED

    • MAINTENANCE

    • NON_RECOVERABLE

    • UNCONFIGURED

    • UNINITIALIZED

    • UNKNOWN

    • NEEDS_POWERON

Operations that delete resources might observe a state transition until the point is reached whereby the resource is no longer visible. For example, the process of terminating a vServer can exhibit a transition to the vServer run state SHUTDOWNDETACHED before the resource is removed.

A delete operation could also fail, in which case the resource must transition to one of the unhealthy states in the preceding list.

3.2 Managing Account Access

User management is provided by a central service of Oracle Enterprise Manager Ops Center. The Web service is the entry point for cloud user requests. The Web service uses access keys to authenticate and authorize cloud user requests. A cloud user must create an access key for an account to perform any action for the resources allocated in that account.

An access key consists of an ID, a private key, a public key, and an authentication target account. The private key is used on the client side to sign HTTP requests. The Web service uses the public key to verify incoming HTTP requests and to authenticate the calling user. After creation, the private key is given to the user. The cloud user is responsible for limiting the access to the private key.

The access key management functionality of the Web service is provided by an extra servlet that allows user name and password authentication.

The APIs and CLI provide operations for:

Note:

When using the APIs and CLI, an option is available to manage access keys on behalf of another cloud user. This option is available only to cloud administrators.

3.2.1 Creating an Access Key

A cloud user needs an access key to get access to an account and to authenticate all other HTTP requests for an account. Once an access key is created, the public key is stored in the server-side database to verify the incoming HTTP requests and to authenticate the calling user.

When creating an access key by using the CLI, the private key is provided to the user after the access key creation.

If using the RegisterAccessKey by using the API directly, then the cloud user supplies the public key portion of a key pair and manages the private key himself.

Whichever access key creation method is used, a unique access key identifier, such as AK_5, is supplied to the cloud user for direct use of the API. The cloud user is responsible for limiting the access to the private key.

The cloud infrastructure API actions and the cloud infrastructure CLI command required to create an access key are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
RegisterAccessKeyRequest

CreateAccessKeyAsObjectRequest

akm-create-access-key

Example 3-1 Creating an access key using the Cloud Infrastructure API

https://<username>:<password>@<EnterpriseControllerHostname>/akm/?Action=RegisterAccessKey&Version=1&Timestamp=1330975344&Expires=1333975344&account=ACC-0162da5a-5d25-4096-af59-3dd1de27cfad&publicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAufVdjdp0MmOLbNypLVMWXfmhusawid4Wg4n4FZewSmoBEYA8f8wIA0SI87Shi7RtMcWsEoXvNNHA0wcJoA1RjyVLsI3rtrq0c0k7AxQSwb4UK/rSXW1NXxMh/mE7b3gdA6d9VuwIPnZJ5ZFQUZCLyhaAotLCdACrzbgzYXdqt+rstutT1AVkE2UAMcm5O3KnIoObZKb8JtepSt74A9RgVBkcCBjmKGfLNOL1KlZconkITm85TWKRaGRFuASxdl2ZrD723ZNb66X/a9ebxTMr6vVeskcaZpPlHzvgMOpiyDGwRvxn9yM5WB83zFDGT26Lihn/bKzLJXa+F2YNkLrTJQIDAQAB

Example 3-2 Creating an access key using the Cloud Infrastructure CLI

akm-create-access-key  --base-url https://<EnterpriseControllerHostname>/ --user clouuser1 --password-file ~/pwd.file --account ACC-4b83b85e-592c-45a1-ba71-3bd0774fbd0e --access-key-file ~/tmp_access_key

3.2.2 Viewing Access Key Information

A cloud user can view information about the access keys that the user owns. This information includes a list of the access keys found with the following attributes:

  • Access key ID

  • Account ID associated with the access key

  • Cloud user name associated with the access key

The cloud infrastructure API action and the cloud infrastructure CLI command required to view the access key information are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeAccessKeysRequest akm-describe-access-keys

Example 3-3 Viewing access key information using the Cloud Infrastructure API

https://<username>:<password>@<EnterpriseControllerHostname>/akm/?Action= DescribeAccessKeys&Version=1&Timestamp=1330954619299&Expires=1330954919299

Example 3-4 Viewing access key information using the Cloud Infrastructure CLI

akm-describe-access-keys --base-url https://<EnterpriseControllerHostname>/ --user <username> --password-file ~/pwd.file

3.2.3 Deleting an Access Key

A cloud user can remove an access key from the system when the access key is not required. The access key deletion deletes and invalidates the registered public key. The cloud infrastructure API action and the cloud infrastructure CLI command required to delete an access key are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DeleteAccessKeyRequest akm-delete-access-key

Example 3-5 Deleting an access key information using the Cloud Infrastructure API

https://<username>:<password>@<EnterpriseControllerHostname>/akm/?Action=DeleteAccessKey&Version=1&Timestamp=1318278941862&Expires=1318279241862&accessKeyId=AK_3

Example 3-6 Deleting an access key information using the Cloud Infrastructure CLI

akm-delete-access-key --base-url https://<EnterpriseControllerHostname>/ --user <username> --password-file ~/pwd.file AK_3

3.3 Viewing vDC Capabilities

A cloud user can view details about the capabilities of the vDC for an account. The vDC capabilities listed include:

The cloud infrastructure API action and the cloud infrastructure CLI command required to view vDC capabilities are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeVdcCapabilitiesRequest iaas-describe-vdc-capabilities

Example 3-7 Viewing vDC capabilities using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeVdcCapabilities&Version=1&Timestamp=1320085185647&Expires=1320085485647&AccessKeyId=AK_3&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-8 Viewing vDC capabilities using the Cloud Infrastructure CLI

./iaas-describe-vdc-capabilities --base-url https://<EnterpriseControllerHostname>/ -a ak.file -H

3.4 Managing Virtual Networks

Virtual Network management involves the network connectivity of the vServers in an account. Virtual Network management also includes the connectivity of vServers to an external network.

A vServer is a member of one or more vNets of two different types:

The membership of a vServer in one or more vNets can be specified only at vServer creation time.

The APIs and CLI provide operations for:

3.4.1 Creating a vNet

A cloud user can create private vNets according to the user requirements and within the limits of the account quota.

A public network available in an account is visible to cloud users. However, a cloud user cannot create a public network. The number of public network IP addresses allocated to the cloud user is controlled by the cloud administrator.

The cloud infrastructure API action and the cloud infrastructure CLI command required to create a private vNet are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
CreateVnetRequest iaas-create-vnet

Example 3-9 Creating a vNet using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=CreateVnet&Version=1&AccessKeyId=AK_1&name=privatevnetWebApi&Timestamp=1331058639019&Expires=1331058939019&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-10 Creating a vNet using the Cloud Infrastructure CLI

iaas-create-vnet --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name myVNET

3.4.2 Deleting a vNet

A cloud user can delete only private vNets. The cloud infrastructure API action and the cloud infrastructure CLI command required to delete a private vNet are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DeleteVnetRequest iaas-delete-vnet

Example 3-11 Deleting a vNet using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeleteVnet&Version=1&AccessKeyId=AK_3&vnet=VNET-00cd848c-771a-4091-b3f4-195a090bbc01&Timestamp=1318283467620&Expires=1318283767620&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-12 Deleting a vNet using the Cloud Infrastructure CLI

iaas-delete-vnet --base-url https://<EnterpriseControllerHostname>/ -a ak.file --vnet VNET-5d74972a-bcdd-4714-8c7f-b67d8010f25t

3.4.3 Viewing vNet Information

A cloud user can get information about vNets. The cloud user can restrict the vNets included in the result by specifying filters. If there is no match to the given filters, no special message is returned and the response is empty.

When viewing vNets, a list of available vNets for the account is returned with the following attributes:

  • ID

  • Name

  • Description

  • Status

  • IP address

The cloud infrastructure API action and the cloud infrastructure CLI command required to view vNet information are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeVnetsRequest iaas-describe-vnets

Example 3-13 Viewing vNet information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeVnets&Version=1&AccessKeyId=AK_3&Timestamp=1318283467620&Expires=1318283767620&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-14 Viewing vNet information using the Cloud Infrastructure CLI

iaas-describe-vnets --base-url https://<EnterpriseControllerHostname>/ -a ak.file

3.5 Managing vIP Addresses

A virtual IP (vIP) address is a statically configured IP address that is owned by a user.

A vIP address can be allocated from a public network or private vNet. The allocated vIP address is bound to an account and can be associated with a vServer. The vIP address association is performed at vServer creation time. vIP addresses remain bound to vServers even when the vServer is stopped. vIP addresses are not disassociated until the vServer is deleted.

The APIs and CLI provide operations for:

3.5.1 Allocating a vIP Address

A cloud user can allocate a vIP address from a public network or a private vNet. When creating a vServer, cloud users can statically assigned the allocated vIP address to the vServer.

The cloud infrastructure API action and the cloud infrastructure CLI command required to allocate a vIP address are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
AllocateIpAddressesRequest iaas-allocate-ip-addresses

Example 3-15 Allocating a vIP address using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=AllocateIpAddresses&AccessKeyId=AK_32&vnet=VNET-6ea466f5-6e6b-4159-adf3-8867473d4cf4&Version=1&Timestamp=1320342206808&Expires=1320342506808&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-16 Allocating a vIP address using the Cloud Infrastructure CLI

iaas-allocate-ip-addresses --base-url https://<EnterpriseControllerHostname>/ -a ak.file --vnet VNET-9634972a-bcdd-4714-8c7f-b67d8010f13c

3.5.2 Deallocating a vIP Address

A cloud user can release an allocated vIP address. The vIP address must not be associated with a vServer.

The cloud infrastructure API action and the cloud infrastructure CLI command required to release a vIP address are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
ReleaseIpAddressesRequest iaas-release-ip-addresses

Example 3-17 Deallocating a vIP address using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=ReleaseIpAddresses&AccessKeyId=AK_32&ipAddresses.2=10.6.0.10&ipAddresses.1=10.6.0.13&vnet=VNET-6ea466f5-6e6b-4159-adf3-8867473d4cf4&Version=1&Timestamp=1320341801846&Expires=1320342101846&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-18 Deallocating a vIP address using the Cloud Infrastructure CLI

iaas-release-ip-addresses --base-url https://<EnterpriseControllerHostname>/ -a ak.file --vnet VNET-9634972a-bcdd-4714-8c7f-b67d8010f13c --ip-addresses 192.168.0.1

3.5.3 Viewing vIP Addresses

A cloud user can get information about the vIP addresses that are allocated and which allocated IP addresses are associated with a vServer in an account. To view unallocated IP addresses associated with vServers, use the actions described in "Viewing vServer Information".

The cloud user can restrict the vIP addresses included in the result by specifying filters.

The result includes the following details for each vIP address: IP address, vNet ID, and vServer ID.

The cloud infrastructure API action and the cloud infrastructure CLI command required to view allocated vIP address information are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeIpAddressesRequest iaas-describe-ip-addresses

Example 3-19 Viewing vIP addresses using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeIpAddresses&AccessKeyId=AK_32&Version=1&Timestamp=1320339663115&Expires=1320339963115&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-20 Viewing vIP addresses using the Cloud Infrastructure CLI

iaas-describe-ip-addresses --base-url https://<EnterpriseControllerHostname>/ -a ak.file

3.6 Managing Server Templates

A server template is used to designate the operating system and how it is installed when creating the vServer. Server templates are specific to the processor architecture of the server pool and the virtualization type and might be prebuilt images or identify the operating system distribution.

Server templates are bound to a specific account. Server templates are immutable entities and cannot be changed later, other than changing the name or description.

You require a server template for creating vServers. It has the following attributes:

A new server template can be uploaded as follows:

The APIs and CLI provide operations for:

3.6.1 Uploading a Server Template from a vServer

A cloud user can save a server template from a stopped vServer. When a user creates a vServer based on a server template, it is common to install additional software or to configure certain aspects that can be conserved and reused. To conserve the state, the user must save the vServer as a new server template.

The cloud infrastructure API action and the cloud infrastructure CLI command required to upload a server template from a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
RegisterServerTemplateFromVserverRequest iaas-create-server-template-from-vserver

Example 3-21 Uploading a server template from a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterServerTemplateFromVserver&AccessKeyId=AK_2&name=mySTfromVserver&vserverId=VSRV-fdba0b48-6e1c-4f41-bde4-2c739dfeeb2&Version=1&Timestamp=1324422880552&Expires=1324423180552f&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-22 Uploading a server template from a vServer using the Cloud Infrastructure CLI

iaas-create-server-template-from-vserver --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name myST --vserver-id VSRV-a959be32-6237-40c7-b44b-47d392e7a0ac

3.6.2 Uploading a Server Template from a URL

A cloud user can register a server template based on a file for a single virtual machine template that is ready to be deployed into virtualized platforms. Templates can be of the format .tgz, .tar, or other file types. The file must be accessible through a URL.

The cloud infrastructure API action and the cloud infrastructure CLI command required to register a server template from a URL are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
RegisterServerTemplateFromUrlRequest iaas-create-server-template-from-url

Example 3-23 Uploading a server template from a URL using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterServerTemplateFromUrl&Version=1&Timestamp=1320096741216&Expires=1320097041216&name=myST&url=http%3A%2F%2Fca-server1.us.oracle.com%2Fvm-templates%2FOVM_EL52_jeos_i386_PVM_WebLogic10gR3_v10.tar.gz&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-24 Uploading a server template from a URL using the Cloud Infrastructure CLI

iaas-create-server-template-from-url --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name myAssembly --url http://myServer.com/myTemplate.tar.gz

3.6.3 Uploading a Server Template from an Assembly

A cloud user can upload a server template based on an assembly.

An assembly is a collection of interrelated software appliances that can include a configuration of multiple virtual machines with their virtual disks and their interconnectivity. An assembly is contained in a single .ova (Open Virtualization Format Archive) file. The assembly file must be accessible through a URL.

When you upload an assembly, snapshots might be also created as result. When an assembly contains multiple virtual machines, each virtual machine is unpacked into its own server template. Each template created has a tag set to indicate which assembly it belongs to. This tag name is assemblyKey, and its value is the original assembly ID returned from this action.

The cloud infrastructure API action and the cloud infrastructure CLI command required to register a server template from an assembly are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
RegisterServerTemplatesFromAssemblyRequest iaas-create-server-template-from-assembly

Example 3-25 Uploading a server template from an assembly using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterServerTemplatesFromAssembly&AccessKeyId=AK_3&name=myST2&url=http%3A%2F%2Fadc4120293.us.oracle.com%3A8888%2FmyAssembly.ova&Version=1&Timestamp=1320097901377&Expires=1320098201377&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-26 Uploading a server template from an assembly using the Cloud Infrastructure CLI

iaas-create-server-template-from-assembly --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name myAssembly --url http://myServer.com/myAssembly.ova

3.6.4 Deleting a Server Template

A cloud user can delete a server template. All data associated with the server template is deleted. The deletion of a server template does not affect any vServers that were created based on the server template.

The cloud infrastructure API action and the cloud infrastructure CLI command required to deregister a server template are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DeregisterServerTemplateRequest iaas-delete-server-template

Example 3-27 Deleting a server template using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeregisterServerTemplate&AccessKeyId=AK_3&serverTemplateId=TMPL-f089b985-f7fc-4b8a-a5f8-df8f44c95f3c&Version=1&Timestamp=1320098301701&Expires=1320098601701&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-28 Deleting a server template using the Cloud Infrastructure CLI

iaas-delete-server-template --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --server-template-id TMPL-aaaaaaa8-bbb4-ccc4-ddd4-eeeeeeeeee03

3.6.5 Viewing Server Template Information

A cloud user can get information about server templates. The cloud user can restrict the server templates included in the results by specifying filters.

The information includes details about the server templates of an account and all other server templates registered for public use. The server template attributes displayed are:

  • ID

  • Name

  • Description

  • Status

  • Size

  • Public

  • Image type

  • Read-only

The cloud infrastructure API action and the cloud infrastructure CLI command required to view server template information are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeServerTemplatesRequest iaas-describe-server-templates

Example 3-29 Viewing server template information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeServerTemplates&Version=1&Timestamp=1320088801876&Expires=1320089101876&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-30 Viewing server template information using the Cloud Infrastructure CLI

iaas-describe-server-templates --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file -H

3.7 Managing Storage

Volumes and snapshots are the two types of storage devices that are managed by a cloud user.

The virtual block storage devices are called volumes. Volumes are serially shareable and can be attached to or detached from a vServer.

A snapshot captures the current state of a volume. Snapshots are immutable.

The APIs and CLI provide operations for:

3.7.1 Creating a Volume

A cloud user can create a shared or non-shared empty volume with a given size. A cloud user can also create a shared or nonshared volume from a snapshot. The new volume can be attached to vServers. Shared volumes can be attached to more than one vServer.

The cloud infrastructure API action and the cloud infrastructure CLI command required to create a volume are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
CreateVolumeRequest iaas-create-volume

Example 3-31 Creating a volume using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=CreateVolume&Version=1&Timestamp=1318462897126&Expires=1318463197126&name=myVol2&size=1&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-32 Creating a volume using the Cloud Infrastructure CLI

iaas-create-volume --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name firstVol --size 2

3.7.2 Deleting a Volume

A cloud user can delete a volume. Only volumes that are not currently attached to a vServer can be deleted. The process of deleting a volume does not affect any snapshot that has been created previously based on that volume. The snapshot exists independently of the volume.

The cloud infrastructure API action and the cloud infrastructure CLI command required to delete a volume are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DeleteVolumeRequest iaas-delete-volume

Example 3-33 Deleting a volume using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeleteVolume&Version=1&Timestamp=1318463692509&Expires=1318463992509&volumeId=VOL-3bbc8f1c-bb4c-4a70-a370-4b6c06d990dc&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-34 Deleting a volume using the Cloud Infrastructure CLI

iaas-delete-volume --base-url https://<EnterpriseControllerHostname>/ -a ak.file --volume-id VOL-82b4661e-de12-4931-b9a4-cce8edd23532

3.7.3 Viewing Volume Information

A cloud user can get information about the existing volumes in an account. The cloud user can restrict the volumes included in the result by specifying filters. The result includes volumes in all states and has additional information for each volume.

The attributes displayed for each volume are:

  • ID

  • Name

  • Description

  • Status

  • Shared

  • vServers

The cloud infrastructure API action and the cloud infrastructure CLI command required to view details of a volume are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeVolumesRequest iaas-describe-volumes

Example 3-35 Viewing volume information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeVolumes&Version=1&Timestamp=1318463287921&Expires=1318463587921&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-36 Viewing volume information using the Cloud Infrastructure CLI

iaas-describe-volumes --base-url https://<EnterpriseControllerHostname>/ -a ak.file -H

3.7.4 Attaching a Volume to a vServer

A cloud user can attach volumes to an existing vServer. A cloud user might also attach volumes to a vServer during the vServer creation process. The volume attached is available as a device in the vServer. Depending on the virtualization type of the virtual datacenter, the cloud user might need to stop the vServer before attaching a volume.

The cloud infrastructure API action and the cloud infrastructure CLI command required to attach a volume to a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
AttachVolumesToVserverRequest iaas-attach-volumes-to-vserver

Example 3-37 Attaching a volume to a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=AttachVolumesToVserver&Version=1&Timestamp=1321384886152&Expires=1321385186152&volumeIds.1=VOL-052cb4b4-5e56-4303-8b3a-82d6ba743a15&vserverId=VSRV-8ae29df9-ccfe-4184-acb8-10080665d7f6&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-38 Attaching a volume to a vServer using the Cloud Infrastructure CLI

iaas-attach-volumes-to-vserver --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file -vserver-id VSRV-0fb57293-347c-4717-96ef-6dd23154596f --volume-ids VOL-052cb4b4-5e56-4303-8b3a-82d6ba743a15

3.7.5 Detaching a Volume from a vServer

A cloud user can detach a volume from a vServer. After it is detached, the volume is no longer available as a device in the vServer. Depending on the virtualization type of the vDC, cloud user might need to stop the vServer before detaching a volume.

Caution:

Before detaching a volume from a vServer, ensure that the disk being detached is not longer in use to avoid services instability or disk data corruption. Ensure that the vServer properly unmounts the device for the volume; otherwise, data loss or file system corruption might occur

The cloud infrastructure API action and the cloud infrastructure CLI command required to detach a volume from a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DetachVolumesFromVserverRequest iaas-detach-volumes-from-vserver

Example 3-39 Detaching a volume to a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DetachVolumesFromVserver&Version=1&Timestamp=1321385229679&Expires=1321385529679&volumeIds.1=VOL-052cb4b4-5e56-4303-8b3a-82d6ba743a15&force=true&vserverId=VSRV-8ae29df9-ccfe-4184-acb8-10080665d7f6&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-40 Detaching a volume to a vServer using the Cloud Infrastructure CLI

iaas-detach-volumes-from-vserver --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file -vserver-id VSRV-0fb57293-347c-4717-96ef-6dd23154596f --volume-ids VOL-052cb4b4-5e56-4303-8b3a-82d6ba743a15 --force

3.7.6 Importing a Volume

A cloud user can import a volume from another location. Volumes must be contained in a file of the format .img. The volume must be accessible through a URL. The file is uploaded to the vDC, and the volume is created and stored physically. The imported volume is only accessible within the target account.

The cloud infrastructure API action and the cloud infrastructure CLI command required to import a volume are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
ImportVolumeRequest iaas-import-volume

Example 3-41 Importing a volume using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=ImportVolume&Version=1&Timestamp=1324421943593&Expires=1324422243593&shared=true&name=myVolumeImported&url=http%3A%2F%2Foracle.com%2FES%2FOVM%2Fvolume%2Fvolume1.img&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-42 Importing a volume using the Cloud Infrastructure CLI

iaas-import-volume --base-url https://<EnterpriseControllerHostname>/ -a ak.file --name myVolume --url http://ovm.oracle.com/volume-image/volume.img

3.7.7 Creating a Snapshot

Snapshot creation and management is available if it is supported by the storage of the vDC.

Creating a snapshot serves two main purposes:

  • Backup of data stored on a volume

  • Creation of new volumes from a snapshot

A cloud user can create a snapshot of a volume or, a snapshot can exist as result of uploading an assembly.

There are four types of exposed disks in an assembly's template. When snapshots are created from an assembly, three of the disk type are presented to cloud users as snapshots. This allows cloud users to optionally create a shared volume from the snapshot. The three exposed disks are:

  • Public Populated – An extra disk with data already present.

  • Private Raw – Dynamically created as an empty disk with a size but no disk data.

  • Shared Raw – Dynamically created as an empty disk, with a size but no disk data.

The cloud infrastructure API action and the cloud infrastructure CLI command required to create a snapshot of an existing volume are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
CreateSnapshotRequest iaas-create-snapshot

Example 3-43 Creating a snapshot using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=CreateSnapshot&Version=1&Timestamp=1318466247111&Expires=1318466547111&volumeId=VOL-246b5c62-4072-41cf-885b-99d6c63583bd&name=mySnapshot&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-44 Creating a snapshot using the Cloud Infrastructure CLI

iaas-create-snapshot --base-url https://<EnterpriseControllerHostname>/ -a ak.file --volume-id VOL-246b5c62-4072-41cf-885b-99d6c63583bd --name mySnapshot

3.7.8 Deleting a Snapshot

A cloud user can delete a snapshot of a volume. The deletion of a snapshot does not affect any volumes or any other snapshots. Snapshots exist independently of the volume. The cloud infrastructure API action and the cloud infrastructure CLI command required to delete a snapshot are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DeleteSnapshotRequest iaas-delete-snapshot

Example 3-45 Deleting a snapshot using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeleteSnapshot&Version=1&Timestamp=1318624338550&Expires=1318624638550&snapshotId=SNAP-2f2039cd-943b-4072-9ded-e96b54b7ca79&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-46 Deleting a snapshot using the Cloud Infrastructure CLI

iaas-delete-snapshot --base-url https://<EnterpriseControllerHostname>/ -a ak.file --snapshot-id SNAP-d743e90c-53c5-4b01-a297-e2c944755c48

3.7.9 Viewing Snapshot Information

A cloud user can get information about the existing snapshots in an account. The cloud user can restrict the snapshots included in the result by specifying filters. The result includes a list of the snapshots found and additional information for each snapshot.

The attributes displayed for each snapshot are:

  • ID

  • Name

  • Description

  • Status

The cloud infrastructure API action and the cloud infrastructure CLI command required to view snapshot information are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeSnapshotsRequest iaas-describe-snapshots

Example 3-47 Viewing snapshot information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeSnapshots&Version=1&Timestamp=1318467903784&Expires=1318468203784&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-48 Viewing snapshot information using the Cloud Infrastructure CLI

iaas-describe-snapshots --base-url https://<EnterpriseControllerHostname>/ -a ak.file -H

3.8 Managing Distribution Groups

Distribution groups are necessary for properties similar to anti-affinity scaling. All vServers that are created in a distribution group are placed on separate server of the server pool that the vDC uses. If a spare server is not available, then the create vServer job fails.

The APIs and CLI provide operations for:

3.8.1 Creating a Distribution Group

A cloud user can create distribution groups to associate them with vServer. The membership of a vServer to a distribution group can only be specified at vServer creation time.

When creating a distribution group, a cloud user can specify a maximum number of vServers to be added to the distribution group, the default size is 50000.

The cloud infrastructure API action and the cloud infrastructure CLI command required to create a distribution group are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
CreateDistributionGroupRequest iaas-create-distribution-group

Example 3-49 Creating a distribution group using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=CreateDistributionGroup&Version=1&Timestamp=1324407098313&Expires=1324407398313&name=myDistributionGroup&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-50 Creating a distribution group using the Cloud Infrastructure CLI

iaas-create-distribution-group --base-url https://<EnterpriseControllerHostname>/ -a ak.file --name myDistributionGroup

3.8.2 Deleting a Distribution Group

A cloud user can delete distribution groups that are not associated with vServer. The cloud infrastructure API action and the cloud infrastructure CLI command required to delete a distribution group are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DeleteDistributionGroupRequest iaas-delete-distribution-group

Example 3-51 Deleting a distribution group using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeleteDistributionGroup&Version=1&Timestamp=1324407269441&Expires=1324407569441&distributionGroupId=DG-8f81381c-a559-4f5b-b45f-086e605a382b&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-52 Deleting a distribution group using the Cloud Infrastructure CLI

iaas-delete-distribution-group --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --distribution-group-id DG-3206ed4d-44c9-42c4-8df7-511709a49ead

3.8.3 Viewing Distribution Group Information

A cloud user can get information about the existing distribution groups in an account. The cloud user can restrict the distribution groups included in the result by specifying filters. The result includes a list of the distribution groups found and additional information for each distribution group.

The attributes displayed for each distribution group are:

  • ID

  • Name

  • Description

  • Status

  • vServers

  • Size

The cloud infrastructure API action and the cloud infrastructure CLI command required to view details of a distribution group are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeDistributionGroupsRequest iaas-describe-distribution-groups

Example 3-53 Viewing distribution groups information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeDistributionGroups&Version=1&Timestamp=1324407152926&Expires=1324407452926&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-54 Viewing distribution groups information using the Cloud Infrastructure CLI

iaas-describe-distribution-groups --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file -H

3.9 Managing vServers

A vServer has its own identity, local storage, interfaces, and configuration that exist for the lifetime of the vServer. vServers are created based on a server template and vServer types. A vServer type defines hardware characteristics of the vServer, such as CPU, memory size, and the network bandwidth.

Each vServer is a member of one or more vNets that define the network connectivity. A vServer has temporary local storage. For hard disk storage, the associated volume is used. A vServer can have one or more volumes attached.

The APIs and CLI provide operations for:

3.9.1 Viewing vServer Types

A cloud user can get information about all available vServer types for an account. The cloud user can restrict the vServer types included in the result by specifying filters. The result includes a list of the vServer types found and additional information for each vServer type. If the response is an empty list, contact your cloud administrator to verify your cloud user's privileges.

The attributes displayed for each vServer type are:

  • ID

  • Name

  • Description

  • Status

  • Memory Size

  • Storage Size

  • vCPU

The cloud infrastructure API action and the cloud infrastructure CLI command required to list the vServer types are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeVserverTypesRequest iaas-describe-vserver-types

Example 3-55 Listing vServer types using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeVserverTypes&Version=1&Timestamp=1318625453358&Expires=1318625753358&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-56 Listing vServer types using the Cloud Infrastructure CLI

iaas-describe-vserver-types --base-url https://<EnterpriseControllerHostname>/ -a ak.file -H

3.9.2 Creating a vServer

A cloud user can create a single vServer or multiple vServers at once based on a server template. When a vServer is created, it is automatically started.

When creating a single vServer, the cloud user must use an allocated vIP address. When creating multiple vServer an IP address is automatically assigned from each specified vNets.

When a cloud user creates a vServer, the following resources are required:

  • A vServer type

  • A server template

  • One or more vNets

Depending on the needs of the user and the virtualization type of the vDC, a cloud user can also specify the following resources:

  • A key pair

  • One or more volumes

  • A Distribution group

Additionally to the resources listed, a cloud user might specify the following values when creating a vServer:

  • A hostname to override vServer default internal host name, which is same as vServer name.

  • A root password

  • One or more messages for the vServer

  • Enable or disable high availabitility

High Availability (HA)

When creating a vServer, a cloud user might choose to enable or disable the high availability feature for the vServer. By default, the value of this option is determined by the HighAvailabilityDefault capability of the vDC. If a cloud user chooses not to use the default value, then an option is available to specify a different value; in this case, the HighAvailabilityUserControl capability of the vDC must be enabled. Cloud users can also enable or disable high availability for an existing vServer, see "Modifying Attributes of an Account Resource".

The cloud infrastructure API action and the cloud infrastructure CLI command required to create and start vServers are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
RunVserverRequest or RunVserversRequest iaas-run-vserver or iaas-run-vservers

Example 3-57 Creating a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RunVserver&Version=1&Timestamp=1321379615665&Expires=1321379915665&vserverType=457&keyName=myKeyPair&vnets.1=VNET-84ada392-1c13-4f86-8365-1cf7f9c8aadf&name=myVserver&ipAddresses.1=192.168.0.2&serverTemplateId=TMPL-9e4a9ed3-e675-45f1-9d7c-b21c25a55632&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-58 Creating a vServer using the Cloud Infrastructure CLI

iaas-run-vserver --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file --vnets VNET-84ada392-1c13-4f86-8365-1cf7f9c8aadf --key-name myKeyPair --name myVserver --server-template-id TMPL-9e4a9ed3-e675-45f1-9d7c-b21c25a55632 --ip-addresses 192.168.0.2 --vserver-type 457

3.9.3 Deleting a vServer

A cloud user can delete a vServer. Deleting a vServer results in shutting down the vServer followed by the deletion of the vServer. The cloud infrastructure API action and the cloud infrastructure CLI command required to terminate a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
TerminateVserversRequest iaas-terminate-vservers

Example 3-59 Deleting a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=TerminateVservers&Version=1&Timestamp=1321385662260&Expires=1321385962260&vserverIds.1=VSRV-0fb57293-347c-4717-96ef-6dd23154596f&force=true&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-60 Deleting a vServer using the Cloud Infrastructure CLI

iaas-terminate-vservers --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file --vserver-ids VSRV-0fb57293-347c-4717-96ef-6dd23154596f --force

3.9.4 Viewing vServer Information

A cloud user can get information about all available vServers for an account. The cloud user can restrict the vServers included in the result by specifying filters. The result includes a list of the vServers found and additional information for each vServer.

The attributes displayed for each vServer are:

  • ID – ID of the vServer

  • Name – Name of the vServer

  • Description – Description of the vServer

  • Status – Status of the vServer

  • vNets – IDs of the vNets to which the vServer belongs to

  • IP addresses – IP addresses associated with the vServer

  • Server template ID – ID of the server template that the vServer is based on

  • Key pair name – Name of the key pair installed in the vServer for secure shell access

  • vServer type – vServer type that the vServer is based on

  • HA – Flag to indicate whether the vServer is set to automatic recovery

  • Distribution group – ID of the distribution group the vServer belongs to

  • Volumes – ID of the volumes associated with the vServer

  • vCPU – Number of virtual CPUs allocated to a vServer

  • Memory – Total memory allocated to a vServer

  • Dedicated storage – Total storage dedicated to the vServer

  • Attached storage – Total storage of the volumes attached to the vServer

  • Tags – List of tags associated with the vServer

The cloud infrastructure API action and the cloud infrastructure CLI command required to view vServer information are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeVserversRequest iaas-describe-vservers

Example 3-61 Viewing vServer information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeVservers&Version=1&Timestamp=1320105338731&Expires=1320105638731&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-62 Viewing vServer information using the Cloud Infrastructure CLI

iaas-describe-vservers --base-url https://<EnterpriseControllerHostname>/ -a ak.file -H

3.9.5 Viewing vServer Metrics

A cloud user can get information about the cpu usage of the vServers. The cloud user can restrict the vServers included in the result by specifying filters. The result includes a list of the vServers found and additional information for each vServer.

The attributes displayed for each vServer are:

  • ID – ID of the vServer

  • Name – Name of the vServer

  • Description – Description of the vServer

  • Status – Status of the vServer

  • CPU usage – CPU usage of the vServer

  • Tags – List of tags associated with the vServer

The cloud infrastructure API action and the cloud infrastructure CLI command required to view vServer metrics are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeVserverMetricsRequest iaas-describe-vserver-metrics

Example 3-63 Viewing vServer metrics using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeVserverMetrics&Version=1&Timestamp=1320105338731&Expires=1320105638731&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-64 Viewing vServer metrics using the Cloud Infrastructure CLI

iaas-describe-vserver-metrics --base-url https://<EnterpriseControllerHostname>/ -a ak.file -H

3.9.6 Stopping a vServer

A cloud user can stop a vServer. When a vServer is stopped, the guest operating system is shut down. A stopped vServer can be restarted later. The cloud infrastructure API action and the cloud infrastructure CLI command required to stop a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
StopVserversRequest iaas-stop-vservers

Example 3-65 Stopping a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=StopVservers&Version=1&Timestamp=1320105610783&Expires=1320105910783&vserverIds.1=VSRV-c1e236e6-ef4d-4936-911a-97923dfbc291&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-66 Stopping a vServer using the Cloud Infrastructure CLI

iaas-stop-vservers --base-url https://<EnterpriseControllerHostname>/ -a ak.file --vserver-ids VSRV-c1e236e6-ef4d-4936-911a-97923dfbc291

3.9.7 Starting a vServer

A cloud user can start a vServer that has been stopped. The restarted vServer might not get the same IP address as the original vServer. The cloud infrastructure API action and the cloud infrastructure CLI command required to start a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
StartVserversRequest iaas-start-vservers

Example 3-67 Starting a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=StartVservers&Version=1&Timestamp=1320104759496&Expires=1320105059496&vserverIds.1=VSRV-c1e236e6-ef4d-4936-911a-97923dfbc291&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-68 Starting a vServer using the Cloud Infrastructure CLI

iaas-start-vservers --base-url https://<EnterpriseControllerHostname>/ -a ak.file --vserver-ids VSRV-c1e236e6-ef4d-4936-911a-97923dfbc291

3.9.8 Rebooting a vServer

A cloud user can reboot a vServer. Rebooting a vServer does not change the IP address and other resources of the vServer. The cloud infrastructure API action and the cloud infrastructure CLI command required to reboot a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
RebootVserversRequest iaas-reboot-vservers

Example 3-69 Rebooting a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RebootVservers&Version=1&Timestamp=1321380470326&Expires=1321380770326&vserverIds.1=VSRV-0fb57293-347c-4717-96ef-6dd23154596f&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-70 Rebooting a vServer using the Cloud Infrastructure CLI

iaas-reboot-vservers --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file --vserver-ids VSRV-0fb57293-347c-4717-96ef-6dd23154596f

3.9.9 Sending a Message to a vServer

A cloud user can send messages to a vServer and these messages can be read from the guest operating system. The messages are sent to a common buffer in the virtualization layer that has a limited size. This action might return an error if the size limit is reached or if the vServer is not in appropriate state to send messages.

The cloud infrastructure API action and the cloud infrastructure CLI command required to send messages to a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
SendMessagesToVserverRequest iaas-send-messages-to-vserver

Example 3-71 Sending messages to a vServer using the Cloud Infrastructure API

ttps://<EnterpriseControllerHostname>/iaas/?Action=SendMessagesToVserver&Version=1&Timestamp=1321381585564&Expires=1321381885564&messages.1.value=Running&messages.1.key=myStatus&vserverId=VSRV-8ae29df9-ccfe-4184-acb8-10080665d7f6&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-72 Sending messages to a vServer using the Cloud Infrastructure CLI

iaas-send-messages-to-vserver --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file  --vserver-id VSRV-8ae29df9-ccfe-4184-acb8-10080665d7f6 --messages com.oracle.ovab.test=Running

3.9.10 Receiving a Message from a vServer

A cloud user can read a message sent by a vServer. The message is read from the common buffer in the virtualization layer by name. This action might return an error if the vServer is not in appropriate state to receive messages.

The cloud infrastructure API action and the cloud infrastructure CLI command required to receive a message from a vServer are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
ReceiveMessageFromVserverRequest iaas-receive-message-from-vserver

Example 3-73 Receiving message from a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=ReceiveMessageFromVserver&Version=1&Timestamp=1321381585564&Expires=1321381885564&vserverId=VSRV-8ae29df9-ccfe-4184-acb8-10080665d7f6&key=myMessageKey&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-74 Receiving message from a vServer using the Cloud Infrastructure CLI

iaas-receive-message-from-server --base-url https://<EnterpriseControllerHostname>/ -a ~/ak.file  --vserver-id VSRV-8ae29df9-ccfe-4184-acb8-10080665d7f6 --key com.oracle.ovab.test-response

3.10 Managing Key Pairs

The Web service provides the key pair management functionality. Key pair management defines a way to get the credentials for user authentication to access the guest operating system. Key pairs restrict access to vServers created by a cloud user based on common server templates. The credentials to supply are chosen by the cloud user before the vServer is created or run for the first time. Key pairs are managed per account and they are only visible as tags.

The APIs and CLI provide operations for:

3.10.1 Creating a Key Pair

A cloud user can create a key pair to be associated with a vServer as part of the create vServer operation. When a key pair is created, a public key is stored in the application and a private key is handed out to the user.

The key pair is typically an RSA 2048-bit key. If a different key pair strength is required, use the Import Key Pair action.

The cloud infrastructure API action and the cloud infrastructure CLI command required to create a key pair are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
RegisterKeyPairRequest iaas-create-key-pair

Example 3-75 Creating a key pair using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterKeyPair&Version=1&Timestamp=1318279380444&Expires=1318279680444&publicKey=ssh-rsa+AAAAB3NzaC1yc2EAAAADAQABAAABAQDg2eienGE4vEMSMcVMbYbC8z2q%2Fvhz3H6AanlJ6B4udseK%0A8CpaHJ23eGWcjcgAmuZCJ%2FOoHUA2dN2PNPuK6g%2BZndR8wVaaQT89eWDZx9oaf0%2F2Eg%2FLeKJ3moVH%0AvIYvFB9aFCpa4H%2BOmLfM%2FmfQ4CYeDfo0r0jxCCB0YLo0876LQqK5X%2BtgRXwbAbPH2Mzbzp%2FzzdkQ%0ArsBqSgUQ%2B1V4LkN6TQe06P5a2QYIlUhRXwUorTnbXczGq9zEJJ7ef%2F74xIQZfAipkYkyGgktsXrM%0A%2F%2Bs789v9ipaDB5B26y3aqjIdvW4ZLDvuGXPs60aiUfj2WGIqx0KSVL%2FyB%2FtK1WbuZYwl+IaaS-Generated&keyName=myKeyPairK&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-76 Creating a key pair using the Cloud Infrastructure CLI

iaas-create-key-pair --base-url https://<EnterpriseControllerHostname>/ -a ak.file --key-name myKeyPair --key-file myKeyFile

3.10.2 Importing a Key Pair

A cloud user can import a public key pair that was created with a third-party tool using the RSA encryption algorithm. The length of the formatted key string is limited to 2048 characters.

When importing a key pair, the cloud user supplies the file that stores the public key and then the public key is registered. The cloud user manages the private key himself.

The cloud infrastructure API action and the cloud infrastructure CLI command required to import a key pair are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
ImportKeyPairRequest,

RegisterKeyPairRequest

iaas-import-key-pair

Example 3-77 Importing a key pair using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterKeyPair&Version=1&Timestamp=1324421510757&Expires=1324421810757&publicKey=ssh-rsa+AAAAB3NzaC1yc2EAAAABIwAAAQEAtJnFD8INGLtM%2FQIlxkDjh4t2R4%2FtTMpUDzMIRP%0A&keyName=myKeyPair&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-78 Importing a key pair using the Cloud Infrastructure CLI

iaas-import-key-pair --base-url https://<EnterpriseControllerHostname>/ -a ak.file --key-name myOtherPair --key-file myOtherPair.key

3.10.3 Deleting a Key Pair

A cloud user can delete a key pair from an account. When a key pair is deleted, the public key registered in the application is deleted and no longer valid.The cloud infrastructure API action and the cloud infrastructure CLI command required to delete a key pair are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DeleteKeyPairRequest iaas-delete-key-pair

Example 3-79 Deleting a key pair using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeleteKeyPair&Version=1&Timestamp=1318281994430&Expires=1318282294430&keyName=myKeyPair&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-80 Deleting a key pair using the Cloud Infrastructure CLI

iaas-delete-key-pair --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --key-name myKeyPairName

3.10.4 Viewing Key Pair Information

A cloud user can get information about the existing key pairs in an account. The cloud user can restrict the key pairs included in the result by specifying filters. The result includes the name and fingerprint for each key pair found.

The cloud infrastructure API action and the cloud infrastructure CLI command required to view information about a key pair are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeKeyPairsRequest iaas-describe-key-pairs

Example 3-81 Viewing key pair information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeKeyPairs&Version=1&Timestamp=1320361610130&Expires=1320361910130&AccessKeyId=AK_32&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-82 Viewing key pair information using the Cloud Infrastructure CLI

iaas-describe-key-pairs --base-url https://<EnterpriseControllerHostname>/ -a ak.file

3.11 Managing Attributes of an Account Resource

A set of attributes exists for each type of account resource in an account. The management of attributes of an account resource includes viewing and modifying the value of specific attributes for an account resource. A cloud user can only manage the attributes of the following account resources: volumes, snapshots, vServers, server templates, and vNets.

The APIs and CLI provide operations for:

3.11.1 Viewing Attributes of an Account Resource

A cloud user can view the value of specific attributes of an account resource. To view the attribute value, the cloud user needs to specify:

  • ID of a valid account resource.

  • One or more attribute names for the account resource. Attribute names for a resource are listed when viewing an account resource information.

The cloud infrastructure API action and the cloud infrastructure CLI command required to view the attributes of an account resource are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeAttributesRequest iaas-describe-attributes

Example 3-83 Viewing attributes of an account resource using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeAttributes&Version=1&Timestamp=1318464041596&Expires=1318464341596&attrNames.4=shared&resourceId=VOL-246b5c62-4072-41cf-885b-99d6c63583bd&attrNames.3=size&attrNames.2=status&attrNames.1=id&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-84 Viewing attributes of an account resource using the Cloud Infrastructure CLI

iaas-describe-attributes --base-url https://<EnterpriseControllerHostname>/ -a ak.file --id VNET-7403e87f-1bab-4097-98ae-ea72d8fe4b3f --attr-names name

3.11.2 Modifying Attributes of an Account Resource

A cloud user can modify the values of the attributes of the following account resources: volumes, snapshots, vServers, server templates, and vNets. The attributes that are editable for these account resources are name and description.

When the HighAvailabilityUserControl capability is enabled in the vDC, cloud users can also enable or disable high availability for an existing vServer by modifying the HA attribute of the vServer.

The cloud infrastructure API action and the cloud infrastructure CLI command required to modify the attributes of a resource are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
ModifyAttributesRequest iaas-modify-attributes

Example 3-85 Modifying vNet attributes using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=ModifyAttributes&Version=1&Timestamp=1318464546890&Expires=1318464846890&resourceId=VOL-246b5c62-4072-41cf-885b-99d6c63583bd&attributes.2.value=myNewDescription&attributes.2.name=description&attributes.1.name=name&attributes.1.value=myNewName&AccessKeyId=AK_2&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-86 Modifying vNet attributes using the Cloud Infrastructure CLI

iaas-modify-attributes --base-url https://<EnterpriseControllerHostname>/ -a ak.file --id VNET-7403e87f-1bab-4097-98ae-ea72d8fe4b3f --attributes name=myNewName

3.12 Managing Tags

A tag is a key and value pair that can be attached to a resource. The key and the value are strings. All entities in Oracle Enterprise Manager Ops Center are managed resources that can be tagged. Tags are used to bind user-specific information to entities.

The APIs and CLI provide operations for:

3.12.1 Creating a Tag

A cloud user can create a tag. Creating a tag adds a new tag or overwrites an existing tag. The cloud infrastructure API action and the cloud infrastructure CLI command required to create a tag are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
CreateTagsRequest iaas-create-tags

Example 3-87 Creating a tag using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=CreateTags&Version=1&Timestamp=1320101484395&Expires=1320101784395&resourceId=VNET-9ba968d5-e64f-4b54-a639-ee3d398e0d50&tags.1.name=myTag&tags.1.value=myTagValue&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-88 Creating a tag using the Cloud Infrastructure CLI

iaas-create-tags --base-url https://<EnterpriseControllerHostname>/ -a ak.file --id VNET-5d74972a-bcdd-4714-8c7f-b67d8010f25t --tags myTag=myTagValue

3.12.2 Removing a Tag

A cloud user can remove tags from an account resource of an account. The cloud infrastructure API action and the cloud infrastructure CLI command required to remove a tag are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeTagsRequest iaas-delete-tags

Example 3-89 Deleting a tag using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeleteTags&Version=1&Timestamp=1320102752960&Expires=1320103052960&resourceId=VNET-9ba968d5-e64f-4b54-a639-ee3d398e0d50&tags.1.name=myTag&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-90 Deleting a tag using the Cloud Infrastructure CLI

iaas-delete-tags --base-url https://<EnterpriseControllerHostname>/ -a ak.file --id VNET-5d74972a-bcdd-4714-8c7f-b67d8010f25t --tags myTag

3.12.3 Viewing Tag Information

A cloud user can get information about tags attached to an account resource. The cloud user can restrict the tags included in the result by specifying filters. The result includes the ID of the account resource, along with the name and value of the tags found. The cloud infrastructure API action and the cloud infrastructure CLI command required to view tags information are:

Cloud Infrastructure API Action Cloud Infrastructure CLI Command
DescribeTagsRequest iaas-describe-tags

Example 3-91 Viewing tag information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeTags&Version=1&Timestamp=1320101837081&Expires=1320102137081&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-92 Viewing tag information using the Cloud Infrastructure CLI

iaas-describe-tags --base-url https://<EnterpriseControllerHostname>/ -a ak.file