After completing this section, you should be able to select and manage relevant parameters for launching a non-public, tenant instance.
A previous chapter covered how to launch an instance using the Dashboard and the unified CLI. The minimum resources needed to launch a new instance are a flavor, an image, and a network. If there is only one network defined in a project, that network is used automatically when launching an instance.
Use the openstack command to list and examine the available resources in Red Hat OpenStack Platform. The openstack command can list available flavors, images, instances, and networks. Administrative users can also use this command to list available projects, users, and roles. The openstack show command is used to view the details of a chosen resource. Use the information provided by this command to help launch an instance or perform changes to the Red Hat OpenStack Platform environment.
Some projects contain multiple resources of the same type, such as networks. The specific resource to use must be specified when launching an instance. If the user fails to specify one of the required multiple resources, the creation of the instance fails.
[user@demo ~(user)]$openstack server create \>--flavor default \>--image rhel8 \>demo-server2Multiple possible networks found, use a Network ID to be more specific. (HTTP 409) (Request-ID: req-841a675f-c762-445d-9049-8cb5e6c6649d)
Listing all available resources can help identify the correct one to use. In the previous example, listing the networks would help find the one needed to launch the instance. The output of the following command indicates that two usable networks exist in the project.
[user@demo ~(user)]$openstack network list \>-c Name -c Subnets+---------------+--------------------------------------+ | Name | Subnets | +---------------+--------------------------------------+ | demo-network1 | 38e05db4-a397-491a-a8f7-8b3220799aa2 | | demo-network2 | 27275a69-e720-4c3c-9529-9061bb5af0af | +---------------+--------------------------------------+
To launch an instance, you need to identify the correct network and pass it to the openstack server create command. This lets OpenStack know which resource to associate with a particular instance.
[user@demo ~(user)]$openstack server create \>--flavor m1.web \>--image rhel8-web \>--nic net-id=demo-network2 \>--security-group demo-web \>demo-server2
The openstack server delete command deletes OpenStack instances. You need to specify the name or ID of the instance when using this command.
[user@demo ~(user)]$ openstack server delete demo-server2It is a good practice to list available resources, after every change made, to confirm the intended change was made. In this example, list the available instances to verify that the correct instance was deleted.
[user@demo ~(user)]$ openstack server listRed Hat OpenStack Platform provides many ways to verify running instances. This can help troubleshoot potential problems or explore current limitations. You can use the Dashboard or the unified CLI to verify instances.
If the tenant network hosting the instance is not routed for external access, then the instance cannot reach the DNS server or any external resource. If the instance has one NIC it can only be accessed by other instances on the same tenant network. You can configure an instance with multiple NICs connected to different tenant networks. In this case the instance can be accessed from multiple tenant networks.
Cloud users can use the VNC console to access an isolated instance.
The openstack server show command displays the resources used to create the instance. This includes the network, the internal IP address, the security group, image, and flavor.
The best way to verify that an instance was created with the correct resources is to access the instance. Use the openstack console url show command to display the VNC console URL.
[user@demo ~(user)]$openstack console url show demo-server2+-------+-------------------------------------------------+ | Field | Value | +-------+-------------------------------------------------+ | type | novnc | | url | http://172.25.250.50:6080/vnc_auto.html?path=...| +-------+-------------------------------------------------+
Use the URL to access the console of the instance. The instance must have a local user created to log in at the console. After successfully logging in, use Linux commands to confirm the configuration of the instance. For example:
Use the systemctl status httpd command to confirm that a Apache HTTPD is running.
Use the ip command to verify the network configuration.
Use the netstat command to confirm which ports services are listening on.
You can also access an instance console from the Dashboard. A user name and password are required when accessing an instance from the Dashboard.
Log in to the Dashboard as an administrative user. Only administrative users can see flavors. View the available flavors by navigating to → → .
After a few seconds, verify the status of the instance.
Further information is available in the Virtual Machine Instances section of the Instances and Images Guide for Red Hat OpenStack Platform at https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.0/html-single/instances_and_images_guide/index#ch-manage_instances