1. pct is Tool to manage Linux Containers (LXC) on Proxmox VE
USAGE: pct <COMMAND> [ARGS] [OPTIONS]
pct clone <vmid> <newid> [OPTIONS]
pct create <vmid> <ostemplate> [OPTIONS]
pct destroy <vmid> [OPTIONS]
pct list
pct migrate <vmid> <target> [OPTIONS]
pct move-volume <vmid> <volume> [<storage>] [<target-vmid>] [<target-volume>]
pct pending <vmid>
pct resize <vmid> <disk> <size> [OPTIONS]
pct restore <vmid> <ostemplate> [OPTIONS]
pct template <vmid>
pct config <vmid> [OPTIONS]
pct set <vmid> [OPTIONS]
pct delsnapshot <vmid> <snapname> [OPTIONS]
pct listsnapshot <vmid>
pct rollback <vmid> <snapname>
pct snapshot <vmid> <snapname> [OPTIONS]
pct reboot <vmid> [OPTIONS]
pct resume <vmid>
pct shutdown <vmid> [OPTIONS]
pct start <vmid> [OPTIONS]
pct stop <vmid> [OPTIONS]
pct suspend <vmid>
pct console <vmid> [OPTIONS]
pct cpusets
pct df <vmid>
pct enter <vmid>
pct exec <vmid> [<extra-args>]
pct fsck <vmid> [OPTIONS]
pct fstrim <vmid> [OPTIONS]
pct mount <vmid>
pct pull <vmid> <path> <destination> [OPTIONS]
pct push <vmid> <file> <destination> [OPTIONS]
pct rescan [OPTIONS]
pct status <vmid> [OPTIONS]
pct unlock <vmid>
pct unmount <vmid>
pct help [<extra-args>] [OPTIONS]
pct clone <vmid> <newid> [OPTIONS]
pct create <vmid> <ostemplate> [OPTIONS]
pct destroy <vmid> [OPTIONS]
pct list
pct migrate <vmid> <target> [OPTIONS]
pct move-volume <vmid> <volume> [<storage>] [<target-vmid>] [<target-volume>]
pct pending <vmid>
pct resize <vmid> <disk> <size> [OPTIONS]
pct restore <vmid> <ostemplate> [OPTIONS]
pct template <vmid>
pct config <vmid> [OPTIONS]
pct set <vmid> [OPTIONS]
pct delsnapshot <vmid> <snapname> [OPTIONS]
pct listsnapshot <vmid>
pct rollback <vmid> <snapname>
pct snapshot <vmid> <snapname> [OPTIONS]
pct reboot <vmid> [OPTIONS]
pct resume <vmid>
pct shutdown <vmid> [OPTIONS]
pct start <vmid> [OPTIONS]
pct stop <vmid> [OPTIONS]
pct suspend <vmid>
pct console <vmid> [OPTIONS]
pct cpusets
pct df <vmid>
pct enter <vmid>
pct exec <vmid> [<extra-args>]
pct fsck <vmid> [OPTIONS]
pct fstrim <vmid> [OPTIONS]
pct mount <vmid>
pct pull <vmid> <path> <destination> [OPTIONS]
pct push <vmid> <file> <destination> [OPTIONS]
pct rescan [OPTIONS]
pct status <vmid> [OPTIONS]
pct unlock <vmid>
pct unmount <vmid>
pct help [<extra-args>] [OPTIONS]
2. put a file to lxc
pct push 100 gitea-1.15.9-linux-amd64 /opt/gitea/gitea
3. Enter to lxc
pct enter 100
4. Look current lxc
root@pve:~/src# pct list
VMID Status Lock Name
100 running myalpine
VMID Status Lock Name
100 running myalpine
5. Mount file gui
https://pve.proxmox.com/wiki/Linux_Container#pct_mount_points
http://www.gienginali.idv.tw/modules/tad_book3/page.php?tbdsn=505
https://pve.proxmox.com/wiki/Linux_Container#pct_mount_points
6. alpine rc
https://docs.alpinelinux.org/user-handbook/0.1a/Working/openrc.html
7. Mount file by command ref
root@pve:~# cat /etc/pve/lxc//100.conf
arch: amd64
cores: 2
features: nesting=1
hostname: myalpine
memory: 512
mp0: /mnt/pve/sdbc_data/machine/100myalpine,mp=/mnt/data
net0: name=eth0,bridge=vmbr0,firewall=1,gw=10.0.255.254,hwaddr=E6:E1:B8:81:DC:BA,ip=10.0.3.1/16,type=veth
ostype: alpine
rootfs: local-lvm:vm-100-disk-0,size=2G
swap: 512
# use privilege that can read wirte disck
unprivileged: 0
沒有留言:
張貼留言