Proxmox

Материал из support.qbpro.ru

Установка Proxmox в Debian

Перенос контейнера LXC на Proxmox

  • пакуем на исходном хосте:
cd /var/lib/lxc/mylxc/rootfs
tar -czvf /home/user/mylxc.tar.gz ./
  • переносим архив на Proxmox и разворачиваем там:
pct create 110 /home/user/mylxc.tar.gz \
   -description mylxc -hostname newmylxc -memory 1024 -nameserver 8.8.8.8 \
   -net0 name=eth0,hwaddr=52:4A:5E:26:58:D8,ip=192.168.15.147/24,gw=192.168.15.1,bridge=vmbr0 \
   -storage local -password mypassword

TIL: Proxmox "pct create" -rootfs parameter and disk size.

Got confused by that -rootfs parameter of proxmox when creating a new container with "pct create", so documenting it here.
-rootfs local:2

translates into (when creating container with id 1062, /etc/pve/lxc/1062.conf):

rootfs: local:1062/vm-1062-disk-0.raw,size=2G

so local:2 then stands for the "local" volume and 2GB as a disk size.

Using size=2G sub-parameter led to the size of 1062G, interestingly. Not sure if this is a bug in proxmox (v7.0) or what.

Дополнительно