OpenStack is an open source platform for cloud computing. In this guide we will discuss how to use OpenStack to deploy a VM and then connect to it.
What is a VM?
A virtual machine (VM for short) can contain any operating system environment that can run on top of (or inside) another operating system that contains physical hardware. The operating system running the actual hardware is known as a hypervisor (or bare-metal operating system), and the VM is known as the guest.
What is a research VM environment?
A research VM environment allows users to create pre-built virtual machines. These machines contain NAT IP addresses, meaning it can only be accessed while on campus or through the VPN. They are intended for short-term virtual machine environments for developing code, running experiments, etc. This environment should not be used for general purpose desktop computing tasks. Please talk to your local IT support person if you are looking for a VM for general purpose computing. This environment is maintained for research computing, so if the IT department detects or is notified of security incidents, you will lose access to the VM while we investigate the problem.
Signing up for for OpenStack
To sign up for OpenStack, you must first have a Pronto lab group account.
Then visit: https://diy.las.iastate.edu/openstack/
You must be on campus or connected to the VPN for this page to be reachable.
The page will look like this:
You will need to provide your lab group name (ending in -lab) and a use case/purpose. You should receive and email saying that your self-service VM project is available.
To login to OpenStack, use the following link: https://openstack.las.iastate.edu/
You will be redirected to this page:
The domain name is: IASTATE
The username and password is your NetID and password. If you cannot login, please email firstname.lastname@example.org. Once you have logged in, you will be redirected to this page:
Deploying a VM
Linux Only: Key Generation
First, generate a key pair. Click on the Key Pairs tab and then click on Create Key Pair.
When you create this Key Pair, a .pem file should automatically be downloaded. Take note of where this is downloaded, we will need this for later. This .pem file will allow us to SSH into our VM.
To get a VM, we need to create an instance for it. Click on the Compute tab, then select Instances. Next, click on Launch Instance.
You will be required to provide details, a source, flavor, and configure networks. You may tailor the settings however you wish, but you must provide a selection for each category and field that has a light blue asterisk(*) after it in order to launch an instance.
Under Source you will need to select an operating system for your virtual machine. Available sources are likely to change over time.
You should also select Yes for Delete Volume on Instance Delete so that the disk space used by your VM will be freed when you delete it.
Under Flavor, pick one of the available flavors. Click on the arrow on the left if you would want to see its specifications:
Note that for Networks, you will need to select campus-low as your allocated network.
Linux Only: Key Pair Verification
Under Key Pair, verify that the key pair you generated from earlier is under the Allocated section:
Windows Only: Set Temporary Password for openshift Account
Windows VMs use an Administrator account called openshift. A temporary password for this account must be set before the VM is launched. You will be prompted to change this password the first time you login with the openshift account.
Passwords must meet minimum security requirements depending on which Windows OS you're running:
- Windows Server 2019
- minimum 8 characters
- minimum 3 character classes (upper/lower/numbers/special characters)
- Windows 10
- no minimum requirements.
To set a temporary password for the openshift Administrator account:
- Under the Metadata, the Available Metadata has a Custom key field. Add a custom Metadata key named admin_pass and then click the plus(+) sign on the right side of the Custom field.
- An admin_pass key will now appear in the Existing Metadata column.
- Enter a temporary password for the openshift account in the admin_pass field. You will be prompted to change this password at first login.
Once you are satisfied with your settings, click on Launch Instance.
Note: If the Launch Instance button is dimmed and cannot be clicked then information is missing from a required field.
Wait a few minutes until your VM is readily available.
When the VM is available, take note of the VM's IP address:
Linux VM: Initial Setup
You will need to SSH the VM's IP address and set our desired username and password.
Using Powershell/Terminal, navigate to where you downloaded your .pem file from earlier. Next, SSH to the IP address associated with your Instance (or in other words, your VM) using:
$ ssh -i <Pemfile_Name>.pem cloud-user@<IP_ADDRESS>
Example: for a centOS VM with the IP address 10.90.20.1 and .pem file named Linux.pem, connect typing in:
$ ssh -i Linux.pem email@example.com
Once connected to the VM, you will need to change the password so you can login. You can do so by using:
$ sudo passwd root
You will be prompted to change your password.
Note that this password is meant for accessing the terminal console via the OpenStack web console, which is explained more in detail below. If you plan on connecting to your VM via SSH/terminal, you will need to use the .pem file you downloaded.
Windows VM: First Logon
After Windows had started and the logon screen has appeared it may take a couple minutes before openstack appears in the list of accounts. If the VM is prompting for a password for a different account such as Administrator or laslocaladmin, let the prompt time out by not entering any text for several seconds. Eventually the logon screen should go back to the screensaver page. Wait a minute or two and then click to see if the openshift account is available.
If, after several minutes, the openshift account still hasn't appeared then the account creation process likely failed. If running Windows Server it's likely the temporary password failed to meet minimum security requirements. To resolve this issue, destroy and re-launch the instance with a password that meets the minimum security requirements. If the issue persists, please email firstname.lastname@example.org.
Note: login with the openshift account through RDP only be done after the temporary password has been changed via the OpenStack web console.
OpenStack Web Console
To access your VM's console via your web browser:
- bring up the list of instances by clicking on the Compute tab, then the Instances tab.
- click on the instance name of your VM.
- click the Console tab.
Click on Click here to show only console to pull up the console.
Linux VMs should login as root or cloud-user using the password set earlier.
Windows VMs should use the openstack account.