Increase disk size of a VM on ZFS

Miguel

Member
Nov 27, 2017
44
0
11
47
I have searched around and I couldn´t find any instructions of how to increase a VM disk when using ZFS on proxmox 5.1.

This is my zpool:

zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 232G 36.9G 104K /rpool
rpool/ROOT 1.86G 36.9G 96K /rpool/ROOT
rpool/ROOT/pve-1 1.86G 36.9G 1.86G /
rpool/data 226G 36.9G 96K /rpool/data
rpool/data/vm-100-disk-1 135G 36.9G 116G -
rpool/data/vm-102-disk-1 27.6G 36.9G 20.0G -
rpool/data/vm-102-disk-2 63.0G 36.9G 41.2G -
rpool/swap 4.25G 37.9G 3.26G -

I want to increase vm-100-disk-1.

How do I proceed? Shut down VM and run:

qm resize 100 virtio0 +5G ?

I am not sure which driver I should use
 
You can do this easily in the GUI. Just go the VM's hardware, click on the disk in question and then there's a Resize disk button you can use. It's nice and simple and can be done with the VM online.

You just then have to resize the storage on the VM inside the OS obviously.
 
I ran into exactly the same issue, and wound up adding a new partition ,,, I selected resize disk, but could not determine how to resize the storage on the VM inside....I was also not sure if ext4 was OK to use on the new partition, given that the VM exisits w/in a zfs mirror ..

Talk about nuts and bolts !
 
I selected resize disk, but could not determine how to resize the storage on the VM inside....I was also not sure if ext4 was OK to use on the new partition, given that the VM exisits w/in a zfs mirro
Once the disk has been resized you need to first extend the partition within the VM and then the filesystem inside the partition. How to do that depends on which OS you are running within the VM.

Current Windows versions and Linux distributions like Ubuntu come with their GUI tools for that. On Linux gparted, often also called Partition Manager, is a nice GUI tool.

Ext4 as file system is fine within a VM.
 

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!