Instances are virtual machines that run inside the cloud. To start an instance, a virtual machine image must exist that contains the following information: which operating system to use, a username and password with which to log in to the instance, file storage, etc. The cloud contains a pool of such images that have been uploaded to OpenStack Image and are accessible to members of different projects.
When starting an instance, specify the following key parameters:
In OpenStack, flavors define the compute, memory, and storage capacity
of nova computing instances. To put it simply, a
flavor is an available hardware configuration for a server. It defines
the “size” of a virtual server that can be launched.
For more details and a list of default flavors available, refer to the Admin User Guide, chapter OpenStack dashboard or chapter OpenStack command-line clients, section Manage Flavors. The guide is available from http://www.suse.com/documentation.
Key Pairs are SSH credentials that are injected into images when they
are launched. For this to work, the image must contain the cloud-init package.
It is recommended to create at least one key pair per project. If you already have generated a key pair with an external tool, you can import it into OpenStack. The key pair can be used for multiple instances belonging to that project.
For details, refer to the End User Guide, chapter OpenStack dashboard or chapter OpenStack command-line clients, section Configure access and security for instances. The guide is available from http://www.suse.com/documentation.
In SUSE OpenStack Cloud, security groups are used to define which incoming network traffic should be forwarded to instances. Security groups hold a set of firewall policies (security group rules).
For details, refer to the End User Guide, chapter OpenStack dashboard or chapter OpenStack command-line clients, section Configure access and security for instances. The guide is available from http://www.suse.com/documentation.
Instances can belong to one or multiple networks. By default, each instance is given a fixed IP address, belonging to the internal network.
You can launch instances from the following sources:
Images that have been uploaded to SUSE OpenStack Cloud—see the End User Guide, chapter OpenStack dashboard or chapter OpenStack command-line clients, section Launch and manage instances or Launch an instance from an image, respectively. The guide is available from http://www.suse.com/documentation.
Volumes that contain images—see the End User Guide, chapter OpenStack dashboard or chapter OpenStack command-line clients, section Launch and manage instances or Launch an instance from a volume. The guide is available from http://www.suse.com/documentation.
Instance snapshots—see the End User Guide, chapter OpenStack dashboard or chapter OpenStack command-line clients, section Launch and manage instances or Create volume from image and boot instance, respectively. The guide is available from http://www.suse.com/documentation.
Volume snapshots.
If needed, you can assign a floating (public) IP address to a running
instance and attach a block storage device (volume)
for persistent storage. For details, refer to
Allocate a floating IP address to an instance
and
Create and manage volumes .
For instructions on how to launch instances from images or snapshots, see Launch an Instance.
If you want to launch an instance from a volume, the volume needs to contain an image. You can directly create a volume from an image, as described in Create a volume, by using the respective image as volume source.
In case the image you want to transfer to a volume is not available in OpenStack Image yet, you can create an empty volume and manually copy an image to it as shown in Procedure 3.1.
Log in to SUSE OpenStack Cloud Dashboard and select a project from the drop-down box at the top-level row.
Create an empty volume as described in Create a volume, by using the option . The volume size must be large enough to store an unzipped image.
Create an image with SUSE Studio or SUSE Studio Onsite. For details, refer to Section 2.2, “Building Images with SUSE Studio”.
To be able to copy the image to the empty volume, you need to execute the following steps first:
Launch an instance from an arbitrary image as described in Launch an Instance.
Which image you select there is only
important if you want to boot a Xen
image from the volume later on. In that case, the image you
select in
Launch
an Instance, Step 3 needs to be of the same
type as the one on the volume: fully
virtualized or paravirtualized.
In any other case the image you select for starting the instance does not matter. It will be replaced by the image on the volume that you specify in Launch an Instance, Step 3, by using the option .
Make sure to select an appropriate flavor for the instance. The instance's hard disk must be big enough to store the image that you want to copy onto the volume later on.
Attach the empty volume to the running instance as described in Attach a volume to an instance.
Copy the image that you created in
Step 3 to the
running instance (for example, by using scp).
Log in to the instance by using SSH or the VNC console.
Assuming that the attached volume is mounted as
/dev/vdb, use one of the following commands to
copy the image to the attached volume:
For a raw image:
cat IMAGE >/dev/vdb
(alternatively, use dd)
For a non-raw image:
qemu-img convert -O raw IMAGE /dev/vdb
For a *.tar.bz2 image:
tar xfjO IMAGE >/dev/vdb
As the image comes with a predefined disk size (that might be smaller than the size of the volume it has been copied to), the image will not use the full size of the volume. To change this, adjust the partition table within the image to match the size of the volume.
As only detached volumes are available for booting, detach the volume. For details on how to do so, refer to Detach a volume from an instance.
Now, you can launch an instance from the image that has been copied to the volume. The instance will be booted from the volume, which is provided by OpenStack Block Storage through iSCSI. To do so, proceed as described in Launch an Instance , using the option .
After you have launched an instance, switch to the category in the Dashboard. There, you can view the , the , its (private or public) , its , the associated with it, the image's , its , its , its , and its .
If you did not provide a key pair on starting and have not touched security groups or rules so far, by default the instance can only be accessed from inside the cloud via VNC at this point. Even pinging the instance from within the cloud is not possible. To change this, proceed with Configure access and security for instances.