#150 Migrate remote installation guide from VNC to RDP
Merged 4 months ago by sgallagh. Opened 5 months ago by jkonecny.
jkonecny/fedora-server vnc-to-rdp-migration  into  main

@@ -1,8 +1,8 @@ 

  = Fedora Server remote interactive installation guide

- Peter Boy; Kevin Fenzi; Jan Kuparinen

- :page-authors: {author}, {author_2}, {author_3}

- :revnumber: F35-F40

- :revdate: 2024-11-10

+ Peter Boy; Kevin Fenzi; Jan Kuparinen; Jiri Konecny

+ :page-authors: {author}, {author_2}, {author_3}, {author_4}

+ :revnumber: F42

+ :revdate: 2024-12-16

  

  :numbered:

  
@@ -15,76 +15,59 @@ 

  

  

  [abstract]

- With this method, the server is usually residing in a remote location, such as a data center. It boots from a prepared installation media into the Anaconda installation program configured to start and use a "virtual network console" (VNC) server instead of a local physical console. The system administrator connects using a VNC viewer on a local desktop to the server and runs through the Anaconda graphical installer. This method is best suited for servers without any or just cumbersome available direct console access.

- 

- 

- == How it works

- Anaconda provides 2 ways to connect Fedora Sever and a remote desktop.

- 

- Direct mode::

- In this mode, Anaconda starts the installation and waits for an incoming connection  from a VNC viewer before proceeding. While waiting for an incoming connection, the console displays the system’s IP address and the port on which the installer expects the connection, if available; this implies that you need at least a serial console to connect using this mode, but you can work around this limitation if you know the default VNC port and the system’s IP address.

- 

- Connect mode::

- In this mode, the sysadmin first starts a VNC viewer on a desktop system in listening mode. The VNC viewer waits for an incoming connection on a specified port. After that, Anaconda starts and initiates a connection to the VNC Viewer. Again, a boot option or a kickstart command configures host name/IP address and port number. When the installation begins, the installation program establishes a connection with the listening VNC viewer using the specified host name/IP address and port number. Connect mode is always required if the server's network does not allow any incoming connection. But it also may require additional preparation, because the viewer system must be able to accept incoming connections on the specified port, which usually requires changing firewall settings.

- 

- After a successful connection, both methods work the same.

+ With this method, the server is usually residing in a remote location, such as a data center. It boots from a prepared installation media into the Anaconda installation program configured to start and use a "remote desktop protocol" (RDP) server instead of a local physical console. The system administrator connects using a RDP client on a local desktop to the server and runs through the Anaconda graphical installer. This method is best suited for servers without any or just cumbersome available direct console access.

  

  

  == Prerequisites

  

- Proper install media availabe::

- You need one of the installation  media variants ready to use as described in   xref:installation/index.adoc[Server Installation] 

+ Proper install media available::

+ You need one of the installation media variants ready to use as described in   xref:installation/index.adoc[Server Installation]

  

- Accessible Firewall Configuration::

- Depending on which of the previous mentioned VNC variants you are to use, Firewalls on the desktop and any firewall along the connection path (the server to be installed doesn’t have an active firewall) must allow either a connection originating on the desktop (which should at least in case of public accessible servers work anyway) or a connection originating on the server (what is usually blocked and requires additional configuration and may induce security related issues). 

- 

- VNC viewer::

- Performing a VNC installation requires a VNC viewer running on your workstation or another terminal computer. VNC viewers are available in the repositories of most Linux distributions; free VNC viewers are also available for other operating systems, such as Windows. On Linux systems, use your package manager to search for a viewer for your distribution.

+ RDP client::

+ Performing an RDP installation requires an RDP client running on your workstation or another terminal computer. RDP clients are available in the repositories of most Linux distributions; free RDP clients are also available for other operating systems, such as Windows. On Linux systems, use your package manager to search for a RDP for your distribution.

  +

- The following VNC viewers are available in Fedora:

+ The following RDP clients are available in Fedora:

  +

- * TigerVNC - A basic viewer independent of your desktop environment. Installed as the tigervnc package.

- * Vinagre - A viewer for the GNOME desktop environment. Installed as the vinagre package.

- * KRDC - A viewer integrated with the KDE desktop environment. Installed as the kdenetwork-krdc package.

+ * GNOME Connections - Connections is a remote desktop client for the GNOME desktop environment.

+ * freerdp - Free implementation of the Remote Desktop Protocol (RDP)

  +

- To install any of the viewers listed above, execute the following command as root:

+ To install any of the clients listed above, execute the following command as root:

  +

  [source,]

  ----

- [...]# dnf install PACKAGE_NAME  

+ [...]# dnf install PACKAGE_NAME

  ----

  +

- Replace package with the package name of the viewer you want to use (for example, Tigervnc).

- 	

