Create Container Storage Device from Command Line

Oct 4, 2017
8
0
6
39
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