Recover Master server after disaster
CompletedSometimes bad things happen, this is the way of life. For example, you can find that you lost Master server and there are no backups of the SolusVM database or entire server.
SolusVM provides a functionality that allows manual restoring of the information about the claster on the new clean installation of the Master server. It has Import Mode , when it is enabled it creates only objects in SolusVM database without actual creation of the virtual server.
The tricky part of the importing procedure is the information about the virtual server and how to collect it. This is the subject of this discussion.
NOTE: Before importing do not forget to create Plans, IP Blocks, Templates, and clients first
Here are the tips and tricks from our experience
For OpenVZ
All the information about the virtual server including its hostname is being stored in the container's configuration file.
CONFIG_TEXT: /vz/private/CTID/ve.conf - OpenVZ 7 node, where CTID should be replaced with the container's id
/etc/sysconfig/vz-scripts/CTID.conf - OpenVZ 6 node, where CTID should be replaced with the container's id
For KVM
First of all here is how to find VMID
Command will list the kvmID's on the slave server:
# virsh list --all
How to find IP Address
To get the IP address of the VM, review the /etc/dhcpd.conf file on the slave server and find the IP address of the VM which is associated to the kvmID of the VM.
Another option is finding the IP using MAC address.
1. Connect to the slave KVM node via SSH
2. Find MAC address of the virtual server:
# virsh dumpxml VPSID | grep "mac address" | awk -F\' '{ print $2}'
3. Execute the following command to find IPv4 address:
# nmap -sP 10.0.0.0/24 | grep -i "<MAC_address>" -B 3
10.0.0.0/24 should be replaced with an actual subnet that is used in the current infrastructure
How to find Memory and CPU information:
Run this command for each VM to get the memory and CPU information of the VM.
# virsh dumpxml kvm101 | grep "memory\|vcpu\|mac"
How to find Operating System
Run this command on the Node to find the OS details of the VM.
# virt-cat -d kvm101 /etc/centos-release
How to find Hostname
Run this command to get the VM Hostname detail.
# virt-cat -d kvm101 /etc/hostname
How to find Disk Space
The following command will list disk storage LVM for each virtual server
# lvs
For Xen
Part of the information like amount of memory, CPU can be found in /home/xen/vmID/vmID.cfg file
The disk size can be found using lvs command
Please sign in to leave a comment.
Comments
0 comments