[SOLVED] pct create --rootfs parameter syntax

joshy

New Member
Aug 10, 2022
3
0
1
Hi Forum,

I am trying to learn how to create containers via the PCT command. However, Ive hit a issue with not understanding the syntax of the --rootfs parameter.

What is the syntax of the the rootfs? From PCT man page

--rootfs [volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]

Since volume is required, how can I find out what are valid values on my environment for volume? I have local and local-lvm but neither are accepted.

Now I manage to find example that creates a 4G disk on local-lvm
pct create 401 local:vztmpl/debian-11-standard_11.3-1_amd64.tar.zst --rootfs local-lvm:4

But how does local-lvm:4 map back to the man page options? Using --rootfs man page syntax for the pct create command what is the equivalent syntax?

Is there a log file where I can see the command that the UI generates using the command line syntax?
 
hi,

But how does local-lvm:4 map back to the man page options? Using --rootfs man page syntax for the pct create command what is the equivalent syntax?
in the manpage it's detailed under --mp[n]:
Code:
Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.

this works the same way for rootfs.

Is there a log file where I can see the command that the UI generates using the command line syntax?
the UI does not always generate a command, since the parameters go to the API (in fact pct etc. tools also utilize the API calls)