+ Replace package with the package name of the client you want to use (for example, freerdp).

  

- == Using direct mode

  

- === Booting the server

+ == Booting the server

  There are several options to boot the server, depending on the ethernet connection method and availability of at least some, maybe cumbersome and short living local console access.

  

- ==== Console access available

+ === Console access available

  

- 1. Boot the server to be installed and wait for the _boot menu_ to appear. 

+ 1. Boot the server to be installed and wait for the _boot menu_ to appear.

  +

  image:installation/interactive-remote-010.png[Boot Menu]

  

  2. In the menu, select the kernel you want to boot and type _e_ to get access to the boot options and append

  +

  --

-   inst.vnc  inst.vncpassword=PASSWORD

+   inst.rdp inst.rdp.username=USER inst.rdp.password=PASSWORD

  --

  +

- to the end of the command line. Setting a password is not optional here. Replace PASSWORD with the password of your choice. It must be between 6 and 8 characters long.

+ to the end of the command line.

+ Optionally, it is possible to set a password (inst.rdp.password) and/or username (inst.rdp.username). Replace PASSWORD and USER with the password and username of your choice. Password must be at least 6 characters long. If password and/or username is not set the Anaconda installer will ask interactively.

  +

  [IMPORTANT]

  ====

- For security considerations, use a temporary password for the inst.vncpassword= option. It should not be a real or root password you use on any system.

+ For security considerations, use a temporary password for the inst.rdp.password= option. It should not be a real or root password you use on any system.

  ====

  +

  The above configuration requires an active DHCP server. With none available, you must provide a static interface configuration as well.

  +

  --

-   ip=ip::gateway:netmask:hostname:interface:none  inst.vnc  inst.vncpassword=PASSWORD

+   ip=ip::gateway:netmask:hostname:interface:none  inst.rdp inst.rdp.password=PASSWORD inst.rdp.username=USER

  --

  

  3. Leave the editing mode by <ctrl>-x or F10 to continue to boot and to start the installation using the selected kernel and the edited options. You get the message
@@ -96,101 +79,39 @@ 

  The system will initialize the installation program and start the necessary services. It takes some time. And after a lot of boot messages, when the system is ready, you get:

  +

  ----

-   Starting installer, one moment 

+   Starting installer, one moment

    ...

-   hh:mm:ss Starting VNC ...

-   hh:mm:ss The VNC server us now running.

-    

-   You chose to execute vnc with a password

-    

-   hh:mm:ss Please manually connect your VNC viewer to 192.168.100.131:1 to begin the install.

-   hh:mm:ss Attempting to start vncconfig 

+   hh:mm:ss Starting GNOME remote desktop in RDP mode...

+   hh:mm:ss GNOME remote desktop RDP: SSL certificates generated & set

+   hh:mm:ss GNOME remote desktop RDP: user name and password set

+   hh:mm:ss Starting GNOME remote desktop.

+   hh:mm:ss GNOME remote desktop is now running.

+   hh:mm:ss GNOME remote desktop RDP IP: 192.168.122.247

+   hh:mm:ss GNOME remote desktop RDP host name: fedora

  ----

- Continue with __3.2. Connecting to the server__. 

- 

- ==== No console access available – provide a kickstart medium

- [IMPORTANT]

- ====

- *You can't use this way to install release f41!*

- 

- You have thre options:

+ Continue with __3.2. Connecting to the server__.

  

- . Organize a terminal and use the method described above.

- . Install release f40 using this method and then update to f41 using the dnf upgrade method.

- . Provide a kickstart file that completey describes your installation either by a ks.cfg file on an additional USB thumb drive named OEMDRV as described below or using PXE boot.

- ====

- 

- . On your desktop, connect an USB stick and format as FAT and with label OEMDRV. In Fedora use the graphical tool of the desktop UI or a terminal window.

- +

- List the connected devices and identify the USB stick

- +

- [source,bash]

- ----

- […]$ lsblk

- NAME                      MAJ:MIN RM    SIZE RO TYPE MOUNTPOINTS

- sda                         8:0    0  596.2G  0 disk 

- ├─sda1                      8:1    0    600M  0 part /boot/efi

- ├─sda2                      8:2    0      1G  0 part /boot

- ├─sda3                      8:3    0     80G  0 part 

- │ ├─fedora_fedora-root    253:0    0     15G  0 lvm  /

- │ └─fedora_fedora-var_log 253:2    0      5G  0 lvm  /var/log

- └─sda4                      8:4    0  514.6G  0 part 

-   ├─fedora_user-libvirt   253:3    0    120G  0 lvm  /var/lib/libvirt

-   └─fedora_user-machines  253:4    0     80G  0 lvm  /var/lib/machines

- sdb                         8:16   1 1001.5M  0 disk 

- └─sdb1                      8:17   1 1001.5M  0 part 

