[PVE-User] couple of questions for new lxc containers

Emmanuel Kasper e.kasper at proxmox.com
Thu Oct 22 14:45:29 CEST 2015

On 10/21/2015 06:43 PM, hackru wrote:
> Hello
> I have a couple of questions
> i create containers like this:
> pct create $id /var/lib/vz/template/cache/$template \
>   -net0 name=eth0,bridge=$bridge,ip=$ip,gw=$gw \
>   -cpulimit $cpus \
>   -memory $mem \
>   -storage rbd \
>   -mp0 "rbd:$storagesize,mp=/storage" \
>   -onboot 1 \
>   -password $password \
>   -hostname $hostname \
>   -description $description

As you've probably glanced from the man page, extra container mount
points are still an experimental feature, so not everything we want has
been implemented yet.

1) how it's possible to set rootfs size?
Yes, should be possible, try something like

 pct create 101 -rootfs freenas:1

where freenas is the id your storage and '1' is the size of the
diskimage in GB

> 2) is it possible to have rootfs on mpX?
In that case you don't need a mountpoint, just specify your target
storage for the root filesystem as shown in the command abobe

3) can i have custom MP names? I don't like vm-ID-disk-N, i want to have
vm-ID-disk-root, disk-storage, disk-var for easier management from cli.
No(t yet)
> 4) will i have some problems when i use mpX in containers? like problems when back up or restore?
The content of a mount point which points to a block device will be
included in a vzdump backup, except if this block device is passed
directly to the container
( ie  -mp0 "rbd:$storagesize,mp=/storage" should be included in the
vzdump backup)

After a quick look at the code, I don't think restore of mount points
are included in pct restore at the momment

> 5) how can i replace pct with pvesh so i can run my commands on any cluster node? i tried but no success, mpN option not working for me.
as said, mount points can refer directly to block devices, like
/dev/sdb1, maybe this was the reason it was not implemented in the API
and just locally via command line (just guessing here)

> 6) ostype option is not implemented, will it be?
I've just seen the "implement me" message.
But since the ostype is infered from the template you use, why do you
need to set it ? Are you using custom templates ?

More information about the pve-user mailing list