Failed to start migrated KVM VPS in SolusVM? We can help you.
We often come across this error when the iso mounted to VPS on the source server does not exist on the destination server.
As part of our Server Management Services, we assist our customers with several SolusVM queries.
Today, let us see how to migrate KVM VPS from one node to another and how we can fix it in case we fail.
Manually migrate KVM VPS from one node to another
In order to manually migrate KVM VPS, we follow the steps below:
- Initially, we stop the VPS we require in SolusVM > Virtual Servers > VPS > Shutdown. Here, we need to note the VMID of VPS.
- Then we connect to the source slave node over SSH.
- We find a logical volume of the VPS:
# lvdisplay | grep "LV Path" | grep "kvm101" LV Path /dev/yourvg/kvm101_img
- Then we create a copy of the logical volume:
# dd if=/dev/yourvg/kvm101_img | gzip | dd of=/home/kvm101_backup.gz bs=4096
- Eventually, we transfer the copy to the target slave node using the following command on the source node:
# scp -C /home/kvm101_backup.gz root@targetserverip:/home/
- Connect to the target server over SSH.
- We create a logical volume with the same size and name:
# lvcreate -n kvm101_img --size 10G /dev/yourvg
- Here, we restore the copy to the created logical volume:
# dd if=/home/kvm101_backup.gz | gzip -d | dd of=/dev/yourvg/kvm101_img bs=4096
- Connect to the Master node over SSH
- Later, we update the Master node database with the new location of the VPS
# /scripts/vm-migrate ID NEWNODEID
Here, the ID is of the migrated VPS; NEWNODEID is the ID of the target node.
For example:# /scripts/vm- migrate 20 5
- Then we reboot VPS via SolusVM > Virtual Server > migrated VPS > Reboot for changes to work effectively.
- Once we verify the correct work of VPS, we remove logical volume and the VPS directory on the source server:
# lvremove /dev/yourvg/kvm101_img # rm -rf /home/kvm/kvm101/
Failed to start migrated KVM VPS in SolusVM
We may come across this error while rebooting the VPS in debug mode at SolusVM > Virtual Servers > VPS > Reboot:
Domain kvm135 has been undefined Domain kvm135 defined from /home/kvm/kvm135/kvm135.xml Domain kvm135 marked as autostarted error: Failed to create domain from /home/kvm/kvm135/kvm135.xml error: Cannot access storage file ‘/home/solusvm/kvm/iso/debian-9.8.0-amd64-netinst.iso’: No such file or directory
Here, we can see that the ISO attach to VPS on the source server.
When the iso mounted to VPS on the source server does not exist on the destination server, it causes the error.
In order to fix this, our Support Techs suggest these steps:
- Initially, we log in to the SolusVM admin panel
- Then we open SolusVM > Virtual Servers > VPS
- In the Settings section we Unmount at CD Rom setting:
[Stuck with the migration or error? We’d be happy to assist]
Conclusion
In short, we saw how our Support Techs migrate and fix a possible error.
0 Comments