Talk:Proxmox Linux Container: Difference between revisions
imported>Vater |
imported>Vater No edit summary |
||
| Line 33: | Line 33: | ||
| download the NixOS template | | download the NixOS template | ||
| | | | ||
* (if you want to switch to the | * (if you want to switch to the <tt>Storage View</tt> and) go to one of your nodes where you can (find and) store <tt>CT Templates</tt> | ||
* choose the | * choose the <tt>Download from URL</tt> button | ||
** add the link for the NiixOS template file ''https://hydra.nixos.org/job/nixos/release-21.05/nixos.containerTarball.x86_64-linux/latest/download-by-type/file/system-tarball'' (to the text field of <tt>URL:</tt>) | ** add the link for the NiixOS template file ''https://hydra.nixos.org/job/nixos/release-21.05/nixos.containerTarball.x86_64-linux/latest/download-by-type/file/system-tarball'' (to the text field of <tt>URL:</tt>) | ||
** add a nice file name for the current downloadable build of the template (to the text field of <tt>File name:</tt>) | ** add a nice file name for the current downloadable build of the template (to the text field of <tt>File name:</tt>) | ||
| Line 50: | Line 50: | ||
| create a (first) new NixOS container with Proxmox Virtual Environment | | create a (first) new NixOS container with Proxmox Virtual Environment | ||
| | | | ||
* (if you want to switch to the | * (if you want to switch to the <tt>Folder View</tt> and go to <tt>Nodes</tt> and choose the your nodes where you create the container. (this note will be preselected as ''Node'' in the form.)) | ||
* choose the | * choose the <tt>Create CT</tt> button | ||
*: tab <tt>General</tt> | *: tab <tt>General</tt> | ||
*:* (for the following we expect) ''1000'' is prefilled (to the text field of <tt>CT ID:</tt>) or you have added it (because it not already taken) | *:* (for the following we expect) ''1000'' is prefilled (to the text field of <tt>CT ID:</tt>) or you have added it (because it not already taken) | ||
| Line 62: | Line 62: | ||
*:** the name for the container (to the text field of <tt>Hostname:</tt>) | *:** the name for the container (to the text field of <tt>Hostname:</tt>) | ||
*:** … | *:** … | ||
*:* choose the | *:* choose the <tt>Next</tt> button | ||
*: tab <tt>Template</tt> | *: tab <tt>Template</tt> | ||
*:* (for the following we expect) the entry ''cephfs'' is prefilled (at the drop down menu of <tt>Storage:</tt>) | *:* (for the following we expect) the entry ''cephfs'' is prefilled (at the drop down menu of <tt>Storage:</tt>) | ||
*:* (for the following we expect you) find and choose the entry ''nixos-21.05_2021-10-10.tar.xz'' (at the drop down menu of <tt>Storage:</tt>) | *:* (for the following we expect you) find and choose the entry ''nixos-21.05_2021-10-10.tar.xz'' (at the drop down menu of <tt>Storage:</tt>) | ||
*:* choose the | *:* choose the <tt>Next</tt> button | ||
*: tab <tt>Root Disk</tt> | *: tab <tt>Root Disk</tt> | ||
*:* (for the following we expect) the entry ''storage'' is prefilled (at the drop down menu of <tt>Storage:</tt>) | *:* (for the following we expect) the entry ''storage'' is prefilled (at the drop down menu of <tt>Storage:</tt>) | ||
*:* (for the following we expect) ''8'' is prefilled (to the text field of <tt>Disk size (GiB):</tt>) | *:* (for the following we expect) ''8'' is prefilled (to the text field of <tt>Disk size (GiB):</tt>) | ||
*:* choose the | *:* choose the <tt>Next</tt> button | ||
*: tab <tt>CPU</tt> | *: tab <tt>CPU</tt> | ||
*:* (for the following we expect) ''1'' is prefilled (to the text field of <tt>Cores:</tt>) | *:* (for the following we expect) ''1'' is prefilled (to the text field of <tt>Cores:</tt>) | ||
*:* choose the | *:* choose the <tt>Next</tt> button | ||
*: tab <tt>Memory</tt> | *: tab <tt>Memory</tt> | ||
*:* (for the following we expect) ''512'' is prefilled (to the text field of <tt>Memory (MiB):</tt>) | *:* (for the following we expect) ''512'' is prefilled (to the text field of <tt>Memory (MiB):</tt>) | ||
*:* (for the following we expect) ''512'' is prefilled (to the text field of <tt>Swap (MiB):</tt>) | *:* (for the following we expect) ''512'' is prefilled (to the text field of <tt>Swap (MiB):</tt>) | ||
*:* choose the | *:* choose the <tt>Next</tt> button | ||
*: tab <tt>Network</tt> | *: tab <tt>Network</tt> | ||
*:* (for the following we expect) ''eth0'' is prefilled (to the text field of <tt>Name:</tt>) | *:* (for the following we expect) ''eth0'' is prefilled (to the text field of <tt>Name:</tt>) | ||
| Line 91: | Line 91: | ||
*:* (for the following we expect) the entry <tt>Static</tt> is prefilled (at the ratio button menu of <tt>IPv6:</tt>) and you have no network access for IPv6 avilibale | *:* (for the following we expect) the entry <tt>Static</tt> is prefilled (at the ratio button menu of <tt>IPv6:</tt>) and you have no network access for IPv6 avilibale | ||
*:*: ?!? if you have network for IPv6 and you want to have access to your network for IPv6 you have fill out the text field of <tt>IPv6/CIDR:</tt> and the text field of <tt>Gateway (IPv6):</tt>) ?!? | *:*: ?!? if you have network for IPv6 and you want to have access to your network for IPv6 you have fill out the text field of <tt>IPv6/CIDR:</tt> and the text field of <tt>Gateway (IPv6):</tt>) ?!? | ||
*:* choose the | *:* choose the <tt>Next</tt> button | ||
*: tab <tt>DNS</tt> | *: tab <tt>DNS</tt> | ||
*:* <s>(for the following we expect) (the text field of <tt>DNS domain:</tt>) is emtpy (and so prefilled with | *:* <s>(for the following we expect) (the text field of <tt>DNS domain:</tt>) is emtpy (and so prefilled with <tt>use host settings</tt>)</s> | ||
*:* <s>(for the following we expect) (the text field of <tt>DNS servers:</tt>) is emtpy (and so prefilled with | *:* <s>(for the following we expect) (the text field of <tt>DNS servers:</tt>) is emtpy (and so prefilled with <tt>use host settings</tt>)</s> | ||
*:* choose the | *:* choose the <tt>Next</tt> button | ||
*: tab <tt>Confirm</tt> | *: tab <tt>Confirm</tt> | ||
*:: (optional) check the configuration (keys with values) | *:: (optional) check the configuration (keys with values) | ||
*:* choose the | *:* choose the <tt>Finish</tt> button | ||
<pre> | <pre> | ||
/dev/rbd0 | /dev/rbd0 | ||
| Line 131: | Line 131: | ||
| | | | ||
: <code>pct create </code>… | : <code>pct create </code>… | ||
: <s><code>pct create 1000 | : <s><code>pct create 1000 cephfs:vztmpl/nixos-21.05_2021-10-10.tar.xz --ostype unmanaged --net0 name=eth0,firewall=1,ip=dhcp,bridge=vmbr0 --storage storage --unprivileged 1 --features nesting=1</code></s> | ||
<pre></pre> | <pre></pre> | ||
---- | ---- | ||
| Line 138: | Line 138: | ||
<pre> | <pre> | ||
arch: amd64 | arch: amd64 | ||
features: nesting=1 | |||
hostname: CT1000 | hostname: CT1000 | ||
memory: | memory: 512 | ||
net0: name=eth0 | net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=1E:D8:FE:E9:F1:71,ip=dhcp,type=veth | ||
ostype: unmanaged | ostype: unmanaged | ||
rootfs: storage:vm-1000-disk-0,size=4G | rootfs: storage:vm-1000-disk-0,size=4G | ||
| Line 225: | Line 226: | ||
| start the NixOS container with Proxmox Virtual Environment | | start the NixOS container with Proxmox Virtual Environment | ||
| | | | ||
* … | |||
* choose the <tt>Start</tt> button | |||
| | | | ||
: <code>pct start </code> | : <code>pct start 1000</code> | ||
: <s><code>pct | <pre> | ||
<pre></pre> | WARN: old systemd (< v232) detected, container won't run in a pure cgroupv2 environment! Please see documentation -> container -> cgroup version. | ||
Task finished with 1 warning(s)! | |||
</pre> | |||
: <code>pct status 1000</code> | |||
<pre> | |||
status: running | |||
</pre> | |||
|- | |- | ||
| having a running NixOS container on Proxmox Virtual Environment | | having a running NixOS container on Proxmox Virtual Environment | ||
| Line 360: | Line 369: | ||
==== Is there a cgroup2 only NixOS containers? ==== | ==== Is there a cgroup2 only NixOS containers? ==== | ||
; Is there a configuration with cgroups versions 2 only - where cgroups version 1 is not needed - (so that is possible to rollback the manipulation of the pve lxc startup script ( | ; Is there a configuration with cgroups versions 2 only - where cgroups version 1 is not needed - (so that is possible to rollback the manipulation of the pve lxc startup script (<code>/usr/share/perl5/PVE/LXC/Setup.pm</code>))? Or can we create such a (pre)build image (''tar'')?: I do not know. | ||
: <code>grep cgroup /proc/filesystems</code> | : <code>grep cgroup /proc/filesystems</code> | ||