LXC create how ?

maxicom

Active Member
May 22, 2017
9
0
41
58
Hi please give me example create lxc container in terminal
I do not know what should im use pvesh create ? or ?
 
yes but not understand
witch method
pct create 999 local:vztmpl/debian-8.0-standard_8.0-1_amd64.tar.gz

or

pvesh create /nodes/proxlan/lxc -vmid=302 -ostemplate=/var/lib/vz/template/cache/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz -storage=local -rootfs=local,size=4G
 
'pvesh' is a tool which exposes the whole REST API while 'pct' is a wrapper around the low-level LXC tools.
 
ok I want to use api, in this case pvesh
but in example im only see old openvz

pvesh create /nodes/{node}/openvz -vmid 100 -hostname test -storage local \
-password supersecret \
-ostemplate local:vztmpl/ubuntu-10.04-standard_10.04-4_i386.tar.gz \
-memory 512 -swap 512 -disk 4 -cpus 1 \
-ip_address 1.2.3.4
 
the example is outdated apparently. i'll try to update it today.

try like this though:

Code:
pvesh create /nodes/{node}/lxc -vmid 10001 -hostname test -storage local \
                                  -password supersecret \
                                  -ostemplate local:vztmpl/archlinux-base_20180906-1_amd64.tar.gz  \  
                                  -memory 512 -swap 512
 

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!