Danger: There was an error submitting the form. Please try again.
which suggests that your browser is not supported by our system. This error message was noticed with certain versions of the Safari web browser on Macs; upgrading Safari may help, but we recommend that you use [https://www.mozilla.org/en-US/firefox/new/ Firefox] or [https://www.google.com/chrome/ Chrome]. If you are still having issues, email [[technical support]].
==Creating your first virtual machine==
Your project will allow you to create virtual machines (also referred to as instances or VMs) stored on the cloud, which you can access from your personal computer using our web interface.
# Log in to the cloud interface to access your project 192.168.X.Y
. Public IPs allow outside services and tools to initiate contact with your VM, such as allowing you to connect to your VM via your personal computer to perform administrative tasks or serve up web content. Public IPs can also be pointed to by domain names.
#Assign a public IP address
#*Ensure you are still viewing the instances list where you were redirected as your VM launched. If you need to use the navigation panel, select options Compute->Instances on the OpenStack menu.
#*Click on the drop-down arrow menu (indicated by ▼) on the far right of the row for your VM and select Associate Floating IP, then in the Allocate Floating IP window, click on the Allocate IP button. If this is your first time associating a floating IP, you need to click on the “+” sign in the Manage Floating IP Associations dialog box. If you need to allocate a public IP address for this VM again in the future, you can select one from the list by clicking the ▼ in the IP Address field.
#*Click on the Associate button.
#*You should now have two IP addresses in your IP address column. One will be of the form 192.168.X.Y
, the other is your public IP. You can also find a list of your public IP addresses and their associated projects by going to Network->Floating IPs. You will need your public IP when you are trying to connect to your VM.
#Configure the firewall
#*On the OpenStack left menu, select Network->Security Groups.
#*On the group row named default, click on the Manage Rules button on the far right.
#*On the next screen, click on the +Add Rule button near the top right corner.
#*In the Rule drop-down menu, select SSH.
#* The Remote text box should automatically have CIDR in it; do not change this.
#*In the CIDR text box, replace 0.0.0.0/0
with your-ip/32
. Note that this is the IP address of the physical computer you are wanting to use to connect to your VM. If you don't know your current IP address, you can see it by going to [http://ipv4.icanhazip.com ipv4.icanhazip.com] in your browser. If you want to access your VM from other IPs, you can add more rules with different IP addresses. If you want to specify a range of IP addresses use [https://www.ipaddressguide.com/cidr this tool] to calculate your CIDR rule for a range of IP addresses.
#*Finally, click on the Add button. Now the rule you just created should show up on the list in security groups.
#Important notes
#*Do not remove the default security rules as this will affect the ability of your VM to function properly (see [[Managing_your_cloud_resources_with_OpenStack#Security_Groups|Security Groups]]).
#*Security rules cannot be edited, they can only be deleted and re-added. If you make a mistake when creating a security group rule, you need to delete it using the Delete Rule button on the far left of the row for that rule in the security groups screen, and then re-add it correctly from scratch using the +Add Rule button.
#*If you change your network location (and therefore your IP address) then you need to add the security rule described in this section for that new IP address. Remember that when you change your physical location (example working on campus vs working from home) you are changing your network location.
#*If you do not have a static IP address for the network you are using, remember that it can sometimes change, so if you can no longer connect to your VM after a period of time sometimes it's worth checking to see if your IP address has changed. You can do this by putting [http://ipv4.icanhazip.com ipv4.icanhazip.com] in your browser and seeing if it matches what you have in your security rule. If your IP address changes frequently, but the left most numbers always stay the same, it could make more sense to add a range of IP addresses rather than frequently modifying your security rules. Use [https://www.ipaddressguide.com/cidr this tool] for determining a CIDR IP range from an IP range or learn more about CIDR notation [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation here].
#*It can be helpful to add a description about what a security rule is for (e.g. home or office). That way you will know which rule is no longer needed if you want to add a new rule while connecting, for example, from home.
===Connecting to your VM with SSH===
In the first step of this quick guide you saved a private key to your computer. Make sure you remember where you saved it because you will need it to connect to your VM. You will also need to remember which type of image you used (Ubuntu, Fedora, etc.) and which public IP address is associated with your VM.
===Connecting from a Linux or Mac machine===
If the computer you are using to connect to your VM has a Linux or Mac operating system, use the following instructions to connect to your VM. Otherwise skip down to the next section to connect with a Windows computer.
Open a terminal and input the following command:
{{Command| ssh -i /path/where/your/private/key/is/my_key.key
is the name of the user connecting and
is the public IP you associated with your VM in the previous step. The default user name depends on the image.
{| class="wikitable"
!Image distribution name
!
|-
|Debian
|debian
|-
|Ubuntu
|ubuntu
|-
|CentOS
|centos
|-
|Fedora
|fedora
|-
|AlmaLinux
|almalinux
|-
|Rocky
|rocky
|}
These default users have full sudo privileges. Connecting directly to the root account via SSH is disabled.
===Connecting from a Windows machine===
[[File:MobaXterm basic.png|400px|thumb| Creating an SSH session (Click for larger image)]]
If you want to use a Windows computer to connect to your VM, you will need to have an interface application to handle the SSH connection. We recommend MobaXTerm, and will show the instructions for connecting with MobaXTerm below. If you want to connect using PuTTY instead, see [[Connecting with PuTTY]].
[[File:MobaXterm ssh key.png|400px|thumb| Specifying a private key (Click for larger image)]]
To download MobaXterm [http://mobaxterm.mobatek.net/ click here].
To connect to your VM using MobaXterm follow these instructions:
#Open the MobaXterm application.
#Click on Sessions then press New session.
#Select an SSH session.
#Enter the public IP address for your VM in the Remote host address field.
#Ensure that the Specify username checkbox is checked, then enter the image type for your VM (ubuntu for example) into the username field, all lowercase.
#Click on the Advanced SSH settings tab, and check the Use private key checkbox.
#Click on the page icon in the far right of the Use private key field. In the pop-up dialogue box select the key pair (.pem file) that you saved to your computer at the beginning of this quick guide.
#Then click on OK. MobaXterm will then save that session information you just entered for future connections, and also open an SSH connection to your VM. It also opens an SFTP connection which allows you to transfer files to and from your VM using drag-and-drop via the left-hand panel.
[[File:MobaXterm connected.png|400px|thumb| Connected to a remote host (Click for larger image)]] The Windows image is quite large and requires a large bootable drive. C-flavors, as described [[Virtual_machine_flavors|here]], only have root drives of 20 GB, choosing a "p" flavor allows for larger root volumes. The smallest "p" flavor has 1.5 GB of RAM and from experience this is too little to run Windows well. Choosing a slightly larger flavor, such as "p2-3gb", improves the performance of the VM.
** ''Instance Count'': Number of virtual machines to create. ** ''Instance Boot Source'': What source should be used to boot the VM; choose ''Boot from Image (creates new volume)''. ** ''Image Name'': select the Windows image name you were provided. ** ''Device Size'': The size of the root drive; enter 30GB or more.The final operating system occupies approximately 20 GB of space, though more is needed during setup.
** ''Delete on Terminate'': If this box is checked the volume that is created with the VM will be deleted when the VM is terminated.It is generally recommended not to check this box as the volume can be deleted manually if desired and allows the VM to be terminated without deleting the volume.
** ''Project Limits'': The green bars reflect the fraction of your available resources that will be consumed by the VM you are about to launch. If the bars become red, the flavor chosen will consume more resources than your project has available. Blue bars indicate any existing resources your project may be using. * ''Access & Security'' tab ** ''Key pair'': Select your SSH key pair.If you have only one, it is selected by default. If you do not have a key pair, please see [[Creating_a_Windows_VM#SSH key pair|above]]. ** ''Security Groups'': Ensure the ''default'' security group is checked. * ''Networking'' tab: Do not change this now. Networking will be discussed later, after you have launched a virtual machine.
* ''Post-Creation'' tab: Do not change this now. * ''Advanced Options'' tab: Leave ''Disk Partition'' on ''Automatic'' for now. Once you have reviewed all the tabs and defined your virtual machine, click on the Launch button and your virtual machine will be created. The Instances list will be displayed and the Task field will show the current task for the VM; it will likely be "Block Device Mapping" initially. Once the VM has spawned and beginning to boot, it will have the Power State of "Running". It will likely take 10+ minutes to finish creating the volume and coping the image to it before beginning to boot. ==Locality settings and license agreement== [[File:Windows-VM-Settings.png|400px|thumb| Locality Settings (Click for larger image)]] When the VM first boots it will not finish booting until location, language, and keyboard settings are selected and you agree to the license using the console built into the OpenStack dashboard. To get to the console: # Go to ''Instances'' on the left hand menu. # Click on the ''Instance Name'' of your Windows VM. # Click on the ''Console'' tab to display the ''Instance Console'' and wait until you see a ''Settings'' screen as shown in the figure to the right.192.168.X.Y
.
===Public IP===
Public IPs allow outside services and tools to initiate contact with your VM, such as allowing you to connecting to it to perform administrative tasks or serve up web content. Public IPs can also be pointed to by domain names.
To assign a public IP to a VM, you need to select ''Associate Floating IP'' from the drop-down menu button (indicated by ▼) of the ''Actions'' column in the ''Instances'' list. If this is your first time associating a floating IP, your project hasn't been assigned an external IP address yet. You need to click on the “+” sign to bring up the ''Allocate Floating IP'' dialog box. There is only one pool of public addresses, so the correct pool will already be selected; click on the ''Allocate IP'' button.
The ''Manage Floating IP Associations'' screen is displayed again, indicating the IP address and the port (or VM) to which it will be associated (or more specifically [https://en.wikipedia.org/wiki/Network_address_translation NATted]); click on the ''Associate'' button.
===Firewall, add rules to allow RDP===
To connect to your virtual machine using a remote desktop connection client, you will need to allow access for remote desktop protocol (RDP) to your VM.
#On the ''Security Groups'' tab, select ''Access & Security''; on the default row, click [[File:Manage-Rules-Button.png]]
#On the next screen, click [[File:Add-Rule-Button.png]]
#RDP has a predefined rule. Select it in the '' Rules'' dropdown menu and leave ''CIDR'' under ''Remote''.
#Replace the 0.0.0.0/0
in the CIDR text box with /32
. If you don't know your current IP address you can see it by going to [http://ipv4.icanhazip.com ipv4.icanhazip.com] in your browser. Leaving 0.0.0.0/0
will allow anyone to attempt a connection with your VM. You should never allow completely open access with RDP as your VM will be susceptible to [https://en.wikipedia.org/wiki/Brute-force_attack brute force attacks]. This replacement will restrict RDP access to your VM only from this IP. If you want to allow access from other IPs you can add additional RDP rules with different IP address or you can specify a range of IP addresses by using [https://www.ipaddressguide.com/cidr this tool] to calculate your CIDR rule from a range of IP addresses.
'''If you leave RDP open to the world by leaving the 0.0.0.0/0
in the CIDR text box, a cloud administrator may revoke access to your VM until the security rule is fixed.'''
If you followed the steps above in the ssh key section, you should have a private key saved on your local computer with a ".pem" extension which matches the public key.
# Select the key and click ''Open''. # Click the ''Decrypt Password'' button at the bottom left. Keep this form open as we will use the password in the next step. This process can be repeated later to retrieve the password again. ===From a Windows client=== Many Windows systems come with the remote desktop connection tool pre-installed. Try searching for "remote desktop connection" in your Windows system search. If you can not find it, you can go to [https://www.microsoft.com/en-ca/store/p/microsoft-remote-desktop/9wzdncrfj3ps the Microsoft store] and install it. It should be a free installation. Once you have run the remote desktop connection tool you should see a window similar to the one displayed on the right. To connect to your Windows VM: # Enter the public IP address next to ''Computer''. # Add the user name you were provided with in the ''User name'' text box. # Click the ''Connect'' button at the bottom. # Enter the password retrieved in the previous step when prompted. # Click the ''OK'' button. You will likely be presented with an alert ''The identity of the remote computer cannot be verified. Do you want to connect anyway?''. This is normal click ''Yes'' to continue. Once you connect you should see the desktop of your Windows VM displayed within the RDC window. '''TODO:''' The specific certificate error is "The certificate is not from a trusted certifying authority". Is seeing this alert really normal? Do we want to register the Windows image certificate with a signing authority? Could we use letsencrypt or should we just ignore this issue? ===From a Linux client=== To connect via RDP from Linux you will need a remote desktop client. There are number of different clients out there but the [https://github.com/FreeRDP/Remmina/wiki Remmina client] appears to work well when tested with Ubuntu. The previous link provides instructions for installing it in Ubuntu, Debian, Fedora and a few other Linux operating systems. Once you have installed and launched Remmina to connect to your Windows VM: # Click on ''Create a new remote desktop file'' (file with a green '+' sign).You should see a window similar to that shown on the right.
# Enter the public IP of your Windows VM next to ''Server''. # Enter the user name you were provided next to ''User name''. # Enter the password you retrieved in the above step next to ''Password''. # Click ''Connect''. ===From a Mac client=== '''TODO:''' Anyone with a Mac want to write up this section? ==License information== '''TODO''': need to provide information which would be helpful for users to know what path to take to get a license. Should cover things like: * Where to go to get a license * What kind of license do I need/what licenses will work on the cloud * How to apply my license to my existing cloud VM * How to apply it to a new VM (if that is different than above bullet item) ==Comments on key pairs== There are a couple different formats for key files and you can also choose to protect your private keys with passphrases or not. In order to be able to decrypt the Windows VM password your private key must be in OpenSSH format and not have a passphrase. If you created your key pair with OpenStack and downloaded the.pem
key file it will already be in the correct format. If you used the [[Using_SSH_keys_in_Linux|ssh-keygen
command]] to create your key pair and didn't specify a passphrase it will also likely be in the correct format. For more general information about key pairs see the [[SSH Keys]] page.
An example of an acceptable private key in the OpenSSH format without a passphrase:
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvMP5ziiOw9b5XMZUphATDZdnbFPCT0TKZwOI9qRNBJmfeLfe
...
DrzXjRpzmTb4D1+wTG1u7ucpY04Q3KHmX11YJxXcykq4l5jRZTKj
-----END RSA PRIVATE KEY-----
The ...
in the middle indicates multiple lines of characters similar to those above and below it.
Below are two examples of private keys which will not work with OpenStack with Windows VMs
OpenSSH format with a passphrase:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,CA51DBE454ACC89A
0oXD+6j5aiWIwrNMiGYDqoD0OqlURfKeQhy//FwHuyuithOSI8uwjSUqV9BM9vi1
...
8XaBb/ALqh8zLQOXEUuTstlMWXnhzBWLvu7tob0QN7pI16g3CXuOag==
-----END RSA PRIVATE KEY-----
ssh.com format without a passphrase
---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----
Comment: "rsa-key-20171130"
P2/56wAAA+wAAAA3aWYtbW9kbntzaWdue3JzYS1wa2NzMS1zaGExfSxlbmNyeXB0e3JzYS
...
QJX/qgGp0=
---- END SSH2 ENCRYPTED PRIVATE KEY ----
==Where to go from here==
* learn about [[security considerations when running a VM]]
* learn about [[Creating a Linux VM|creating a Linux VM]]
* learn more about working with [[Managing_your_cloud_resources_with_OpenStack|OpenStack]]
* [[Cloud_Technical_Glossary|Cloud Technical Glossary]]
* [[automating VM creation]]
* [[backing up your VM]]
* For questions about our cloud service, email [[technical support]].