October 19, 20223 yr Hello all, Apologies if this is in the wrong place, but I'm after moving my single Windows VM from my dedicated "unassigned Sabrent NVME" to my main array. My VM Primary vdisk location with the VM template is; /dev/disk/by-id/nvme-Sabrent_Rocket_Q_7FD407090DDA92030729 Looking in this location with MC shows five files; My unassigned drive shows the below under the main unraid tab; Can anyone please advise how I can make the move. I use the VM for 30 minutes each month and so the speed decrease will not matter, but I want to ensure the transfer goes smoothly and nothing is lost. Many thanks.
October 19, 20223 yr Community Expert 3 hours ago, BeardedNoir said: Hello all, Apologies if this is in the wrong place, but I'm after moving my single Windows VM from my dedicated "unassigned Sabrent NVME" to my main array. My VM Primary vdisk location with the VM template is; /dev/disk/by-id/nvme-Sabrent_Rocket_Q_7FD407090DDA92030729 Looking in this location with MC shows five files; My unassigned drive shows the below under the main unraid tab; Can anyone please advise how I can make the move. I use the VM for 30 minutes each month and so the speed decrease will not matter, but I want to ensure the transfer goes smoothly and nothing is lost. Many thanks. I think you will need to use a tool to covert the physical drive to an image. @ghost82would you have any tool you could recommend?
October 19, 20223 yr Author 20 minutes ago, SimonF said: I think you will need to use a tool to covert the physical drive to an image. @ghost82would you have any tool you could recommend? Would something like this work in my circumstances? https://forums.unraid.net/topic/108711-how-to-turn-a-physical-windows-10-install-into-a-win10-vm-on-unraid/#comment-995942
October 19, 20223 yr Yes qemu-img is fine. You might want to save as qcow2 instead of raw in addition to using the -S to make the image smaller, otherwise the image file will take the size of the original disk.
October 19, 20223 yr Author 4 minutes ago, Kilrah said: Yes qemu-img is fine. You might want to save as qcow2 instead of raw in addition to using the -S to make the image smaller, otherwise the image file will take the size of the original disk. Thank you and for everyone else's help with this. Apologies, I'm not familiar with these commands or qcow2, would a command of something like this then work or should it be amended to utilise qcow2; qemu-img convert -p -S 512 /dev/disk/by-id/nvme-Sabrent_Rocket_Q_7FD407090DDA92030729 -O raw /mnt/user/domains/win11/win11image.img Edited October 19, 20223 yr by BeardedNoir
October 19, 20223 yr 5 hours ago, BeardedNoir said: Looking in this location with MC shows five files that are not really files; the name without -partX is the whole disk, other names with -partX suffix are single partitions. You need to clone the whole disk, not sure if the command will works with the by-id for the source (it should work in my opinion), if it doesn't clone the disk just find the sdX name of that disk and follow that post you linked. Command dd is fine too to clone disks to img, if you search google you will find examples, just use path/to/vdisk.img as the target (most examples use /dev/sdX as a target, to clone and restore files on a physical disk, but img as target will be fine). Make sure the target disk have enough space, larger than the physical disk you are cloning. The advice to sparsify the image is good too, so the image size will be that of the sizes of all the files, and make sure to enable trim in the vm for the vdisk.
October 21, 20223 yr Author Right, so I pushed ahead and ran; qemu-img convert -p -S 512 /dev/disk/by-id/nvme-Sabrent_Rocket_Q_7FD407090DDA92030729 -O qcow2 /mnt/user/domains/win11/vdisk.img Which produced a 500gb image which is about right for the size of the VM, however when I ran it, the VM would say it was running, display the attached log information, but I could not connect and the assigned IP was not taken. I then deleted the image and ran; qemu-img convert -p -S 512 /dev/disk/by-id/nvme-Sabrent_Rocket_Q_7FD407090DDA92030729 -O raw /mnt/user/domains/win11/vdisk.img This produced a 2tb image however the same issue happened when I ran it. I have only ever had this one VM, and it was setup with the unassigned nvme. Do I need to do anything in the VM template other than changing the image location?
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.