1. Home
  2. Knowledge Base
  3. Product
  4. Compute
  5. Accessing a Windows Virtual Machine from Linux and Windows Server.

Accessing a Windows Virtual Machine from Linux and Windows Server.

Remote Desktop Protocol (RDP) is a widely used protocol for accessing Windows-based systems remotely. If you need to connect to a Windows Virtual Machine (VM) from a Linux or Windows environment, RDP provides a seamless and efficient solution. This article details the step-by-step process for enabling RDP on a Windows VM and connecting to it from both Linux and Windows operating systems. Linux.

Prerequisites:

  1. A Windows VM with RDP enabled.
  2. IP address or hostname of the Windows VM.
  3. A user account with RDP access permissions on the Windows VM.

Enabling RDP on the Windows VM

Before accessing the VM remotely, RDP must be enabled:

  1. Log in to your Windows VM.
  2. Navigate to Settings > System > Remote Desktop.
  3. Toggle the switch to Enable Remote Desktop.
  4. Click on Select Users and ensure that your user account is listed.
  5. Apply changes and close the settings window.

Accessing Windows VM from a Linux System

Linux users can utilize xFreeRDP, a lightweight and efficient open-source RDP client, to access Windows VMs.

1. Install xFreeRDP on Linux

xFreeRDP is available in most Linux distributions’ repositories. Install it using the package manager of your Linux distribution:

For Debian/Ubuntu:

Install FreeRDP:

sudo apt update
sudo apt install freerdp2-x11


For RHEL/CentOS/Fedora:


sudo yum update

sudo yum install freerdp -y

Verify the installation by running:

xfreerdp --version

2. Connect to the Windows VM using command line

Use the following command to connect to your Windows VM:

xfreerdp -u <username>  <ip_or_hostname>

Replace:

<username>: Your Windows VM username.

<ip_or_hostname>: The IP address or hostname of the Windows VM.

Example:

xfreerdp -u Administrator 157.119.xx.xxx


Then it will ask you to enter the password.

By following the steps above, you can quickly set up and customize your RDP connection to suit your needs.

Accessing Windows VM from a Windows System

To Connect to the Windows VM from Your Windows Desktop

Windows users can connect to a Windows VM using the built-in Remote Desktop Connection (RDC) tool.

1. Open Remote Desktop Connection

  1. Press Win + R, type mstsc, and press Enter.
  2. In the Remote Desktop Connection window, enter the IP address or hostname of the Windows VM.
  3. Click Connect.

2. Authenticate

  • Enter your Windows username and password when prompted.
  • If a security warning appears, click Yes to proceed.

3. Access the Windows VM

Upon successful authentication, the Remote Desktop session will open, providing full access to the Windows VM.

Was this article helpful?

Related Articles