分享

OpenStack dashboard----Launch instances(启动实例)

 java_laq小馆 2013-08-22

 Launch instances

启动实例
Launch an instance from an image (从镜像启动一个实例)
Launch an instance from a volume (从卷启动一个实例)
SSH in to your instance(通过SSH登录实例)

Instances are virtual machines that run inside the cloud. You can launch an instance directly from one of the available OpenStack images or from an image that you have copied to a persistent volume. The OpenStack Image Service provides a pool of images that are accessible to members of different projects.

实例其实是运行在云平台的虚拟机。你可以直接通过一个可用的OpenStack镜像或者一个已持久化到卷的镜像来启动一个实例。OpenStack Image Service为不同项目的成员提供了一个可访问的镜像池。

 Launch an instance from an image

从一个镜像启动一个实例

When you launch an instance from an image, OpenStack creates a local copy of the image on the respective compute node where the instance is started.

 当你从一个镜像启动一个实例时,实例启动后,OpenStack会创建各自计算结点的一个本地镜像的拷贝。

To launch an instance from an image

下面介绍“从一个镜像启动一个实例”的步骤

  1. Log in to the OpenStack dashboard.

    第一步:登录OpenStack控制面板。

  2. If you are a member of multiple projects, select a project from the drop-down list at the top of the Project tab.

    第二步:如果你是多个项目的成员,请从项目tab的顶部下拉菜单列表中选择一个项目。

  3. Click the Images & Snapshot category.

    第三步:点击“镜像&快照”栏目。

    The dashboard shows the images that have been uploaded to OpenStack Image Service and are available for this project.

    此时,控制面板页面显示了已经上传到OpenStack Image Service中、属于该项目可用的镜像。

  4. Select an image and click Launch.

    第四步:选择其中一个镜像,点击“启动”。

  5. In the Launch Image window, specify the following:

    第五步:在启动镜像的窗口中,指定了以下事项:

    1. Enter an instance name to assign to the virtual machine.

      <a>输入一个实例名,以分配给虚拟机。

    2. From the Flavor drop-down list, select the size of the virtual machine to launch.

      <b>从配置的下拉菜单列表中,选择用于启动的虚拟机的规格。

    3. Select a keypair.

      <c>选择一个安全密钥。

      In case an image uses a static root password or a static key set (neither is recommended), you do not need to provide a keypair to launch the instance.

      如果一个镜像使用的是静态根密码、或者静态的口令集(虽然这两种方式都是不推荐使用的),则在启动此实例时,不需要提供安全密钥。

    4. In Instance Count, enter the number of virtual machines to launch from this image.

      <d>在实例数量范围内,输入需要启动此镜像的虚拟机的个数。

    5. Activate the security groups that you want to assign to the instance.

      <e>激活某个安全组,分配给此实例。

      Security groups are a kind of cloud firewall that define which incoming network traffic should be forwarded to instances. For details, see the section called “Add security group rules”.

      安全组是一种云防火墙规则。这些规则定义了网络内发往这些镜像实例的网络流量。详细请参见“添加安全组规则”章节。

      If you have not created any specific security groups, you can only assign the instance to the default security group.

      如果你没有创建任何特定的安全组,那么就只能为镜像实例分配默认的安全组。

    6. If you want to boot from volume, click the respective entry to expand its options. Set the options as described in the section called “Launch an instance from a volume”

      (这一句,不知如何翻译?) 

  6. Click Launch Instance. The instance is started on any of the compute nodes in the cloud.

    第七步:点击“启动实例”。这样,实例就会在去平台内的某些计算结点上运行了。

After you have launched an instance, switch to the Instances category to view the instance name, its (private or public) IP address, size, status, task, and power state.


If you did not provide a keypair, security groups, or rules so far, by default the instance can only be accessed from         inside the cloud through VNC at this point. Even pinging the instance is not possible. To access the instance through a VNC console, see the section called “Get a console to an instance”.

如果目前为止你都没有提供过一个安全密钥、安全组,或者规则,在默认情况下,该实例只能通过VNC从内部访问云平台。甚至ping这个实例都是不可行的。如果想通过VNC控制台访问实例,请参见“实例控制台”章节。

 Launch an instance from a volume

从卷启动实例

You can launch an instance directly from an image that has been copied to a persistent volume.

In that case, the instance is booted from the volume, which is provided by nova-volume, through iSCSI.

For preparation details, see the section called “Create or delete a volume”.

