The Master SolusVM server on the KVM slave node. Is it possible?
CompletedYes, it is possible. But the recommended way is to have a dedicated server for this, always create a backup of SolusVM database and store it on the external server. It helps to avoid "all eggs in one basket" scenario. Otherwise, you are going to have a quite busy time when KVM node is down for some reason or even crashed without option to restore.
If you are still want to have it, the steps are below:
- Prepare a CentOS 6/7 server with a partitioning as described in the documentation
In this example the volume group name where VPS will be created issolusvm
- Install SolusVM KVM Slave without UI as per this article and configure bridge interface
- Download CentOS 6 or 7 template from TDN storage to /home/solusvm/kvm/template/ directory.
- Create a logical volume
mastersolusvm_img
for the SolusVM Master server:# lvcreate -n mastersolusvm_img -L 20G solusvm
-
This partition will store the Master server data.
Note: Partition size can be increased if necessary, just replace its value in command line above with required
- Resize the image using a CentOS TDN template downloaded on the Step 3:
# virt-resize -d --expand /dev/sda1 /home/solusvm/kvm/template/linux-centos-7-x86_64-minimal-latest.gz /dev/solusvm/mastersolusvm_img
- Create an .XML configuration file that will be used to create VPS. The example of such file is below.
Note that is is required to generate unique UUID and unicast MAC address (on-line generators can be very useful: UUID, MAC):CONFIG_TEXT: <domain type='kvm'>
<name>mastersolusvm</name>
<uuid>329b95b0-0cb9-47d1-88b4-fc11debe70c9</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<memtune>
<hard_limit>1099776</hard_limit>
</memtune>
<vcpu>1</vcpu>
<cpu>
</cpu>
<os>
<type machine='pc'>hvm</type>
<boot dev='hd'/>
<boot dev='cdrom'/>
</os>
<clock sync='localtime'/>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<graphics type='vnc' port='5999' passwd='p5fY9q7d' listen='0.0.0.0'/>
<disk type='file' device='disk'>
<source file='/dev/solusvm/mastersolusvm_img'/>
<target dev='hda' bus='virtio'/>
</disk>
<disk type='file' device='cdrom'>
<target dev='hdc'/>
<readonly/>
</disk>
<interface type='bridge'>
<model type='virtio' />
<source bridge='br0'/>
<target dev='mastersolusvm.0'/>
<mac address='00:16:3c:c5:76:c6'/>
</interface>
<input type='tablet'/>
<input type='mouse'/>
</devices>
<features>
<acpi/>
<apic/>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
</domain>Memory and other parameters can be customized if necessary.
After that put the mastersolusvm.xml file in /home/kvm/mastersolusvm/ directory - Define the domain mastersolusvm and add it to autostart:
# virsh define /home/kvm/mastersolusvm/mastersolusvm.xml
# virsh autostart mastersolusvm - Start the VPS:
# virsh start mastersolusvm
- Check that VPS is running:
# virsh list --all
- Connect to the VPS via VNC console that is running on port 5999 and configure networking on the server. The example of the network interface configuration file is below:
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
DEVICE=eth0
ONBOOT=yes
IPV6_PRIVACY=no
IPADDR=203.0.113.2
GATEWAY=203.0.1.1
NETMASK=255.255.0.0 - After that connect to the VPS via SSH and install Master SolusVM UI.
Feel free to add your opinion, suggestions or corrections as a comment
Please sign in to leave a comment.
Comments
0 comments