1. Launch Citrix XenCenter and connect to your XenServer. Highlight your Ubuntu Server 18.04 virtual machine in the pane on the left and click the green Start button on the ribbon at the top of the application window.
2. Click the Console tab in the pane on the right to view the console and monitor the boot process of your Ubuntu Server virtual machine.
3. Now that the machine has booted, we can check if XenServer Tools are installed or not. To do this, click the General tab and navigate to Virtualization state. If XenServer Tools are not installed, it will read “XenServer Tools not installed” as the status.
4. With verification that XenServer Tools is not installed, return to the Console tab and login to your Ubuntu Server 18.04 virtual machine.
5. Before we install XenServer Tools, we need to insert the package into the virtual machine’s DVD drive. Click VM on the ribbon on top of the application window and select Install XenServer Tools to insert the package.
6. Click the Install XenServer Tools button on the confirmation dialog box that appears.
7. Return to the terminal and enter the following command to learn what the name of the device is that our XenServer Tools is assigned to.
8. The output of the previous command will reveal all of the devices attached to your Ubuntu Server 18.04 virtual machine. Notice that XenServer Tools is clearly displayed with its device name to the left. In my case, the device name is sr0. This means that the path to the device will be /dev/sr0. Yours will be similar, if not the same.
9. We now need to mount our device containing XenServer Tools to a mount point so that we can access the contents. Enter the following command into the console to mount the device:
sudo mount /dev/sr0 /mnt
10. Next, navigate to the mounted device by entering the following into the console:
11. Enter the following into the terminal to view the contents of the mounted device:
12. Notice the output of the previous command revealed a Linux directory. That is what we need so change directories to the Linux directory by entering the following command into the console:
13. Again, enter the following command to view the contents of the directory:
14. The output of the previous command reveals a bash script named install.sh. This is the XenServer Tools installation script for Linux. To execute the bash script, enter the following command into the console:
15. You will receive a confirmation message asking if you want to proceed. Enter y into the console and press Enter. The installation is very fast and when its finished, you will receive a message to reboot your Ubuntu Server 18.04 virtual machine.
16. Reboot your Ubuntu Server 18.04 virtual machine by entering the following command into the console:
17. When the virtual machine reboots, verify that XenServer Tools is installed by navigating to the General tab and viewing Virtualization state again. This time it should read “Optimized (Version x.x installed).”