你可以从一个已持久化到磁盘卷的镜像直接启动一个实例。这种情况下,实例将采用iSCSI的方式,通过nova-volume来启动。(晕,不懂啊这里^_^) 详细细节,请参见“创建或删除一个卷”章节。

To boot an instance from the volume, especially note the following steps:

从卷来启动一个实例时,需要特别注意以下步骤:

  • To be able to select from which volume to boot, launch an instance from an arbitrary image. The image you select does not boot. It is replaced by the image on the volume that you choose in the next steps.

    In case you want to boot a Xen image from a volume, note the following requirement: The image you launch in must be the same type, fully virtualized or paravirtualized, as the one on the volume.


  • Select the volume or volume snapshot to boot from.

    Enter a device name. Enter vda for KVM images or xvda for Xen images.

          输入一个设备名称。输入vda KVM镜像或者xvda Xen镜像。

To launch an instance from a volume

从卷启动一个实例

You can launch an instance directly from one of the images available through the OpenStack Image Service or from an image that you have copied to a persistent volume. When you launch an instance from a volume, the procedure is basically the same as when launching an instance from an image in OpenStack Image Service, except for some additional steps.

你可以直接通过一个可用的OpenStack镜像或者一个已持久化到卷的镜像来启动一个实例。除了一些额外的步骤外,从卷启动一个实例的过程与从镜像启动一个实例的过程是一样的。

  1. Create a volume as described in the section called “Create or delete a volume”.

    It must be large enough to store an unzipped image.

    第一步:像“创建或删除一个卷”章节描述的那样,创建一个卷。(注:卷的大小必须要足以存储一个未被压缩的镜像)

  2. Create an image.

    For details, see Creating images manually in the OpenStack Virtual Machine Image Guide.

    第二步:创建一个镜像。(具体细节,请参见"OpenStack虚拟机镜像指南"中的创建镜像手册)

  3. Launch an instance.

    第三步:启动一个实例。

  4. Attach the volume to the instance as described in the section called “Attach volumes to instances”.

    第四步:为实例附加上卷(详见“附加卷到实例”章节)

  5. Assuming that the attached volume is mounted as /dev/vdb, use one of the following commands to copy the image to the attached volume:

    第五步:假设附加卷挂载为/ dev /vdb,使用以下命令之一拷贝镜像到附加卷:

    • For a raw image:

      $ cat IMAGE >/dev/null

      Alternatively, use dd. (也可以选择使用dd命令)

    • For a non-raw image:

      $ qemu-img convert -O raw IMAGE /dev/vdb
    • For a *.tar.bz2 image:

      $ tar xfjO IMAGE >/dev/null
  6. Only detached volumes are available for booting. Detach the volume.

    第六步:分离卷。(因为只有分离卷可用于启动)

  7. To launch an instance from the volume, continue with the section called “Launch an instance from an image”.

    第七步:从卷启动一个实例后,接下来按照“从镜像启动一个实例”章节继续操作。

  8. You can launch an instance directly from one of the images available through the OpenStack Image Service.                 When you do that, OpenStack creates a local copy of the image on the respective compute node where the                 instance is started.

    第八步:你可以直接通过OpenStack Image Service中可用的镜像中直接启动一个实例。当你这样做时,OpenStack会在你启动实例的计算结点上创建一个本地镜像的拷贝。

    [Note]Launch instances from a volume

    Alternatively, you can start an instance from an image that has been copied to a persistent volume. In that case, the instance is booted from the volume, which is provided by nova-volume, through iSCSI.

    For preparation details, see the section called “Create or delete a volume”.

                     注:你可以通过一个拷贝到持久化卷里的镜像来启动一个实例。这种情况下,实例将采用iSCSI的方式,通过nova-volume来启动。详细细节,请参见“创建或删除一个卷”章节。

 SSH in to your instance

To SSH into your instance, you use the downloaded keypair file.

使用下载的安全密钥文件,你可以通过SSH登录到实例。

[Note]Note

The username is ubuntu for the Ubuntu cloud images on TryStack.

                 注:在测试平台上,Ubuntu云平台的用户名是ubuntu.
 

To SSH in to your instance

  1. Copy the IP address for your instance.

    第一步:拷贝你的实例的IP地址。

  2. Use the SSH command to make a secure connection to the instance. For example:

    第二步:使用SSH安全链接,连接到实例。例如:

    $ ssh -i MyKey.pem ubuntu@10.0.0.2
  3. A prompt asks, "Are you sure you want to continue connection (yes/no)?" Type yes and you have successfully connected.

    第三步:一个提示问道:“你确定你要继续连接(是/否)?” ,选择yes,则可以成功连接。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多