- zram0                     252:0    0      8G  0 disk [SWAP]

- 

- ----

- +

- In the example above, the USB stick is sdb. Just in case it is mounted, unmount and then format and mount it at e.g. /mnt

- +

- [source,bash]

- ----

- […]$ sudo umount /dev/sdb1

- […]$ sudo mkfs.vfat  -n 'OEMDRV' /dev/sdb1

- […]$ sudo mount /dev/sdb1  /mnt

- ----

- 

- . Create and edit a kickstart file _ks.cfg_ in the root directory of the USB stick

- +

- If possible, you should provide a static network configuration, so you'll know the IP address.

- +

- [source,bash]

- ----

- […]$ sudo vim /mnt/ks.cfg

- <INSERT>

- network --bootproto=static --ip=ww.xx.yy.zz --netmask=255.255.255.0 --gateway=ww.xx.yy.gg --nameserver=10.0.2.1

- vnc --password=PASSWORD

- <SAVE&QUIT>

- ----

- +

- If the network configuration does not allow or enable static interface configuration, omit the 'network …' line and use DHCP.

- 

- . On your server, connect the installation medium as well as the OEMDRV medium and boot. The server will use the OEMDRV stick, configure the interface and start VNC. Just in case you have at least a monitor without keyboard and mouse, you will see the corresponding message. Otherwise, trust your configuration.

- 

- Continue with __3.2. Connecting to the server__. 

  

  ==== No console access available – patch installation medium

- If none of the above options work with your server and network configuration, you could patch the installation media as a last resort. As an example, you can change the grub boot lines in /isolinux/grub.conf. You would need to add the vnc parameter and remove the integrity test, as this is the default line but would fail after patching. 

+ If none of the above options work with your server and network configuration, you could patch the installation media as a last resort. As an example, you can change the grub boot lines in /isolinux/grub.conf. You would need to add the RDP parameter and remove the integrity test, as this is the default line but would fail after patching.

  

  We won't go into this matter any further here. This is really the very last resort and is not recommended.

  

- === Connecting to the server

+ == Connecting to the server

  . In case of a server without a console attached determine the IP address.

- a. If possible, check the DHCP server for the IP of the server. 

- b. Scan the network subnet the server is connected to for open port 5901. Adjust the network IP address accordingly!

+ a. If possible, check the DHCP server for the IP of the server.

+ b. Scan the network subnet the server is connected to for open port 3389. Adjust the network IP address accordingly!

  +

  [source,bash]

  ----

  […]# dnf install nmap

- […]# nmap -Pn -p5901 192.168.158.0/24

