Launch and Access Your Instance¶
Creating a Virtual Machine¶
Create and launch a VM | OpenStack Command |
---|---|
See what flavors (sizes) are available | openstack flavor list |
See what Images are available The Jetstream team makes *** Featured- ** images available from which to build. |
openstack image list |
Create and boot an instance Notes:
|
openstack server create <my-server-name> \ --flavor FLAVOR \ --image IMAGE-NAME \ --key-name <my-keypair-name> \ --security-group <my-security-group-name> \ --wait |
Optional-Volume-backed Add the following optional flag to the above server create step if you wish to not use the default ephemeral disk and instead create a custom volume-backed instance (storage counts against your quota)
|
--boot-from-volume <size> Optional Rename volume: openstack volume set --name '<my-server-name>-vol' <volumes_attached_id> |
Optional-Network If you have multiple networks, you’ll need to also include this line in the server create step See Create a network in the CLI for more information |
--nic net-id=<my-network-name> |
Create a public IP address for an instance | openstack floating ip create public |
Add that public IP address with that instance | openstack server add floating ip my-server-name your.ip.number.here |
Logging into your Virtual Machine¶
Once your instance is up and has a floating IP, you are ready to ssh in and use it. If your ssh key is one of the default names (e.g. id_rsa or id_ed25519) and is in your ~/.ssh dir, you won’t need to specify the location of the key. Otherwise, you’ll need to use the ssh option -i path/key. For example:
ssh -i ~/.ssh/my-custom-key-name user@ip.number
Each distribution has a different default user. We will show examples for each without the -i path to your ssh key, assuming you have ~/.ssh/id_rsa or ~/.ssh/id_ed25519 as your default key:
For Ubuntu 20 or 22:
ssh ubuntu@your.ip.number.here
For Rocky 8/9:
ssh rocky@your.ip.number.here
You should be able to access and use your VM now! Please see Instance Management Actions in the CLI for all instance management actions.