best way to transfer windows 10 vm from one old unraid server to a new unraid server


neow

Recommended Posts

hello

 

i want to transfer some windows 10 vm from one old unraid server to a new unraid server (new hardware + new licence unraid)

 

can you explain me the best way to do it ? i don't want to reactivate each win 10 vm too

 

thanks in advance

 

 

Link to comment

Hey @neow, I don't know if this is the best way, but here's one safe way that migrates everything including the nvram. I don't know how comfortable you are with terminal so I've minimised the need for that as much as possible:

 

  1. You need the array started on your old server, but make sure the VM isn't running
  2. Open the Unraid WebUI from your computer > click VMs > Check the VM's config to see where the vdisks are located, most likely it's in /mnt/user/domains/Windows 10 if you've called the VM Windows 10 on your server.
  3. While you're in here, Change from 1332257233_ScreenShot2021-03-29at10_08_14pm.png.74ec33405e9a5f095963c0b76d60e33b.png(Form View) to 306111254_ScreenShot2021-03-29at10_08_54pm.png.7458bfdf67e6f2ac0a4937b0b5052133.png(XML View) and find the contents of the nvram tag, eg.
        <nvram>/etc/libvirt/qemu/nvram/91801fae-a4eb-a604-0b6f-906d2b7e90f8_VARS-pure-efi.fd</nvram>

    Copy the contents of the tag:
     

    /etc/libvirt/qemu/nvram/91801fae-a4eb-a604-0b6f-906d2b7e90f8_VARS-pure-efi.fd
    
  4. Go back to the Unraid WebUI from your computer > open Terminal > Run:
    cp /etc/libvirt/qemu/nvram/91801fae-a4eb-a604-0b6f-906d2b7e90f8_VARS-pure-efi.fd /mnt/users/domains/Windows 10/

    Where 91801fae-a4eb-a604-0b6f-906d2b7e90f8_VARS-pure-efi.fd is the name of the file you got from step 3, and Windows 10 is the location of your vdisks from step 1

  5. Go back to the Unraid WebUI from your computer > click Shares > click the little 62464166_ScreenShot2021-03-29at10_02_56pm.png.ffa2ba2fe3ed167a5fb8606c887375e5.png symbol next to the domains share under the View heading to browse the contents.
  6. Navigate to the folder where your vdisk is stored, probably Windows 10
  7. Download the vdisk, probably vdisk1.img, and the .fd file we put there in step 4 to somewhere on your computer
  8. Transfer these files to the same location on your new server (/mnt/user/domains/Windows 10) however you want to, easiest via SMB or ssh/scp
  9. Go back to the old server's Unraid WebUI from your computer > click VMs > Edit your VM > Uncheck / remove any passed devices or USBs and change any primary GPUs to VNC and remove any secondary GPUs
  10. Change to XML View again and copy the entire contents to your clipboard
  11. Go to the new server's Unraid WebUI from your computer > click VMs > Add a VM
  12. Repeat the same as step 8, but this time paste the entire contents
  13. Double check there are no hostdev tags, if there are, delete them because your other server is very unlikely to be using the same device IDs / PCI addresses.

    Eg.
    670066374_ScreenShot2021-03-29at10_12_55pm.thumb.png.06572183e7060dc26564096e966c6ab3.png
    Would become:
    427148492_ScreenShot2021-03-29at10_19_40pm.png.18e910fedf39c58f5051c23ba713dabd.png
  14. Change back to Form View and make sure everything looks fine, then try saving it but uncheck the box to start the VM
  15. Open Terminal from the Unraid WebUI on your new server and run the reverse of the command in step 4, eg.
    cp /mnt/users/domains/Windows 10/91801fae-a4eb-a604-0b6f-906d2b7e90f8_VARS-pure-efi.fd /etc/libvirt/qemu/nvram/ 

    Where Windows 10 is the name of your VM and 91801fae-a4eb-a604-0b6f-906d2b7e90f8_VARS-pure-efi.fd is the name of your NVRAM file from step 3.

  16. Start the VM, everything should be ready. If you get errors, you probably didn't remove all devices in XML view / step 13

 

Hope this helps.

 

Screen Shot 2021-03-29 at 10.08.41 pm.png

EDIT: ^^^^ I Keep removing this random XML view icon but it keeps coming back 😂

Edited by lnxd
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.