Setting up a Debian/Ubuntu/Windows server cloned from the template
By creating a Cloud using a deployment template, you will have to provision the server with a series of previous modifications in order to be able to operate with it.
⚠️ Important: When deploying a service using a deployment template, the same IP will be configured as in the server used to create it. So there may be connectivity problems until this is changed.
-
In the case of a Linux server, you will have to configure the IP of the server with the IP that you will find in your SWPanel or you will have received by mail.
-
In the case of a Windows service, also, you should use the sysprep tool to avoid problems of duplicate names / IDs within the same network.
To create a Deployment Template you can follow this manual: How to create Cloud deployment templates
To create a Cloud using a Template you can follow this manual: How to create a Cloud using a Template
Linux Server Configuration
Preparing the environment
Access the dashboard of the Cloud server deployed from a template and click the corresponding icon in the SSH console.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_01.png)
Login to the cloned machine with the root user and the password of the original machine (note the special characters in the ASCII code).
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_02.png)
Once you have logged into the cloned server, you must modify the /etc/network/interfaces
file, for example with the nano editor, and modify the existing public IP in the file by the new public IP of the cloned machine, which you will have received by mail.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_03.png)
nano interfaces
Interfaces file with the initial configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_05.png)
Mail with access credentials.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_06.png)
Updated interfaces file.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_07.png)
Then run the command /etc/init.d/networking restart
.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_08.png)
You can check the modification of the newly configured IP by executing the ifconfig -a
command.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_09.png)
At this point, your cloned machine will have its own IP and will be able to make use of any SSH connection instead of the console provided by SWPanel.
Modifying the hosts and hostname files
Connect via SSH to the new server and modify the /etc/hosts
and /etc/hostname
files by changing the name of the original server to the name of the server you received by email.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_10.png)
nano /etc/hosts
Hosts file with the initial configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_11.png)
Hosts file with the final configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_12.png)
nano /etc/hostname
Hostname file with the initial configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_13.png)
Hostname file with the final configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_14.png)
Change root user password
Execute the command passwd root
so that you can change the root user password to the one you received by e-mail.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_15.png)
In this way, the new cloned machine will have the same IP, with its corresponding root name and password, finalizing the cloning process and starting up the cloned server.
IMPORTANT: to save the changes with the nano editor, remember to press the control + x
keys on your keyboard.
Windows Server configuration
Preparing the environment
Access the dashboard of the Cloud server deployed from a template and click on the icon corresponding to the console.
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_001_ES.PNG)
Login to the cloned machine with the Administrator user and the password of the original machine (note the special characters in the ASCII code).
You may be prompted to press “Ctrl+Alt+Del” to continue with the login. If this is the case, you can select the button at the top right of the console that allows you to simulate the action of this combination:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_002_ES.png)
Then specify the password of the source machine.
Once you are logged in, go to the Windows icon and search for “run”. Here you must specify:
C:\Windows\System32\Sysprep\sysprep.exe
As specified in the attached screenshot:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_003_ES.png)
Then a new tab will open in which we will have to select:
- Start the quick configuration (OOBE) of the system.
- Restart
This process allows to prepare the Windows server with unique identifiers so that it does not enter in conflict with the cloned Windows. This action is necessary to avoid operational problems.
⚠️ Important: The sysprep process deletes the configuration of the Administrator user, as well as his files. If it is important not to lose them, we recommend to make a backup copy before executing the process. Here is a link with the information about the Windows sysprep process -> https://learn.microsoft.com/es-es/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview
We strongly recommend reading the document before running the process.
To finish and start the process, select “OK”:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_004_ES.png)
Then the computer will restart and we will see that we will lose access to the console. After a few minutes, we will be able to open the console again and we will see that the following window will open:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_005_ES.png)
We leave the default options and select “Next”. In the next window we will have to accept the Windows terms and conditions. We will click on “Accept”:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_006_ES.png)
Finally we will be asked to specify a new password for the “Administrator” user. This password must be the new password you received in the email. Basically it is the credentials of the cloned machine, not the original machine:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_007_ES.png)
Specify the password and click “Finish”:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_008_ES.png)
Windows will finish the configuration and we will return to the login screen, where we will have to enter again the access credentials. Remember that the access credentials are those that you have specified in the previous point.
Now it remains to change the specific configuration. That is:
Change the network
We need to change the network to specify the IP of the machine itself. To do this, click on the Windows icon -> Run and specify:
ncpa.cpl
Here we right click on the network adapter and select “Properties”.
Then select “Internet Protocol version 4 (TCP/IPv4) and click on ‘Properties’.
A new tab will open in which we will see that the network is in DHCP protocol. We must check the manual option (Use the following IP address” and specify the IP that we have received by e-mail. The subnet mask is set to “255.255.255.0” and the “Default Gateway” is set to the default value.
As for the DNS, we specify “81.25.112.78” and “81.25.112.9”. If the cloud is located in ROOM B (with IP 185.X.X.X.X) “185.61.124.25” and “185.61.124.26” must be specified as DNS. Other DNS can be specified if desired.
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_009_ES.png)
Click “Accept” and the network will be configured.
Change the hostname
Another step to carry out is to change the hostname, since the sysprep process applies a random hostname.
We access the server and, in the Windows icon, we look for “run”. In the new tab we specify “explorer.exe”.
A new tab with the “Windows Explorer” will open. In the left side menu, select “This computer”, right click and select “Properties”:
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_010_ES.png)
Then a new tab will open. Here we will have to scroll down until we find the option “Rename this computer”. Click on it and specify the new name (it has to be the same as the one in the e-mail with the login data. The name must be set without the “dnssw.net”):
![enter image description here](https://static.swpanel.com/doc/2022/images/0467/0467_011_ES.png)
Click “Next”. When prompted, select “Restart now”.
Once the steps have been completed, the new cloned machine will have the same IP, with its corresponding Administrator name and password, completing the cloning process and starting up the cloned server.