Creating an image from a Compute Cloud Linux instance
In Cloud Desktop, you can create desktops from pre-installed system images or your own custom images.
Currently, you can add a Linux-based image. Later on, we are going to add support for Windows images.
A custom image is created from a Compute Cloud instance.
To add a custom image to Cloud Desktop:
-
Create or select a previously created VM instance with the following parameters:
- Access: Via an SSH key. Cloud Desktop does not support access via OS Login.
- Connecting to the internet to install additional software.
-
Configure the instance to create the image you need.
-
Configure remote RDP
access:- Install
xrdp
andxorgxrdp
or other relevant software. - Install system audio management packages to enable audio and a microphone. For example, install
pipewire-module-xrdp
orpulseaudio-module-xrdp
forxrdp
.
Example of RDP and audio configuration for Debian 12:
sudo apt-get update sudo apt-get install -y xfce4 pipewire pipewire-pulse xorgxrdp xrdp pipewire-module-xrdp sudo systemctl enable xrdp sudo systemctl enable xrdp-sesman
- Install
-
Set the incoming connections on all network interfaces for:
- RDP: To TCP port
3389
. - Yandex Cloud Desktop Agent: To TCP port
5050
.
- RDP: To TCP port
-
Check VM availability over RDP.
-
Install the Yandex Cloud Desktop agent for Linux using the following series of commands:
WORKDIR=$(mktemp -d -p $HOME) cd ${WORKDIR} curl -sSL https://storage.yandexcloud.net/yandexcloud-vdi-agent/install.sh > desktop-agent-install.sh chmod +x desktop-agent-install.sh ./desktop-agent-install.sh -i ${WORKDIR} sudo mkdir -p /opt/yandex-cloud/cloud-desktops sudo rm -rf /opt/yandex-cloud/cloud-desktops/desktopagent sudo cp ${WORKDIR}/bin/desktopagent /opt/yandex-cloud/cloud-desktops/ sudo chown root:root /opt/yandex-cloud/cloud-desktops/desktopagent sudo chmod +x /opt/yandex-cloud/cloud-desktops/desktopagent
-
Enable agent autorun on VM OS boot.
Example of enabling autorun for an OS with the SystemD init system (Ubuntu, Debian, CentOS, Fedora, openSUSE, other):
sudo cat >/etc/systemd/system/desktop-agent.service <<EOF [Unit] Description=Yandex Cloud Desktop Agent Wants=networking.service After=networking.service cloud-init.service ConditionFileIsExecutable=/opt/yandex-cloud/cloud-desktops/desktopagent [Service] Type=simple ExecStart=/opt/yandex-cloud/cloud-desktops/desktopagent start --log-level debug Restart=always RestartSec=30 [Install] WantedBy=multi-user.target cloud-init.target EOF sudo systemctl daemon-reload sudo systemctl enable desktop-agent.service
-
Reboot the VM and make sure the agent starts automatically.
Example of checking autorun for an OS with the SystemD init system:
-
Run this command:
sudo systemctl status desktop-agent-updater
-
Make sure the command output contains
Active: active (running)
orActive: activating (auto-restart)
.
-
-
Before creating a boot disk image, clean the instance’s OS from the data you do not need. For example, in distributions with the
apt
package manager, you can clear the cache:sudo apt-get clean
-
Create an image from the instance's disk.
Management console- In the management console
, select Compute Cloud. - Next to your instance, click
→ Stop. - In the left-hand panel, select
Disks. - In the line with the instance boot disk, click
→ Create image. - Enter the image name and give some description, if needed.
- Click Create.
- In the management console
-
Add the image to Cloud Desktop:
Management console- In the management console
, select Cloud Desktop. - In the left-hand panel, select
Images. - Click Add image.
- In the Image source field, select
Compute Cloud
. - In the Image in Compute Cloud field, select the previously created image.
- Enter a name for the image.
- Click Add.
- In the management console
Once the image is created, you can use it as a boot disk image for desktop groups.
If you no longer need the image and the instance, delete them to avoid paying for them: