How to migrate VM which is larger SSD to smaller SSD.

bravo0916

Member
Jan 29, 2024
68
8
13
Hello team,

I would like to migrate one VM machine which disk size is around 200GB to smaller SSD disk size (like 60GB). Could you please adivise me some hints for this.

Thank you very much for your support!

Regards,
 
The safe ways is to create a new (smaller) VM and copy over only the data that your need (and fits). If you feel adventurous then search the forum for shrinking virtual disks, which depends on the OS inside the VM, filesystem type inside the VM, Proxmox storage type and comes with lots of caveats (which is why it is not supported by Proxmox).
 
Last edited:
Hi leesteken,

Thanks for your quick feedback. Here is the steps. I have question about number 2 step. What kinds of files should I copy?
Is there any an instruction document or something like this? if you know, I apprecaite if you can share the link.

1. Create new VM box with 60GB disk size.
2. Copy over original VM machine's data.
 
What kinds of files should I copy?
Whatever you need the new one to have. As leesteken tried to explain, the answer is going to be drastically different for different situations. For example, if this disk contains a windows installation, just copying the files won't cut it, you need special handling to make all the junctions and hidden files and everything work. If this is just the data disk on a sane OS, then just doing a plain copy of all the files would probably be fine. You haven't told us anything we would need to know to answer this for you. Maybe clonezilla would work for you, we just don't know.

What you probably need to do is stop thinking about this as shrinking a Proxmox VM, and start thinking about it from an inside-the-VM perspective. You are cloning one machine to another that has a smaller disk, and then need to work and google from that perspective. It doesn't matter at that point that it is a proxmox VM, the steps would be about the same if it was hardware or VMware VM or whatever.
 
Whatever you need the new one to have. As leesteken tried to explain, the answer is going to be drastically different for different situations. For example, if this disk contains a windows installation, just copying the files won't cut it, you need special handling to make all the junctions and hidden files and everything work. If this is just the data disk on a sane OS, then just doing a plain copy of all the files would probably be fine. You haven't told us anything we would need to know to answer this for you. Maybe clonezilla would work for you, we just don't know.

What you probably need to do is stop thinking about this as shrinking a Proxmox VM, and start thinking about it from an inside-the-VM perspective. You are cloning one machine to another that has a smaller disk, and then need to work and google from that perspective. It doesn't matter at that point that it is a proxmox VM, the steps would be about the same if it was hardware or VMware VM or whatever.
That make sense :). I am trying to ask to Claude now. Yes, there are many options to do this.
Thanks for your advise anyway!