Proxmox: различия между версиями

Материал из support.qbpro.ru
Строка 19: Строка 19:
     -storage '''local''' -password '''mypassword'''
     -storage '''local''' -password '''mypassword'''
* [https://wiki.autosys.tk/proxmox/import_containers_from_lxc_host_to_proxmox источник]
* [https://wiki.autosys.tk/proxmox/import_containers_from_lxc_host_to_proxmox источник]
<hr>
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.
==Дополнительно==
==Дополнительно==
* [[Как включить вложенную виртуализацию KVM]]
* [[Как включить вложенную виртуализацию KVM]]

Версия от 02:21, 22 августа 2023

Установка 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.

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