In this tutorial, you will learn the simple process to create a server image that you can use when setting up a new remote desktop.
Setting up a remote desktop from scratch can take time, and it can be quite a tedious process if you are a Partner and have to do this for multiple customers. At Jotelulu, we have developed a function that allows you to create an image of an existing server to speed up the process next time when deploying a remote desktop.
Simplified diagram showing how to create a server image to configure a new remote desktop
How to create a server image to use when configuring a new remote desktop?
Before you begin:
To successfully complete this tutorial, you will need:
- To be registered as a Partner on the Jotelulu Platform, have signed in using your username and password and have a registered customer for whom you wish to deploy a remote desktop.
- To have previously deployed a Windows 2019 or 2016 server.
- To have installed the desired software and/or configured the desired settings on the existing server.
- IMPORTANT: The following is a list of other technical requirements to ensure that everything functions correctly when creating the server image:
- Do not remove the local administrator profile: We will automatically use this local account to interact with the server. A new, random password will be generated each time a server is deployed.
- Cloudbase-init: Do not remove the Cloudbase-init user or the Cloudbase-init software. This is required by the orchestration software to configure and run startup scripts or generate and change the administrator password.
- DHCP network interface: Jotelulu servers are configured this way by default, and this should not be changed. If a server image is created using a static IP, the new server may not be able to establish a network connection once the server image has been deployed.
- Do not install the “Remote Desktop Services” role: This role is not required because the software to establish remote desktop connections will be installed when the server is deployed. In Server Manager > Local Server, go to Manage > Remove Roles and Features and untick “Remote Desktop Services” if they are installed:
Before you begin: Ensure that Remote Desktop Services are not installed on the server.
-
- Do not use ports 80 or 443: Do not install any service that uses TCP ports 80 or 443. These ports will be used by the remote desktop software once the server is deployed. If you need to enable IIS, you should change the default IIS port 80 for your website to another port, such as 8080 or 4443, then publish the desired public port using port forwarding (Server Firewall section). To change the IIS port for your website, go to Internet Information Services Manager, right-click on the website and click “Edit Bindings…”.
Before you begin: Do not use ports 80 or 443
Step 1. (Server Preparation) Uninstall the Monitoring Agent.
Once the Jotelulu server has been deployed, the necessary software has been installed and you have reviewed the important points detailed above, you are now ready to remove the Monitoring Agent from the deployed server.
Currently, in order to automate the server deployment process, the Jotelulu platform creates a different type of image depending on the operating system (in this case, Windows 2019 or 2016). For such servers, the Monitoring Agent is installed to provide graphs for different sections of the Jotelulu platform and enable alerts when there is a problem. However, to create a server image, this monitoring agent needs to be removed.
To do this, you will need to access the server via the remote desktop (RDP) (1).
Step 1. Open the Server tab and access using the command prompt
> rmdir /s Zabbix
Step 1. Run these commands to uninstall the monitoring agent
Step 2. (Server Preparation) Run SYSPREP.
Once the monitoring agent has been uninstalled, you will now use Sysprep on the server to create a unique SID. This is to avoid any potential security problems caused by having the same SID on different servers.
TIP 1: At this point, we recommend stopping the server and creating a VM Snapshot. This will allow you to restore the server if there is a problem or if you need to make changes to the image after it has been created. For more information about how to do this, see the tutorial entitled ‘How to Create and Restore a VM Snapshot’, which you will find on the Servers subscription page. Bear in mind that Sysprep can only be run eight times on the same system. You can avoid this limit by restoring the server to a snapshot taken before Sysprep was run.
To continue running Sysprep, go to the Server tab (Servers subscription page > Servers > Server), and click on the CMD button (3).
TIP 2: It is a good idea to have the RDP connection (1) open at the same time to run commands and the commandprompt (3) open to see when the server actually stops.
Step 2. Open the Server tab and open the command prompt
Using the RDP, open the command prompt in administrator mode and run the following commands (4):
Step 2. Run Sysprep commands
Step 2. Stop the server from the platform once the command prompt closes
Note: To create the server image, it is important for the server to remain stopped after running Sysprep. This is why the server needs to be stopped as soon as the command prompt closes. If you do not stop the server using the button on the platform, it will automatically restart. This is because, when Sysprep finishes, the server will stop and the HA (High Availability) system will interpret this as a “problem”, quickly restarting the server. It is important that this does not happen.
If you do not have enough time to stop the server before it automatically restarts, you will need to repeat the Sysprep process. Should this happen, you will need to restore the VM snapshot mentioned in TIP 1 and start again.
Step 3. Creating a server image.
Once you have completed the Sysprep process and the server has been stopped, you can now create an image of the server.
- Access the server itself through the Servers section (6) (this is the process we will follow in this tutorial).
- Open the Images section (7).
Step 3. Creating a server image from the Servers subscription page
Step 3. Select the server that you want to create an image of.
Step 3. Convert your server into an image
Step 3. Name the image and choose the services for which it can be used
Step 3. Notifications will indicate that the image has been created successfully
Step 4. Using the image to configure a new remote desktop.
Once the image has been created, you will then be able to use it when configuring future remote desktops.
Step 4. Subscribing to a new remote desktop service.
Step 4. Choose another server configuration in the final step
Step 4. Choose the image created in step 3 and click on Save.