Cheap Dedicated Server Hosting - IONOS Dedicated Server Virtualization - Webmin Virtualmin Cloudmin Setup

This tutorial will show us how to create and setup multiple kvm virtual machine in one dedicated server.

You can buy a cheap dedicated server from IONOS (Deal Server).

When ordering select the Ubuntu OS [ Ubuntu Server 20.04 LTS minimal system (64-bit)].

After deployed the dedicated server, open necessary ports in IONOS panel's Firewall settings. This tutorial require the ports allow for 80, 443, 10000, and temporary allow 22 (after installation of Cloudmin then disallow 22 port).

Let's go to the SSH command in PuTTy as root.

1) Configure Hostname

nano /etc/hosts

Make hosts entry look like this:

127.0.0.1 localhost
192.168.80.35 cloudmin.example.com cloudmin

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Save the hosts file

Now change the hostname of the machine

echo cloudmin > /etc/hostname
hostname cloudmin

Set hostname at the current session

hostnamectl set-hostname cloudmin

2) Enlarge Disk Space

By default, IONOS disk storage is not fully allocated with OS setup. The default deploy of the OS allocate by the RAID1 storage as /home = 5 GB,  /usr = 5 GB,  /var = 5 GB

Enlarge the usable space from the RAID1 drive. IONOS has documentation to enlarge the logical volume disk.

 The installation DVD image ISO files will be placed by default at "/var/webmin/server-manager/" directory. So, we can enlarge about 100 GB for /var directory.

We will store virtual machines system (vm) on /home/kvm

So, we will enlarge maximum space on /home directory.

Let's enlarge space:

lvextend -L +25G /dev/vg00/usr
resize2fs /dev/vg00/usr

lvextend -L +95G /dev/vg00/var
resize2fs /dev/vg00/var

lvextend -l +100%FREE /dev/vg00/home
resize2fs /dev/vg00/home

Alternatively, if you want to decrease size, the command example is "lvreduce -L -80G /dev/vg00/home"

3) Install Cloudmin

wget http://cloudmin.virtualmin.com/gpl/scripts/cloudmin-kvm-debian-install.sh
chmod +x cloudmin-kvm-debian-install.sh
./cloudmin-kvm-debian-install.sh

It may take up to 10 minutes for the installation to complete.

4) Create a Bridge

IONOS don't allow additional virtual systems to be directly connected to the same LAN as their hosts, so IONOS does not recommend BRIDGE network creation.

But Cloudmin cannot function without a bridge network. There is a way to create a bridge in IONOS server.

Let's create it.

apt-get install bridge-utils

Add the bridge in network interface

nano /etc/network/interfaces

Add the below lines

# The bridge interface
auto br0
iface br0 inet static
address 10.1.1.1
netmask 255.255.255.0
broadcast 10.1.1.255
network 10.1.1.0
gateway 10.1.1.1
bridge_ports none
bridge_stp off
bridge_fd 0

Save the network interface file

5) Reboot the server

reboot

6) Login to the control panel by a web browser

https://cloudmin.example.com:10000/

to see the Cloudmin user interface.

User: root
Password: server's root password

Now is the time to disallow port 22 and access SSH terminal from control panel interface


7) Enabling Routing

 7.a) Go to Control Panel > Networking > Network Configuration > Routing and Gateways
 7.b) Change the Act as router? option to Yes, and click Save
 7.c) Click the Apply Configuration button

8) Enabling NAT

 8.a) Go to Control Panel > Networking > Linux Firewall
 8.b) Click "RESET FIREWALL"
 8.c) Select the radio button "Do network address translation on external interface: eth0"
   (make sure the external interface selection is eth0)
 8.d) Click "Setup Firewall"

Activate/Apply firewall configuration if not already activated, also make sure the "Activate at boot = yes" is also applied.

After that, you also have to setup one to one destination NAT.

9) Bridged Networking in Cloudmin 

 9.a) Go to Control Panel > Host Systems -> KVM Host Settings
 9.b) In the "Base directory for virtual systems" field enter: /home/kvm
 9.c) In the IP address allocation ranges section, enter or select the IP range for your bridged network. In the Bridge column, select br0
 9.d) If you see IP addresses static field, enter start address as the bridge network's 2nd IP (e.g. 10.1.1.2)
 9.e) Enter the IP address that was assigned to br0 as the default gateway (e.g. 10.1.1.1)
 9.f) If you see the Bridges on host system for KVM interfaces field, select br0
 9.g) Click the Save button

10)

Post a Comment