Proxmox Linux Container: Difference between revisions

imported>Samueldr
imported>ThinkChaos
Make it clearer where to find the system tarball
Line 3: Line 3:
== Finding a container tarball ==
== Finding a container tarball ==


First, choose a channel in https://nixos.org/channels/. You will then need to either follow the <em>via Hydra evaluation XXXX</em> link, or go to the URL listed in the <tt>src-url</tt> file.
Go to https://hydra.nixos.org/project/nixos, choose a release (small ones don't have the tarball we need), and open its Jobs tab.
 
On that page, search for <strong>nixos.containerTarball</strong>, open the link corresponding to your architecture (probably x86_64). Choose the latest success and click on the number. That is the ID of the result. Under <em>Build products</em>, download the <strong>system-tarball</strong>, which will be named <tt>nixos-system-x86_64-linux.tar.xz</tt>.
On that page, use the search box to search for <strong>containerTarball.x86_64</strong>. In the results page, follow the link that is the ID of the result. Under <em>Build products</em>, download the <strong>system-tarball</strong>, which will be named <tt>nixos-system-x86_64-linux.tar.xz</tt>.


Note the Build ID, it will be used when renaming the tarball... right when it's downloaded:
Note the Build ID, it will be used when renaming the tarball... right when it's downloaded:


<pre>
<pre>
mv nixos-system-x86_64-linux.tar.xz nixos-18.03-default_$BUILDID_amd64.tar.xz
mv nixos-system-x86_64-linux.tar.xz nixos-$RELEASE-default_$BUILDID_amd64.tar.xz
</pre>
</pre>


Line 28: Line 27:
pct create 99999 \
pct create 99999 \
   --description nixos-template \
   --description nixos-template \
   local:vztmpl/nixos-18.03-default_$BUILDID_amd64.tar.xz \
   local:vztmpl/nixos-$RELEASE-default_$BUILDID_amd64.tar.xz \
   -ostype unmanaged \
   -ostype unmanaged \
   -net0 name=eth0 \
   -net0 name=eth0 \