How to create a Windows VM and access it through RDP (Remote Desktop Protocol)
In this guide, the procedure to create a Windows Virtual Machine on Cloud@ReCaS and to access it through a RDP connection is shown.
Create a VM with Windows on Cloud@ReCaS
- Create a proper Security Group
Following this guide, create a security group in which port TCP 13389 is open. - Instantiate the VM
Log in to the ReCaS web dashboard with your username and password, and, from the upper menu, select the tenant in which you want to create a virtual machine (VM).In the left panel, click Project (1), then Instances (2) and then the
Launch Instance
button (3) in the upper right part of the page.In the new window, configure the VM:
-
in the
Details
tab, in Instance Name type a name for the VM; in Availability Zone select "nova"; in Count set 1 (or higher values if you want to create more VMs); -
in the
Source
tab, select "Image" in Select Boot Source (1); from the Available menu, add the image for your VM (2); -
in the
Flavor
tab, select the flavor you need for the VM from the Available menu (in the example in the figure, tha flavor "small" is added); -
in the
Networks
tab, select the network (public or private) for the VM. Please use public_net only if really necessary, e.g. if your VM will host a public webserver; private_net, instead, guarantees higher security for the VM. To access a VM with private IP, you need to start a VPN connection.
-
in the
Security Groups
tab, select from the Available menu the security groups you need for your VM (remember to add the Security Group you created at this step to open 13389 port, TCP protocol, as shown in the figure); -
in the
Configuration
tab, in Customization Script copy the following script, which configures the RDP connection on port 13389rem cmd ECHO > "%TMP%\myregfile.reg" Windows Registry Editor Version 5.00 ECHO >> "%TMP%\myregfile.reg" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp] ECHO >> "%TMP%\myregfile.reg" "PortNumber"=dword:0000344d ECHO >> "%TMP%\myregfile.reg" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server] ECHO >> "%TMP%\myregfile.reg" "fDenyTSConnections"=dword:0 regedit.exe /s %TMP%\myregfile.reg netsh advfirewall firewall add rule name=myrule dir=in action=allow protocol=TCP localport=13389 net stop UmRdpService net stop TermService net start UmRdpService net start TermService
-
the
Key Pair
tab can be ignored, the tabsNetwork Ports
andMetadata
are for advanced settings, which are outside the purposes of this guide.
Once the desired configuration has be chosen, click the
Launch instance
button to create the VM. -
- Start the VM
Once the VM is running, open the dashboard console by clicking on the VM name and selectingConsole
. For a better view of the Console, click Click here to show only console.
In the Console, clickCtrlAltDel
and change password for Administrator user.
RDP connection
On your computer, from which you need to access the Windows VM, install the software for the RDP connection.
This step depends on which OS is installed on your computer. Next sections will show which software can be used for Windows, Mac OS X, and Linux computers, and how to configure it for connecting to the Windows VM.
- Access the VM from Windows
On your computer, open the program Remote Desktop Connection (the italian name of the software is Desktop remoto). Then, click Show Options and configure the connection:- type the IP address of your VM (in this example 10.10.10.2) followed by the indication of the port 13389, i.e. IP-address:13389;
- type your username;
Connect
.
More information can be found at this link.
- Access the VM from Mac OS X
On your computer, download the software Microsoft Remote Desktop from the Apple Store and run it. Then, clicknew
and configure the connection:- choose a name;
- type the IP address of your VM (in this example 10.10.10.2) followed by the indication of the port 13389, i.e. IP-address:13389;
- type your username;
- type your password.
After editing, close the window and select the connection from the menu.
- Access the VM from Ubuntu
In this guide the software vinagre is considered; other options are similarly possible, like rdesktop or Remmina, and work in the same way.
To install vinagre, type on your terminal (debian-based platforms):sudo apt-get install vinagre
Then, run it on terminal typingvinagre
or search Remote Desktop Viewer among applications.
Once vinagre is ready, clickConnect
and set the parameters as follows:- choose RDP protocol;
- type the IP address of your VM (in this example 10.10.10.2) followed by the indication of the port 13389, i.e. IP-address:13389;
- type your username.