×


Failed to start migrated KVM VPS in SolusVM - What to do?

Are you trying to start migrated KVM VPS in SolusVM ? We can help you.

Sometimes, we encounter an error when the iso mounted to VPS on the source server does not exist on the destination server.

Here at Ibmi Media, we regularly help our Customers to perform related SolusVM queries.

In this context, we shall look into how to migrate KVM VPS from one node to another and how we can fix it in case we fail.


How to Manually migrate KVM VPS from one node to another ?

In order to manually migrate KVM VPS, we follow the steps below:

1. Initially, we stop the VPS we require in SolusVM > Virtual Servers > VPS > Shutdown. Here, we need to note the VMID of VPS.

2. Then we connect to the source slave node over SSH.

3. We find a logical volume of the VPS:

# lvdisplay | grep "LV Path" | grep "kvm101"
LV Path /dev/yourvg/kvm101_img

4. Then we create a copy of the logical volume:

# dd if=/dev/yourvg/kvm101_img | gzip | dd of=/home/kvm101_backup.gz bs=4096

5. 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/

6. Connect to the target server over SSH.

7. We create a logical volume with the same size and name:

# lvcreate -n kvm101_img --size 10G /dev/yourvg

8. 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

9. Connect to the Master node over SSH.

10. 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

11. Then we reboot VPS via SolusVM > Virtual Server > migrated VPS > Reboot for changes to work effectively.

12. 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/


What to do when migrated KVM VPS in SolusVM Failed to start ?

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.

To fix this error, do the following:

  • Initially, we log in to the SolusVM admin panel.
  • Then we open SolusVM > Virtual Servers > VPS.
  • In the Settings section we click Unmount at CD Rom.



[Stuck with KVM migration error? We'd be happy to assist. ]


Conclusion

This article covers how to migrate and fix KVM failed to start error in SolusVM. In fact, this error happens when the iso mounted to VPS on the source server does not exist on the destination server.