Installing and Configuring OpenStack in Oracle® Solaris 11.2

Exit Print View

Updated: April 2015
 
 

How to Create a VM Instance by Using the Command Line Interface

  1. Select the tenant for which you want to create the new VM instance.

    You will need to specify the tenant name or ID in the command to create the VM instance.

    $ keystone tenant-list
    +----------------------------------+---------+---------+
    |                id                |   name  | enabled |
    +----------------------------------+---------+---------+
    | 6ea34f7dafa5ce3c9a1b9de659e59d77 |   demo  |   True  |
    | 0bda9b63b800ca808031a38637d50f3e | service |   True  |
    +----------------------------------+---------+---------+
  2. Select the image from which you want to create the new VM instance.

    You will need to specify the image name or ID in the command to create the VM instance. See Displaying Information About Images for instructions about how to show specifications of each image, including the image ID.

    If you deploy a non-global zone VM instance that is a lower release level than the global zone, the VM instance will be automatically upgraded to the global zone release level on install. Attempting to deploy a non-global zone VM instance that is a higher release level than the global zone will fail.

  3. Select a flavor from which you want to create the new VM instance.

    Ensure you have a flavor with the specifications you need. Add the required specifications to a flavor or create a new flavor with the specifications you need. See Displaying Information About Flavors for instructions about how to show specifications of each flavor, including the flavor ID and extra-specs.

  4. Select a network for the new VM instance to use.

    You will need to specify the network name or ID in the command to create the VM instance. If the neutron net-list command does not show a network for the tenant you chose in Step 1, use the neutron net-create command to create a network for this tenant. See OpenStack Command-Line Interface Reference for details. Note the ID of the network.

  5. Create the instance.

    Use the nova boot command to create and boot a compute instance. The imageID is from Step 2, the flavorID is from Step 3, and the nicID is from Step 4. See OpenStack Command-Line Interface Reference for details.

    # nova boot --image imageID --flavor flavorID --nic net-id=nicID
  6. Select a floating IP address for the new VM instance to use.

    Use the neutron floatingip-list command to display floating IP addresses for the tenant you chose in Step 1. If necessary, use the neutron floatingip-create command to create a floating IP address for this tenant. Note the ID of the floating IP address.

  7. Associate the floating IP address with the new VM instance.

    Use the neutron floatingip-associate command to associate the floating IP address from Step 6 with the new VM instance.