Instance Creation and Virtual Machine Types¶
This document provides comprehensive instructions on creating instances and understanding the virtual machine types available.
Instance Creation¶
Instance creation can be done easily via OpenStack Horizon from the "Launch Instance" button on the Project -> Compute -> Instances Panel.
However, you can also deploy an instance via OSC using the following steps:
Key Points for Instance Creation¶
- Ensure a security group is selected that allows access to the VM from the Internet or private networks.
- A keypair must be created and associated with the instance.
Step-by-Step Guide¶
List Resource Names and IDs¶
$ openstack image list
$ openstack flavor list
$ openstack security group list
$ openstack network list
$ openstack keypair list
Keypair Creation¶
$ openstack keypair create --public-key ~/.ssh/id_rsa.pub <keypair-name>
Security Group Configuration¶
Create a security group with appropriate ingress and egress rules, or modify the default group:
openstack security group rule create --ingress --proto tcp --remote-ip 0.0.0.0/0 --dst-port 22 default
Instance Creation¶
- With Non-Persistent Storage:
$ openstack server create --image <image> --flavor <flavor> --security-group <security-group> --network <network> --key-name <keypair-name> <name>
For sensitive data, it is recommended to use encrypted volumes. You can create and attach one as follows:
- Create the encrypted volume:
bash openstack volume create --size <size> --type LUKS <volume-name>
-
Attach it to your server (after creation or later):
bash openstack server add volume <server> <volume>
(See Mounting Storage for details on using the volume inside the VM). -
With Persistent Storage (including encrypted volumes created as above):
$ openstack server create --image <image> --boot-from-volume <volume-size> --flavor <flavor> --security-group <security-group> --network <network> --key-name <keypair-name> <name>
Floating IP Creation and Assignment¶
$ openstack floating ip create 130-dmz-openstack
$ openstack server add floating ip <server> <floating-ip>
SSH Access to VMs¶
- Rocky Linux:
$ ssh rocky@<floating-ip>
- Ubuntu:
$ ssh ubuntu@<floating-ip>
Virtual Machine Types¶
Available Flavors¶
The table below describes the available flavors for use in the BSC OpenStackCloud:
Flavor | vCPU | RAM | Disk |
---|---|---|---|
bsc.mem.t | 1 | 4 GB | 60 GB |
bsc.mem.s | 2 | 8 GB | 60 GB |
bsc.mem.m | 4 | 16 GB | 60 GB |
bsc.mem.l | 8 | 32 GB | 60 GB |
bsc.mem.xl | 12 | 48 GB | 60 GB |
bsc.mem.2xl | 16 | 64 GB | 60 GB |
bsc.mem.3xl | 16 | 128 GB | 60 GB |
Images¶
A selection of up-to-date images is maintained to ensure compatibility and performance.