========= Instances ========= About Instances =============== Cirrus provides administrators with complete control over the lifecycle of all guest Instances executing in the cloud. Cirrus provides several guest management operations for end Users and administrators. Instances may be stopped, started, rebooted, and destroyed. Guest Instances have a name and group. Instance names and groups are opaque to Cirrus and are available for end Users to organize their Instances. Each Instance can have three names for use in different contexts. Only two of these names can be controlled by the User: * Instance name: a unique, immutable ID that is generated by Cirrus and can not be modified by the User. This name conforms to the requirements in IETF RFC 1123. * Display name: the name displayed in the Cirrus web UI. Can be set by the User. Defaults to Instance name. * Name: host name that the DHCP server assigns to the Instance. Can be set by the User. Defaults to Instance name Instance Lifecycle ================== Instances can be in the following states: * Created * Running * Stopped * Destroyed * Expunged With the intermediate states of * Creating * Starting * Stopping * Expunging Creating Instances ================== Instance are usually created from a Template. Users can also create blank Instances. A blank Instance is a virtual machine without an OS Template. Users can attach an ISO file and install the OS from the CD/DVD-ROM. To create an Instance from a Template: #. In the left navigation bar, click Compute then Instances. #. Click the Add Instance button. #. Select a zone. Admin Users will have the option to select a pod, cluster or host. #. Select a Template or ISO. For more information about how the Templates came to be in this list, see *Working with Templates*. #. Select a service offering. Be sure that the hardware you have allows starting the selected service offering. If the selected template has a tag associated with it then only supported service offerings will be available for the selection. #. Select a disk offering. #. Select/Add a Network. #. Click Launch Instance and your Instance will be created and started. Accessing Instances =================== Any User can access their own Instances. The administrator can access all Instances running in the cloud. To access an Instance through the Cirrus UI: #. Log in to the Cirrus UI as a User or admin. #. Click Compute then Instances, then click the name of a running Instance. #. Click the View Console button depicts adding an iso image. To access an Instance directly over the Network: #. The Instance must have some port open to incoming traffic. For example, in a basic zone, a new Instance might be assigned to a security group which allows incoming traffic. This depends on what security group you picked when creating the Instance. In other cases, you can open a port by setting up a port forwarding policy. See “IP Forwarding and Firewalling”. #. If a port is open but you can not access the Instance using ssh, it's possible that ssh is not already enabled on the Instance. This will depend on whether ssh is enabled in the Template you picked when creating the Instance. Access the Instance through the Cirrus UI and enable ssh on the machine using the commands for the Instance's operating system. #. If the Network has an external firewall device, you will need to create a firewall rule to allow access. See “IP Forwarding and Firewalling”. Stopping and Starting Instance ============================== Once an Instance is created, you can stop, restart, or delete it as needed. In the Cirrus UI, click Instances, select the Instance, and use the Stop, Start, Reboot, and Destroy buttons. A stop will attempt to gracefully shut down the operating system, via an ACPI ‘stop' command which is similar to pressing the soft power switch on a physical server. If the operating system cannot be stopped, it will be forcefully terminated. This has the same effect as pulling out the power cord from a physical machine. A reboot should not be considered as a stop followed by a start. In Cirrus, a start command reconfigures the Instance to the stored parameters in Cirrus's database. The reboot process does not do this. When starting an Instance, admin Users have the option to specify a pod, cluster, or host. Deleting Instance ================= Users can delete their own Instance. A running Instance will be abruptly stopped before it is deleted. Administrators can delete any Instance. To delete an Instance: #. In the left navigation, click Compute then Instances. #. Choose the Instance that you want to delete. #. Click the Destroy Instance button. button to destroy an Instance #. Optionally both expunging and the deletion of any attached volumes can be enabled. When an Instance is destroyed, it can no longer be seen by the end User, however, it can be seen (and recovered) by a root admin. In this state it still consumes logical resources. Global settings control the maximum time from an Instance being destroyed, to the physical disks being removed. When the Instance and its rooot disk have been deleted, the Instance is said to have been expunged. Once an Instance is expunged, it cannot be recovered. All the resources used by the Instance will be reclaimed by the system, This includes the Instance's IP address. Managing Instances ================== Scheduling operations on an Instance ------------------------------------- After an Instance is created, you can schedule Instance lifecycle operations using cron expressions. The operations that can be scheduled are: * Start * Stop * Reboot * Force Stop * Force Reboot To schedule an operation on an Instance through the UI: #. In the left navigation, click Instances. #. Click the Instance that you want to schedule the operation on. #. On the Instance details page, click the Schedule button. Instance Schedule Tab #. Click on Add schedule button to add a new schedule or click on Edit button button to edit the properties of an Instance to edit an existing schedule. Instance Schedule Form #. Configure the schedule as per requirements: * Description: Enter a description for the schedule. If left empty, it's generated on the basis of action and the schedule. * Action: Select the action to be triggered by the schedule. Can't be changed once the schedule has been created. * Schedule: Select the frequency using cron format at which the action should be triggered. For example, * * * * * will trigger the job every minute. * Timezone: Select the timezone in which the schedule should be triggered. * Start Date: Date at the specified time zone after which the schedule becomes active. Defaults to current timestamp plus 1 minute. * End Date: Date at the specified time zone before which the schedule is active. If not set, schedule won't become inactive. #. Click OK to save the schedule. .. note:: It's not possible to remove the end date once it's configured. If multiple schedules are configured for an Instance and the scheduled time coincides, then only the schedule which was created first will be executed and the rest will be skipped. Changing the Instance Name, OS, or Group ----------------------------------------- After an Instance is created, you can modify the display name, operating system, and the group it belongs to. To access an Instance through the Cirrus UI: #. In the left navigation, click Instances. #. Select the Instance that you want to modify. #. Click the Stop button to stop the Instance. depicts adding an iso image #. Click Edit. button to edit the properties of an Instance #. Make the desired changes to the following: * Display name: Enter a new display name if you want to change the name of the Instance. * OS Type: Select the desired operating system. * Group: Enter the group name for the Instance. #. Click Apply. Changing the Service Offering for an Instance --------------------------------------------- To upgrade or downgrade the level of compute resources available to an Instance, you can change the Instance's compute offering. #. In the left navigation, click Instances. #. Choose the Instance that you want to work with. #. Click the Stop button to stop the Instance. depicts adding an iso image #. Click the Change Service button. button to change the service of an Instance The Change service dialog box is displayed. #. Select the offering you want to apply to the selected Instance. #. Click OK. Instance Snapshots ================== In addition to the existing Cirrus ability to snapshot individual Instance volumes, you can take an Instance Snapshot to preserve all the Instance's data volumes as well as (optionally) its CPU/memory state. This is useful for quick restore of an Instance. For example, you can snapshot an Instance, then make changes such as software upgrades. If anything goes wrong, simply restore the Instance to its previous state using the previously saved Instance Snapshot. The Snapshot is created using the hypervisor's native Snapshot facility. The Instance Snapshot includes not only the data volumes, but optionally also whether the Instance is running or turned off (CPU state) and the memory contents. The Snapshot is stored in Cirrus's primary storage. Instance Snapshots can have a parent/child relationship. Each successive Snapshot of the same Instance is the child of the Snapshot that came before it. Each time you take an additional Snapshot of the same Instance, it saves only the differences between the current state of the Instance and the state stored in the most recent previous Snapshot. The previous Snapshot becomes a parent, and the new Snapshot is its child. It is possible to create a long chain of these parent/child Snapshots, which amount to a “redo” record leading from the current state of the Instance back to the original. After Instance Snapshots are created, they can be tagged with a key/value pair, like many other resources in Cirrus. Using Instance Snapshots ------------------------- To create an Instance Snapshot using the Cirrus UI: #. Click Instances. #. Click the name of the Instance you want to Snapshot. #. Click the Take Instance Snapshot button. button to restart a VPC .. note:: If a Snapshot is already in progress, then clicking this button will have no effect. #. Provide a name and description. These will be displayed in the Instance Snapshots list. #. (For running Instances only) If you want to include the Instance's memory in the Snapshot, click the Memory checkbox. This saves the CPU and memory state of the Instance. If you don't check this box, then only the current state of the Instance disk is saved. Checking this box makes the Snapshot take longer. #. Quiesce Instance: check this box if you want to quiesce the file system on the Instance before taking the Snapshot. Not supported on XenServer when used with Cirrus-provided primary storage. When this option is used with Cirrus-provided primary storage, the quiesce operation is performed by the underlying hypervisor (VMware is supported). When used with another primary storage vendor's plugin, the quiesce operation is provided according to the vendor's implementation. #. Click OK. To delete a Snapshot or restore an Instance to the state saved in a particular Snapshot: #. Navigate to the Instance as described in the earlier steps. #. Click View Instance Snapshots. #. In the list of Snapshots, click the name of the Snapshot you want to work with. #. Depending on what you want to do: * To delete the Snapshot, click the Delete button. delete-button.png * To revert to the Snapshot, click the Revert button. depicts adding an iso image .. note:: Instance Snapshots are deleted automatically when an Instance is destroyed. You don't have to manually delete the Snapshots in this case.