Sign In
Sign In

Configure a Server Image

Updated on 09 April 2025

Before creating a cloud server from an image, you should properly configure the image to ensure correct installation and full functionality of the control panel.

Below are the checks and configurations you should perform to successfully create the server.

Basic Configuration

Partition Table

Check the disk partitioning scheme. We recommend using MBR or GPT; both are supported by most Linux distributions using tools like fdisk, gdisk, etc.

Example command:

gdisk -l /dev/vda

Example output:

GPT fdisk (gdisk) version 1.0.5
Partition table scan:
 MBR: MBR only
 BSD: not present
 APM: not present
 GPT: not present

If another partitioning scheme is used, you’ll need to recreate the image with the correct one.

Disk Layout

If the disk contains a single root partition using the ext3 or ext4 file system, the system will automatically resize the filesystem during server creation to match the configured disk size.

For example, if the image block device is 10 GB and the server is created with a 15 GB disk, the block device and filesystem will expand to 15 GB.

Note: Resizing will not occur if LVM (Logical Volume Manager) is used.

Bootloader

The virtual machines use SeaBIOS, so the OS must have a BIOS-compatible bootloader installed.
If a UEFI bootloader is installed, it must be removed and replaced with a BIOS-compatible one.

If using GRUB2, refer to its installation guide.

/etc/fstab Configuration

For stable booting, use UUID-based mounting in /etc/fstab for the root partition.

Example:

UUID=f19002a1-6e7a-45ac-91cd-24b7cc0e4cd9 / ext4 defaults 0 1

To get the UUID of a partition:

blkid

Example output:

/dev/vda1: UUID="f19002a1-6e7a-45ac-91cd-24b7cc0e4cd9" TYPE="ext4" PARTUUID="f7a1fae1-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"

Root User

A password for the root user will be generated when creating the server. Ensure that the root user exists (i.e., hasn't been manually removed).

qemu-guest-agent

Make sure the qemu-guest-agent is installed and running. It is needed for operations such as backups from the control panel.

Check its status:

  • Systemd:

systemctl status qemu-guest-agent.service
  • OpenRC / init.d:

/etc/init.d/qemu-guest-agent status

# or

service qemu-guest-agent status

Install if missing:

  • Debian/Ubuntu:

apt-get install qemu-guest-agent
  • CentOS / RHEL:

yum install qemu-guest-agent
  • Alpine Linux:

apk add qemu-guest-agent

Enable on boot:

  • Systemd:

systemctl enable qemu-guest-agent.service
  • init.d:

chkconfig --add qemu-guest-agent

 

  • OpenRC:

rc-update add qemu-guest-agent

These configurations are enough for creating a cloud server from the image.

Other settings below are recommended for convenience and usability.

Additional Settings

Installing Zabbix

To collect server statistics, we use the Zabbix agent.

Install it using the following script:

wget -O - http://zabbix.repo.timeweb.ru/zabbix-install.sh | bash

SSH Access

SSH is used to access the server. Make sure it is installed and enabled on boot.

Check status:

 

  • Systemd:

systemctl status ssh.service

 

  • OpenRC / init.d:

/etc/init.d/ssh status

# or

service ssh status

Install if missing:

 

  • Debian/Ubuntu:

apt-get install openssh-server

 

  • CentOS / RHEL:

yum -y install openssh-server openssh-clients

 

  • Alpine Linux:

apk add openssh

Enable on boot:

 

  • Systemd:

systemctl enable ssh.service

 

  • init.d:

chkconfig --add ssh

 

  • OpenRC:

rc-update add sshd

Also, ensure your firewall allows access to port 22 (default SSH port).

Disable Swap

It is recommended to disable swap.

Check if swap is active:

swapon --show

Example output:

NAME      TYPE SIZE USED PRIO
/swap.img file 685M   0B   -2

Disable swap:

swapoff -a
Was this page helpful?
Updated on 09 April 2025

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support