Виртуальная машина удаленный линукс

Enable graphical remote desktop for Linux virtual machines in Azure Lab Services

When you create a lab from a Linux image, Azure Lab Services automatically configures SSH (Secure Shell) access to let a lab creator, such as an educator, connect to the template VM from the command line. After you publish the template VM, lab users can then also connect to their VMs using SSH. You can also connect to a Linux VM using a GUI (graphical user interface). This article shows the steps to set up GUI connections using Remote Desktop Protocol (RDP) and X2Go.

Linux uses an open-source version of RDP called, Xrdp. For simplicity, we use the term RDP throughout this article.

In some cases, such as with Ubuntu LTS 18.04, X2Go provides better performance. If you use RDP and notice latency when interacting with the graphical desktop environment, consider trying X2Go for improved performance.

Some marketplace images already have a graphical desktop environment and remote desktop server installed. For example, the Data Science Virtual Machine for Linux (Ubuntu) already has XFCE and X2Go Server installed and configured to accept client connections.

If you need to use GNOME or MATE, ensure you have properly configured your lab VM. There is a known networking conflict that can occur with the Azure Linux Agent, which is needed for the VMs to work properly in Azure Lab Services. Instead, we recommend using a different graphical desktop environment, such as XFCE.

Setting up X2Go

To use X2Go, the lab creator must perform the following steps on the lab template VM:

X2Go uses the same port that as SSH, which is already enabled by Azure Lab Services. As a result, no extra configuration is required during lab creation.

In some cases, such as with Ubuntu LTS 18.04, X2Go provides better performance. If you use RDP and notice latency when interacting with the graphical desktop environment, consider trying X2Go instead.

Install X2Go Server on the template VM

For optimal performance, we recommend using the XFCE graphical desktop and for users to connect to the desktop using X2Go.

  1. Follow these instructions to prepare for updating the template VM.
  2. Install X2Go Server in either of two ways:
    • Follow these steps to configure X2Go on Ubuntu by using a script.
    • Alternately, manually install X2Go Server. There are many graphical desktop environments available for Linux. Some options include GNOME, MATE, XFCE, and Xubuntu.
Читайте также:  Civilization 5 mods linux

Connect using X2Go client

To connect to a VM that has X2Go configured, you can use the X2Go client software and the SSH information of the VM. Follow these steps to connect to a VM by using the X2Go client.

RDP Setup

To use RDP to connect to a lab VM, the lab creator must:

  • Enable remote desktop connection in Azure Lab Services
  • Install the RDP remote desktop server.
  • Install a Linux graphical desktop environment.

Enable RDP connection in a lab

RDP uses network port 3389 for connecting to a VM. By default, Linux VMs only have the SSH port opened.

Follow theses steps to allow port 3389 to be open for connecting to Linux VMs with RDP:

  1. During lab creation, enable the Enable Remote Desktop Connection setting. The educator must enable this option to open the port on the Linux VM that is needed for an RDP remote desktop session. If this option is left disabled, only the port for SSH is opened. Screenshot that shows the New lab window with the Enable Remote Desktop Connection option.
  2. On the Enabling Remote Desktop Connection message box, select Continue with Remote Desktop. Screenshot that shows the Enable Remote Desktop Connection confirmation window.

Install RDP on the template VM

If you want to set up the GNOME with RDP on Ubuntu, see Install and configure GNOME/RDP. These instructions handle known issues with that configuration.

To install the RDP package on the template VM, see Install and configure RDP. There are many graphical desktop environments available for Linux. Some options include GNOME, MATE, XFCE, and Xubuntu.

Connect using RDP client

You can use the Microsoft RDP client to connect to a template VM that has RDP configured. The Remote Desktop client can be used on Windows, Chromebooks, Macs and more. For more information, see Remote Desktop clients.

For OS-specific instructions for connecting to a lab VM using RDP, see Connect to a Linux lab VM using RDP.

Troubleshooting

Using GNOME or MATE graphical desktops

For the GNOME or MATE graphical desktop environments, you may come across a networking conflict with the Azure Linux Agent. The Azure Linux Agent is needed for the VMs to work properly in Azure Lab Services. This networking conflict causes the following side effects when Ubuntu 18.04 LTS is used with either GNOME or MATE installed:

  • Lab creation using the image will fail with the error message, Communication could not be established with the VM agent. Please verify that the VM agent is enabled and functioning.
  • Publishing student VMs will stop responding if the auto-shutdown settings are enabled.
  • Resetting the student VM password will stop responding.
Читайте также:  Arch linux zram generator

To set up the GNOME or MATE graphical desktops on Ubuntu, see Install and configure GNOME/RDP and MATE/X2go. These instructions include a fix for the networking conflict that exists with Ubuntu 18.04 LTS. The scripts also support installing GNOME and MATE on Ubuntu 20.04 LTS and 21.04 LTS.

Using RDP with Ubuntu

In some cases, such as with Ubuntu LTS 18.04, X2Go provides better performance. If you use RDP and notice latency when interacting with the graphical desktop environment, consider trying X2Go for improved performance.

Next steps

You’ve now successfully configured RDP or X2Go for a Linux-based template VM.

Источник

Как получить удаленный доступ к виртуальным машинам VirtualBox 6 — подсказка для Linux

