Restore KVM with different HDD Size

x86fantini

Member
Aug 24, 2013
33
0
6
Hello, i was looking at https://pve.proxmox.com/wiki/Backup_and_Restore and also https://pve.proxmox.com/wiki/Command_line_tools.

I have a Proxmox 4.3, and 1 KVM VM (id 100). "local" total size si 200GB and VM with id 100 is using 120gb.

I would like to create a new VM, id 101, starting from the last snapshot of VM id 100, but with rootfs of 60GB.

how can i achive this? i was also lookting at "Clone" but can not find anywhere how to custom select rootfs.

thank you
S
 
You cannot do such a thing, because resizing the rootfs requires knowledge of the filesystem running inside the VM. Proxmox itself cannot know if you're running Ext4, NTFS, FAT, etc ... inside the VM.
You can try to manually resize the filesystem inside the VM and then manually decrease the disk size, but caveat, you have to know what you're doing. If the amount of setup inside the VM is not big, I would simply advise to reinstall.
 
ok understood.
i will try with clonezilla, usually it works.

p.s. i have understood that qcow2 files are thin provided, so a 120GB disk in my VM conf, should not be a 120gb file in var/lib/vz if my VM is only 20gb full...but currently my file is 120gb even if "df -hT" shows 20gb..

thank you
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!