Incorrect Size when import disk

marciglesias17

Active Member
Feb 12, 2020
44
0
26
25
Dark fiber
Hi,

I have a problem, I am trying to create an ubuntu template in Proxmox to be able to clone the template and create machines more quickly, but I have the following problem.

I download the official Ubuntu Cloud template, create the VM, import the disk and attach it:

wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
qm create 9000 --memory 2048 --net0 virtio, bridge = vmbr0
qm importdisk 9000 xenial-server-cloudimg-amd64-disk1.img local
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local: vm-9000-disk-1

Once loaded, the disk appears with the size 535424K, I have tried to change the config to 10G and then convert the VM into a template. I need this in GB for when I convert the machine, I can increase the disk more easily.

I hope your help.

Thanks,
 
tried to change the config to 10G
As in changing /etc/pve/qemu-server/9000.conf?

Try increasing the size of /var/lib/vz/images/9000/vm-9000-disk-1.raw and also the filesystem within.
 
As in changing /etc/pve/qemu-server/9000.conf?

Try increasing the size of /var/lib/vz/images/9000/vm-9000-disk-1.raw and also the filesystem within.
qemu-img: Could not open 'base-9000-disk-0.qcow2': Could not open 'base-9000-disk-0.qcow2': Operation not permitted

I can't resize disk.
 
What type of storage is your local? Directory?

I can't resize disk.
It should work before you covert it to a template.

Code:
root@pveA:~# qemu-img resize /var/lib/vz/images/9000/vm-9000-disk-0.raw +10G
WARNING: Image format was not specified for '/var/lib/vz/images/9000/vm-9000-disk-0.raw' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Image resized.
 

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!