Shrink vm disk proxmox 4.4

fernan.mont

Member
Jan 18, 2017
3
0
21
42
Hello,
I'm new using proxmox. I've been reading a lot of posts in this forum about this. But I can't still resolve my problem.

I have installed last version, proxmox 4.4 with the default configuration. I created a VM with a win 2012 R2 in local-lvm. This VM has a 1TB virtio disk. And I want to resize it to 30GB. I'm just testing things to learn how to do basic things in proxmox before I start creating VM in production.

As I have read:
- I hav shrink the volume in the windows guest. Now is 30GB and 969GB Unallocated.
- The VM has to be stopped. It is.
- The VM config is this:
Code:
root@TEST:/etc/pve/nodes/TEST# qm config 100
balloon: 8192
bootdisk: virtio1
cores: 4
ide0: local:iso/systemrescuecd-x86-4.9.1.iso,media=cdrom,size=500986K
ide2: none,media=cdrom
memory: 16384
name: TEST-2012R2
net0: virtio=3E:C7:16:D6:10:3B,bridge=vmbr0
numa: 0
ostype: win8
scsihw: virtio-scsi-pci
smbios1: uuid=f57dfa9f-a379-4e72-ba85-ebae7f6f1ef5
sockets: 2
virtio1: local-lvm:vm-100-disk-1,size=1000G
- The disk config:
Code:
root@TEST:/etc/pve/nodes/TEST# qemu-img info /dev/pve/vm-100-disk-1
image: /dev/pve/vm-100-disk-1
file format: raw
virtual size: 1.0T (1073741824000 bytes)
disk size: 0
- Then I run:
Code:
root@TEST:/etc/pve/nodes/TEST# qemu-img resize -f raw /dev/pve/vm-100-disk-1 -- -969G
Image resized.
- After that, the disk config is still the same:
Code:
root@TEST:/etc/pve/nodes/TEST# qemu-img info /dev/pve/vm-100-disk-1
image: /dev/pve/vm-100-disk-1
file format: raw
virtual size: 1.0T (1073741824000 bytes)
disk size: 0
- I change the disk size in /etc/pve/qemu-server/100.conf
Code:
balloon: 8192
bootdisk: virtio1
cores: 4
ide0: local:iso/systemrescuecd-x86-4.9.1.iso,media=cdrom,size=500986K
ide2: none,media=cdrom
memory: 16384
name: TEST-2012R2
net0: virtio=3E:C7:16:D6:10:3B,bridge=vmbr0
numa: 0
ostype: win8
scsihw: virtio-scsi-pci
smbios1: uuid=f57dfa9f-a379-4e72-ba85-ebae7f6f1ef5
sockets: 2
virtio1: local-lvm:vm-100-disk-1,size=30G

Nothing changes...

Anything wrong? I guess that I'm missing something (maybe some concept too) because of the new version. Why the disk file doesn't have the .raw extension? In /dev/pve/ are only links, where are stored the disks files in version 4.4, as I have read they are supposed to be in /var/lib/vz/images/ but this folder is empty.

Thanks in advanced!
 

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!