VirtualBox — это платформа виртуализации с открытым исходным кодом. Это альтернатива VMware Workstation Pro, VMware Player и VMware Fusion. Доступ к виртуальным машинам VirtualBox можно получить удаленно по протоколу RDP (протокол удаленного рабочего стола). В этой статье я покажу вам, как настроить удаленный доступ на VirtualBox VM (виртуальная машина) и получить к ним доступ из клиента удаленного рабочего стола Windows и Remmina в Linux. Итак, приступим.

Настройка удаленного доступа к виртуальной машине VirtualBox:

Сначала откройте VirtualBox. Теперь выберите виртуальную машину (виртуальную машину), к которой вы хотите получить удаленный доступ, и нажмите Настройки. Виртуальная машина (виртуальная машина) должна быть выключена, чтобы разрешить удаленный доступ. Иначе ничего не получится.

Теперь из Отображать, нажми на Удаленный дисплей таб. Из Удаленный дисплей вкладку, проверьте Включить сервер Установите флажок, чтобы включить сервер удаленного отображения VirtualBox.

Теперь вы можете настроить параметры удаленного сервера здесь. Здесь главное —

Порт сервера. Порт сервера — это 16-битное целое число. Это может быть значение от 0 до 65535. Порт сервера по умолчанию: 3389. Вы должны установить для порта сервера значение 3389 или выше.

Помните, что каждая виртуальная машина, к которой вы включаете удаленный доступ, должна иметь другой номер порта сервера. У двух или более виртуальных машин не может быть одного и того же порта сервера.

По умолчанию VirtualBox разрешает только один удаленный сеанс виртуальной машины. Если вы хотите, чтобы на одной виртуальной машине было несколько удаленных сеансов, проверьте расширенную функцию Разрешить несколько подключений.

Когда вы закончите настройку VirtualBox Remote Display Server для виртуальной машины, нажмите хорошо.

Теперь запустите виртуальную машину.

Виртуальная машина должна запуститься.

Теперь вы можете проверить, используется ли порт удаленного сервера виртуальной машиной VirtualBox с помощью следующей команды:

$ судо netstat -tlpn | grep ВМ

Как видите, порт 3389 (в моем случае) используется виртуальной машиной VirtualBox и находится в состоянии LISTEN. Итак, порт готов принимать новые подключения.

Читайте также:  One sided printing linux

Настройка межсетевого экрана:

Если у вас есть работающий брандмауэр, вам нужно будет разрешить доступ к порту удаленного сервера VirtualBox VM. В Ubuntu / Debian и многих других дистрибутивах Linux на основе Ubuntu / Debian программным брандмауэром по умолчанию является UFW.

В UFW вы можете разрешить доступ к TCP-порту 3389 (в моем случае) с помощью следующей команды:

$ судо ufw разрешить 3389 / TCP

В CentOS / RHEL и многих дистрибутивах Linux на основе RPM брандмауэром по умолчанию является Firewalld.

В Firewalld вы можете разрешить доступ к TCP-порту 3389 (в моем случае) с помощью следующих команд:

$ судо firewall-cmd —добавить порт = 3389 / TCP —постоянный
$ судо firewall-cmd —reload

Удаленный доступ к виртуальной машине VirtualBox:

Чтобы получить удаленный доступ к виртуальной машине VirtualBox, вам необходимо знать IP-адрес компьютера, на котором установлен VirtualBox, и порт удаленного сервера, который прослушивает виртуальная машина.

Вы можете узнать IP-адрес компьютера, на котором установлен VirtualBox, с помощью следующей команды:

В моем случае IP-адрес 192.168.20.143 а порт удаленного сервера виртуальной машины 3389. Для вас все будет иначе. Так что не забудьте заменить его теперь своим.

Узнав IP-адрес и порт сервера виртуальной машины, вы сможете получить удаленный доступ к VirtualBox с любого клиента удаленного рабочего стола, поддерживающего протокол RDP.

В Windows вы можете использовать значение по умолчанию Подключение к удаленному рабочему столу клиент для удаленного доступа к виртуальной машине VirtualBox по протоколу RDP.

Просто откройте Подключение к удаленному рабочему столу клиент, введите адрес компьютера в формате: и нажмите на Соединять.

Заменить с IP-адресом вашего компьютера, на котором установлен VirtualBox, и с портом сервера VirtualBox VM.

В моем случае адрес компьютера 192.168.20.143:3389

Нажмите на да.

Вы должны быть подключены удаленно к виртуальной машине VirtualBox. Теперь вы можете удаленно использовать виртуальную машину VirtualBox в любом случае.

В Linux вы можете использовать Клиент удаленного рабочего стола Remmina для удаленного подключения к виртуальной машине VirtualBox.

Remmina может не быть установлен на вашем компьютере.

Вы можете установить Remmina в Ubuntu / Debian или любых дистрибутивах Linux на основе Ubuntu / Debian с помощью следующих команд:

$ судо подходящее обновление
$ судо подходящий установить -у Реммина

После установки клиента удаленного рабочего стола Remmina запустите его. Затем нажмите на +.

Теперь введите Имя для удаленного подключения установите Протокол к RDP — протокол удаленного рабочего столавведите Сервер адрес и порт в формате:, установить Разрешение и Глубина цвета настройки и т. д.

Когда вы закончите, нажмите Сохранить и подключить.

Вы должны быть подключены к желаемой виртуальной машине VirtualBox удаленно.

Итак, вот как вы настраиваете виртуальные машины VirtualBox для удаленного подключения по протоколу RDP и подключаетесь к виртуальным машинам VirtualBox удаленно. Спасибо, что прочитали эту статью.

Источник

Оцените статью
Adblock
detector