Moving VM from one server to another


mikeydk

Recommended Posts

I got a VM running on unraid 6.7.0-rc2, and I am trying to move it to another server, also running 6.7.0-rc2.

 

After a lot of searching, I have found different answers on how to do it, but I can't get any of them to work.

 

Some say to just create a VM on the new server, then replace the img file with the one from the old server. Others say to just take all the XML from one server and use it to make a new VM on the new server... But none of them work.

 

When I take all the XML, it gives me an error about missing some OVMF. And if I modify it to use the same OVMF path as on the new server, I just end in Shell> without booting the VM. If I change the bios over to SeaBIOS, it just stalls at "Booting from harddrive...".

 

What should I do to do it correct? And can it be done? (I hope it can, one of the things running in that vm is a pain in the butt to set up and get working properly)

Link to comment

Copy the img file from server a to server b. On server b, create a new vm and put your settings as whatever. If the img was ovmf, use that (same as seabio). When you get to the part about hard drive/img, switch to manual and specify the location of the img you copied over. Finish setting anything else. Then start.

 

thsts it. I do it all the time.

 

note: if you drop into the shell, type exit (iirc) which will bring you tj the boot/bios menu. Specify the img file to boot from and then you’ll be on your way.

  • Like 1
Link to comment
28 minutes ago, 1812 said:

Copy the img file from server a to server b. On server b, create a new vm and put your settings as whatever. If the img was ovmf, use that (same as seabio). When you get to the part about hard drive/img, switch to manual and specify the location of the img you copied over. Finish setting anything else. Then start.

 

thsts it. I do it all the time.

 

note: if you drop into the shell, type exit (iirc) which will bring you tj the boot/bios menu. Specify the img file to boot from and then you’ll be on your way.

 

If you do that with a Windows VM does Windows complain about its licence key being in use on another machine and need you to re-register?

 

Link to comment
5 hours ago, 1812 said:

Specify the img file to boot from and then you’ll be on your way.

Got it working now, but that was actually not an easy thing to do.

 

I found a place under maintenance, and from there I could select the file, but it only said new file and new folder. At the bottom there is an EFI option, select that, then go into the folders it finds, and select the image. When you select it, it boots the VM right away, but on next boot it isn't finding it again.

 

To get it to auto boot, you need to find the menu for adding a boot option, then do the same with EFI again, and find the image, give the boot option a name, and then go back and change the boot order, and move the image up to the top. Commit and exit.

Link to comment
10 hours ago, John_M said:

 

If you do that with a Windows VM does Windows complain about its licence key being in use on another machine and need you to re-register?

 

That’s a good question. If it does, you could always go back and copy the nvram from the old server to the new one, and make sure the uuid matches the original. Then it would essentially be the the same I believe, alleviating the problem.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.