|
| 1 | +# How to access Windows Instances on Openstack # |
| 2 | + |
| 3 | +There are 2 main ways to get access and control a Windows Instance on Openstack. This tutorial will cover both methods. |
| 4 | + |
| 5 | +## Prerequesites ## |
| 6 | + |
| 7 | +* A newly created Windows Server Instance on Openstack |
| 8 | +* Access to Infra via OpenVPN OR On the Cyberlab Secure Network |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +## Method 1: Using the Openstack Console (Must be used for initial Windows Setup) ## |
| 13 | + |
| 14 | +Openstack has a built-in console viewer for Instances which allows you to get a true console view of the Instance allowing for easier debugging of the Instance. You will have to use this method to initially setup Windows Server. |
| 15 | + |
| 16 | +### Steps: ### |
| 17 | +1. On the left plane, choose `Compute` and then `Instances` |
| 18 | + |
| 19 | +2. Click on the Instance to view |
| 20 | + |
| 21 | +3. Click on the `Console` tab |
| 22 | + |
| 23 | +4. You now have a console view of the Instance! From here you can add an Administrator password to Windows and use the Instance! |
| 24 | + |
| 25 | + |
| 26 | +## Method 2: Using Remote Desktop Connection ## |
| 27 | + |
| 28 | +Remote Desktop Connection (Also known as RDP somtimes) is a program in Microsoft Windows that allows you to access another Windows computer over a network. Using this method has added benefits such as easy folder sharing, viewing the Instance in full-screen mode, clipboard sharing and more! |
| 29 | + |
| 30 | +By default, Openstack blocks all inbound connections to Instances and therefore we need to make a security group to allow inbound RDP access |
| 31 | + |
| 32 | +Important Note: You cannot directly use this method on the very first time you startup your Instance as Windows requires you to set an Administrator password upon Instance creation. Follow Method 1 to gain initial access to the machine and add a password. |
| 33 | + |
| 34 | +### Step 1: Creating a security group ### |
| 35 | +1. Connect to Infra via OpenVPN or `Cyberlab Secure` |
| 36 | +2. Go to `horizon.hackucf.cloud` and log into your account |
| 37 | +3. Click on `Network` on the left-hand pane and then `Security Groups` |
| 38 | + |
| 39 | +4. On the right-hand side, click on `Create Security Group` and give it a name and description, then press `Create Security Group` |
| 40 | + |
| 41 | + |
| 42 | +5. On the Manage Security Group Rules screen, click `Add rule` |
| 43 | + |
| 44 | +6. Choose the `RDP` Rule in the Rule dropdown, leave all other options as default and click `Add` |
| 45 | + |
| 46 | + |
| 47 | +This new group can be applied to any future Windows Instances to quickly allow RDP access |
| 48 | + |
| 49 | +### Step 2: Adding the security group to your Instance ### |
| 50 | +1. On the left plane, choose `Compute` and then `Instances` |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +2. Click on the Instance to add the security group to |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +3. Click the dropdown arrow on the right and select `Edit Security Groups` |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +4. Select the appropriate security group and select `Save` |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +RDP will now be allowed through the Openstack firewall for the instance! |
| 68 | + |
| 69 | +### Step 3: Connecting to the instance ### |
| 70 | +1. Open your remote desktop client |
| 71 | + * Windows Clients: Open Start Menu > type in "Remote Desktop Connection" |
| 72 | + * MacOS Clients: [Windows App](https://apps.apple.com/us/app/microsoft-remote-desktop/id1295203466?mt=12) |
| 73 | + * Linux Clients: [Remmina](https://remmina.org/) |
| 74 | +2. Enter the IP address of your Instance and press `Connect` (You can find this in Compute > Instances) |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | +3. Enter the credentials for the Instance and select OK |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +4. You will be successfully connected to the Instance! |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | +## Retrieving Windows Password # |
| 88 | + |
| 89 | +To retrieve the Windows password for an instance in OpenStack Horizon, you need to follow these steps. This process assumes that you have created the instance with an SSH key, which is necessary for decrypting the password. |
| 90 | + |
| 91 | +### Step 1: Creating an Instance with an SSH Key ## |
| 92 | + |
| 93 | +1. On the left pane, choose `Compute` and then `Instances`. |
| 94 | +2. Click on `Launch Instance`. |
| 95 | +3. Fill in the necessary details for your instance, such as the instance name and flavor. |
| 96 | +4. Under the `Key Pair` section, select an existing key pair or create a new one. This key pair will be used to decrypt the Windows password. **Ensure the key is a RSA key.** |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +### Step 2: Retrieving the Windows Password ## |
| 101 | + |
| 102 | +1. On the left pane, choose `Compute` and then `Instances`. |
| 103 | + |
| 104 | +2. Click on the instance for which you want to retrieve the password. |
| 105 | + |
| 106 | +3. Click on the `Actions` dropdown menu on the right and select `Retrieve Password`. |
| 107 | + |
| 108 | +4. In the `Retrieve Password` dialog, click on `Choose File` and upload the private key file associated with the SSH key pair used during instance creation. |
| 109 | + |
| 110 | +5. Click on `Decrypt Password`. The decrypted password will be displayed. |
| 111 | + |
| 112 | +You can now use this password to log in to your Windows instance via the OpenStack console or Remote Desktop Connection. |
0 commit comments