Create Container Storage Device from Command Line

Oct 4, 2017
8
0
6
38
What is the proper way to create storage devices for containers from the command line?
I did not find enough info in the wiki command line tools talking about this.

Example,
I wish to create a container from the command line and seems I need to create the storage device first:

Code:
pct create 103 local:vztmpl/debian-8.0-standard_8.7-1_amd64.tar.gz -rootfs local-lvm:vm-103-disk-1,size=40G
mount: special device /dev/pve/vm-103-disk-1 does not exist
mounting container failed
command 'mount /dev/pve/vm-103-disk-1 /var/lib/lxc/103/rootfs//' failed: exit code 32

Best regards.
 
just use "STORAGEID:SIZEINGB" (replace both accordingly), and PVE will allocate a volume of the given size and reference it in the resulting config. you can also manually allocate a volume with "pvesm", and then reference it.
 
  • Like
Reactions: Ramael Metatron

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!