+ […]# nmap -Pn -p3389 192.168.158.0/24

  Starting Nmap 7.80 ( https://nmap.org ) at 2021-05-23 08:18 CEST

  Nmap scan report for example.com (192.168.158.1)

  Host is up (0.00052s latency).

  

  PORT     STATE  SERVICE

- 5091/tcp closed nn-admin

+ 3389/tcp closed nn-admin

  MAC Address: 34:81:C4:14:21:B4 (AVM GmbH)

  

  Nmap scan report for iMac.fritz.box (192.168.158.111)
@@ -198,8 +119,8 @@ 

  ...

  ...

  PORT     STATE SERVICE

- 5901/tcp open  

- MAC Address: B8:27:EB:5A:EC:84 

+ 3389/tcp open

+ MAC Address: B8:27:EB:5A:EC:84

  

  Nmap scan report for 192.168.158.200

  Host is up (0.00068s latency).
@@ -208,13 +129,18 @@ 

  Nmap done: 256 IP addresses (12 hosts up) scanned in 2.38 seconds

  ----

  +

- Look for an entry with open state of port 5901 and no hostname or unknown hostname. Among them you will probably find the device you are looking for. In the example above it is 192.168.158.200.

- 

- . On the desktop start the VNC viewer, enter the IP address obtained in the previous step and port 5901 into the Connection Details dialog. Then, click Connect. The VNC viewer will now connect to the installation system. If you set up a VNC password, enter it when prompted and press OK.

+ Look for an entry with open state of port 3389 and no hostname or unknown hostname. Among them you will probably find the device you are looking for. In the example above it is 192.168.158.200.

  

+ . On the desktop start the GNOME connections, add new connection with a plus symbol, enter the IP address obtained in the previous step. You will be asked to confirm certificates. These are generated by Anaconda and they are different for each installation.

+ +

+ Alternatively, use freerdp client with

+ +

+ ----

+   xfreerdp /v:192.168.158.200 /u:USER /p:PASSWORD

+ ----

  

- . When the connection is successfully established, a new window will open on the system running the VNC viewer, displaying the installation menu.

- You will be presented with the familiar language selection menu. 

+ . When the connection is successfully established, a new window will open on the system running the RDP client, displaying the installation menu.

+ You will be presented with the familiar language selection menu.

  +

  .The language selection installation window

  image:installation/interactive-remote-015.png[]
@@ -223,89 +149,7 @@ 

  +

  [TIP]

  ====

- If the screen freezes after some mouse or keyboard actions, add the kernel option __nomodeset__ before the term _inst.vnc_ to the kernel commad line in step  __3.1.1__.

+ If the screen freezes after some mouse or keyboard actions, add the kernel option __nomodeset__ before the term _inst.rdp_ to the kernel commad line in step  __3.1.1__.

  ====

  

  You can then proceed with xref::installation/interactive-local.adoc[Fedora Server interactive local installation].

- 

- 

- == Using connect mode

- 

- === Starting the VNC viewer

- On the desktop, start the VNC viewer in listening mode. See the program documentation for details. If you need to specify a port, select 5901.  

- 

- === Booting the server

- There are several options to boot the server, depending on availability of at least some, maybe cumbersome and short living local console access.

- 

- ==== Console access available

- 

- 1. Boot the server to be installed and wait for the _boot menu_ to appear. In the menu, type edit to get access to the boot options and append the option

- +

- --

-   inst.vnc  inst.vncconnect=HOST:PORT

- --

- +

- to the end of the command line. 

- +

- That configuration requires an active DHCP server. With none available, you must provide a static interface configuration as well.

- +

- --

-   ip=ip::gateway:netmask:hostname:interface:none  inst.vnc  inst.vncconnect=HOST:PORT

- --

- 

- 2. Start the installation using the edited options. The system will initialize the installation program and start the necessary services. When the system is ready, Anaconda will attempt to connect to the IP address and port you provided in the previous step.

- 

- 

- ==== No console access available – provide a kickstart medium

- 

- . Connect an USB stick and format as FAT and with label OEMDRV. In Fedora use the graphical tool of the desktop UI or the Terminal

- +

- List the connected devices and identify the USB stick

- +

- [source,bash]

- ----

- […]$ lsblk

- NAME                      MAJ:MIN RM    SIZE RO TYPE MOUNTPOINTS

- sda                         8:0    0  596.2G  0 disk 

- ├─sda1                      8:1    0    600M  0 part /boot/efi

- ├─sda2                      8:2    0      1G  0 part /boot

- ├─sda3                      8:3    0     80G  0 part 

- │ ├─fedora_fedora-root    253:0    0     15G  0 lvm  /

- │ └─fedora_fedora-var_log 253:2    0      5G  0 lvm  /var/log

- └─sda4                      8:4    0  514.6G  0 part 

-   ├─fedora_user-libvirt   253:3    0    120G  0 lvm  /var/lib/libvirt

-   └─fedora_user-machines  253:4    0     80G  0 lvm  /var/lib/machines

- sdb                         8:16   1 1001.5M  0 disk 

- └─sdb1                      8:17   1 1001.5M  0 part 

- zram0                     252:0    0      8G  0 disk [SWAP]

- 

- ----

- +

- In the example above, the USB stick is sdb. Just in case it is mounted, unmount and then format and mount it at e.g. /mnt

- +

- [source,bash]

- ----

- […]$ sudo umount /dev/sdb1

- […]$ sudo mkfs.vfat  -n 'OEMDRV' /dev/sdb1

- […]$ sudo mount /dev/sdb1  /mnt

- ----

- 

- . Create and edit a kickstart file ks.cfg in the root directory of the USB stick

- +

- [source,bash]

- ----

- […]$ sudo vim /mnt/ks.cfg

- <INSERT>

- vnc --host=HOSTNAME/IP  --port=5901

- <SAVE&QUIT>

- ----

- +

- If there is no DHCP available you must provide a static network configuration as in the example above about a direct connection, probably including DNS server.

- 

- === Connecting to the server

- When the connection is successfully established, a new window will open on the desktop running the VNC viewer, displaying the installation menu. This window will provide full remote access to the installer until the installation finishes and the system reboots for the first time.

- 

- You can then proceed with xref::installation/interactive-local.adoc[Fedora Server interactive local installation].

- 

- 

- 

Migrate remote installation guide from VNC to RDP

With Anaconda change to switch from XWayland to native Wayland, the Anaconda also switched from VNC to RDP. Let's update this guide to reflect reality.

https://fedoraproject.org/wiki/Changes/Anaconda_As_Native_Wayland_Application

What changed:
- Switching VNC to RDP
- Change of the naming convention "VNC viewer" -> "RDP client"
- Drop of vnc connect mode (RDP doesn't support that)
- Change the port used for the RDP
- Drop the kickstart workaround because kickstart is not supported

The kickstart support was not implemented because we are not aware of the utilization. It can be added back if there are requests on that.

rebased onto e70445b

5 months ago

Pull-Request has been merged by sgallagh

4 months ago