Creating a Windows VM in OCI and Remotely Accessing its GUI in Microsoft Remote Desktop

Jared Bach
9 min readSep 3, 2021

Please note: This blog assumes that you already have a working tenancy in OCI and a working compartment that you can place your resources in. This blog also assumes that your local computer is running MacOS. While the majority of the steps in this blog are most likely the same, regardless of what your local machine is, I just wanted to make a note of this at the beginning of this blog to minimize any confusion.

Today, we are going to be creating a Windows VM in OCI and accessing its GUI in Microsoft Remote Desktop. This honestly not too hard and should not take you more than a 15 minutes to get all set-up. I struggled much more setting up a Linux VM in OCI than I did with this Windows VM. It is a fairly straight forward process.

Sign-in to your OCI tenancy

Let’s start by logging into our OCI tenancy. To do this, navigate to this website. You should see a page that looks like this.

Where it says “Cloud Account Name” circled in red above, enter your tenancy name and then click “Next.”

Click “Continue” to sign-in using SSO.

Click “Oracle SSO” to sign-in using SSO. You will then, finally, be brought to the page where you will input your SSO credentials to sign-in to OCI. The screen will look like this.

Input your SSO credentials, and if necessary, complete the 2-factor authentication. At long last, you will arrive in the the OCI Console.

Creating the Windows VM instance

Once you are in the OCI console, navigate to the hamburger menu in the left-hand corner of the screen. Under “Compute,” click “Instances.”

After clicking “Instances,” your page will look like something like what I have below. Circled in red, you will see “Compartments.” I have already created a compartment and selected the one that I wish to place the instances that I will be creating into. If you do not have a compartment, please create one. I will not be covering how to create a compartment in this blog.

Once the compartment you would like to place your instances into is selected, we are finally going to begin creating our instances. Select the “Create Instance” button circled in red above. Your page should now look something like this.

Here is how you are going to configure your instance:

  • Name: select a name for your instance. It can be whatever you want. I am naming my instance “JIB-Windows_VM.”
  • Compartment: select the compartment that you wish to place your instance into. The name of my compartment is JaredBachCMP.
  • Placement: keep this as the default, AD 1
  • Image: click “change image” and select the Windows Server 2019 Standard image
  • Shape: click “Shape” and change the number of OCPUs from the default of 1 to 4. Everything else can be left-as is.
  • Networking: under “Primary Network,” select the “Create a new virtual cloud network” option and name your new virtual cloud network (VCN). If you followed my “Creating a Linux VM in OCI” tutorial, you can use the same VCN that we created in that tutorial here. I am going to be re-using my “JIB-VCN.” If you are creating a new VCN, make sure that you have the correct compartment selected. Under “Subnet,” select the “Create new public subnet” option, if you would like to create a new one, and name your new public subnet. I am going to be re-using my“JIB-Subnet.” If you are creating a new VCN, make sure that you also have the correct compartment selected. Leave the CIDR block and the public IP address as-is.
  • Boot volume: keep this as the default and do not select any options.

Once you have everything configured correctly in your instance, click the “Create” button. Mazel tov. You just created a Windows VM. Give the instance some time to provision. Once it is done provisioning, your screen will look like this. Make note of the “Public IP address,” which I have circled in red. Also make note of the username and initial password, which I have also circled in red. You will need both of these to log into your instance for the first time.

Installing Microsoft Remote Desktop

If you have a MacBook, navigate to the Apple App Store and download Microsoft Remote Desktop. It will look like this in the App Store.

Once it is installed, open the application. The initial window should look like this.

Minimize this window for now. We will be coming back to this. We first need to open up some ports in our VCN to allow internet traffic to flow between our VM and Microsoft Remote Desktop.

Opening ports in our VCN

If we tried to connect to our VM in Microsoft Remote Desktop, we would not have any success because a connection would not be able to be established. In order to allow a connection to be established, we need to open up port 3389. We can do this easily in the OCI Console.

In your browser, navigate back to the OCI Console and log-in. Navigate to the hamburger menu in the left-hand corner of the screen. Under “Networking,” click “Virtual Cloud Networks.”

Once you are inside the Virtual Cloud Networks, make sure that you are in the correct compartment. Click on the VCN, circled in red below. It is the VCN that we created earlier in this tutorial.

After clicking on the VCN, your screen should look like this. Click on security lists, circled in red below.

After clicking on “Security Lists,” then click on “Default Security List for JIB-VCN.”

Once you are inside the “Default Security List for JIB-VCN,” click-on the “Add Ingress Rules” button.

Add the following ingress rule to your security list. This will open up port 3389 and essentially allow our VM to be accessed over the internet through Microsoft Remote Desktop on our local computer. Change the IP Protocol to TCP and the Destination Port Range to 3389. Also change the source CIDR to 0.0.0.0/0. The description is optional. When you are done, click the blue “Add Ingress Rules” button.

You should now see the new ingress rule we added to our security list. We are almost done. The next step is to log-into the Windows VM from Microsoft Remote Desktop.

Logging into our VM in Microsoft Remote Desktop

Open-up Microsoft Remote Desktop. Your initial screen should look like what I have below. Click “Add PC.”

You should get a pop up screen that now looks like this.

Configure the PC using the following criteria:

  • PC name: where it says “PC name,” put the public IP address that we circled in red in the OCI console
  • User account: leave this as the default for now
  • Friendly name: give your PC a friendly name. I am going to name mine “Jared’s Windows VM”
  • Connect to an admin session: check this box

Once you add all of the required configurations, click the “Add” button. Your screen should now look like this.

Click “Jared’s Windows VM.” You will most likely get a pop-up that says something like this.

Click “Connect.” You will then be prompted to enter a username and a password.

Enter “opc” for the username and the default password from the OCI console that we circled in red earlier. Your Windows VM should now be live and running. You should see a screen prompting you to change your password.

Follow the prompts on the screen. Unfortunately copy and paste do not work on the log-in screen, so you will need to manually enter your password from the OCI console. Also be sure to create a password that meets the complexity requirements. Save the new password somewhere safe, like in a password manager. Once you are logged-in, your screen should look like this.

Congratulations, you are now connected to your Windows VM.

Downloading a new browser to better access the internet

The default and only browser in this VM is Internet Explorer. This browser, especially in this VM, is extremely restrictive and does not work well. Let’s download a new browser. First, open Internet Explorer. In the search bar, navigate to the website, Brave. You might have to click “OK” on some security windows in order to proceed forward. In the top right of the Internet Explorer screen, click the gear icon. Then, scroll down to “Internet Options” and select it. Your screen should look like this.

Navigate to the “Security” tab at the top of the window and click it. Under the “Security” tab, click the “Trusted sites” tab. Your screen should look like this.

Click the “Sites” button and add the Brave URL to your trusted sites list.

Navigate back to the Brave website and download the browser. When prompted, install the browser and follow the prompts on the screen. Once the installation is complete, you will be able to use Brave as your browser. Your screen should look like this when you first open Brave.

Congratulations. You now have a working browser on your Windows VM.

--

--

GenZ business techie 👨🏻‍💻📉 lover of dogs and hummus 🇮🇱