Hello,
I have the VM ID 123 with two disks and backed up, and VM 456 with one disk, and I'd like restore one disk of VM 123 (in effect, I want a copy of that disk) as the second disk of VM 456.
How I can do this using the existing backup?
One option would be to restore that VM 123 using another VMID like 1000. Then, depending on the storage that is used, rename the virtual disk according to naming scheme. So for example from vm-1000-disk-1 to vm-456-disk-1. Then do a qm rescan and destroy VM 1000. The disk should now appear as an unattached disk in the VM 456 hardware tab where you could edit it to attach it.
It can be done, I just guess that restoring 2TB of VM to get 200GB disk is a bit overkill.
If I create a new disk on 123, clone (cp) the disk from inside 123, then detach and rename it, this can do the trick?
Done!
The target machine was in another node so the procedure to add to 456 (in node X) a clone of disk A of 123 (in node Y) have some extra steps:
1) add a new disk B in 123 and clone A to B inside the vm (with any tool/means you prefer)
2) create a dummy VM 789 in same node of 123
3) change owner of B to 789
4) start 789 and do live migration of 789 to node X (if datastores are different, or else you can migrate with 789 powered off)
5) power off 789
6) change owner of B to 456
7) remove 789
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.