Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualisation:how-to-setup-a-container [2018/06/19 15:54]
preisig [Automatic Setup]
virtualisation:how-to-setup-a-container [2023/11/28 13:58] (current)
dodenhoeft [Manual Setup]
Line 1: Line 1:
-====== How to install ​an LXC container ======+====== How to install ​LXC container ======
  
 The following describes the current options on how to setup and install an LXC container onto a Netmodule router. ​ The following describes the current options on how to setup and install an LXC container onto a Netmodule router. ​
Line 10: Line 10:
  
 ===== Resources ===== ===== Resources =====
-  * [[ftp://​share.netmodule.com/​router/​public/​virt/​Ubuntu-Xenial.tar.gz|Ubuntu ​Xenial ​- armhf]]+  * [[https://​share.netmodule.com/​router/​public/​virt/​ubuntu_bionic.tar.xz|Ubuntu ​Bionic Beaver ​- armhf]] ​/ md5sum: f91b9f6ff431fdc01194bc100fde296f
  
 ===== Automatic Setup ===== ===== Automatic Setup =====
-Using router Software >= 4.1.0.102 allows you to setup containers automatically. You first need to apply your virtualisation settings ​and after thisjust select the "​Install"​ tab from the Virtualisation MenuNow all you need to provide is an URL of your container archive.+Using router Software >= [[http://​share.netmodule.com/​public/​system-software/​4.6/​4.6.0.101/​|4.6.0.101(4.1.0.102)]] allows you to download and setup containers automatically ​from an URL. 
 + 
 +  - Open GUI and go to System → Virtualization 
 +  - Click + to add container 
 +  - By settings, choose type, create a description and select storage. Root file system will be set automatically 
 +  - You have to enable networking, go to “Networking”,​ select routed or bridged by the Network Interface and press Apply (working Network connection is required) 
 +  - You should see a following screen (if you chose extended storage, the path will have storage1 instead of storage0: ''/​mnt/​storage1/​lxc/​guest0''​) {{ :​app-notes:​virt.png |}} 
 +  - Once you applied ​your virtualisation settings, select the "​Install"​ tab from the virtualisation menuProvide the URL of your container archive ​(__needs to be .tar.xz__). {{ :​virtualisation:​virt_autosetup.png |}} 
 + 
 + 
 +After those setps your archive gets automatically downloaded and extracted and the rootfs will be stored under ''/​mnt/​storage0/​lxc/​guest0'' ​
  
-{{ :​virtualisation:​virt_autosetup.jpg |}} 
  
 ===== Manual Setup ===== ===== Manual Setup =====
Line 25: Line 34:
   - You should see a following screen (if you chose extended storage, the path will have storage1 instead of storage0: ''/​mnt/​storage1/​lxc/​guest0''​) {{ :​app-notes:​virt.png |}}   - You should see a following screen (if you chose extended storage, the path will have storage1 instead of storage0: ''/​mnt/​storage1/​lxc/​guest0''​) {{ :​app-notes:​virt.png |}}
   - Transfer the downloaded container (you can use WinSCP) to the router and put in ''/​mnt/​storage0/​lxc''​   - Transfer the downloaded container (you can use WinSCP) to the router and put in ''/​mnt/​storage0/​lxc''​
-  - Unpack the container: <​code> ​tar –xvf Ubuntu-Xenial.tar.gz –C ./guest0 </​code>​ +  - Unpack the container: <​code> ​xz -cd /​tmp/​containerName.tar.xz | tar x -C ./guest0 </​code>​ 
-  - The extracted container contains a rootfs directory which is no stored under ''/​mnt/​storage0/​lxc/​guest0''​.+  - The extracted container contains a rootfs directory which is now stored under ''/​mnt/​storage0/​lxc/​guest0''​.
   - Type <​code>​ lxc-start –n guest0 </​code>​   - Type <​code>​ lxc-start –n guest0 </​code>​
   - Information about container can be accesed by typing <​code>​ lxc-info –n guest0 </​code>​ {{ :​app-notes:​info.png |}}   - Information about container can be accesed by typing <​code>​ lxc-info –n guest0 </​code>​ {{ :​app-notes:​info.png |}}
   - Now you can attach to the container by typing <​code>​ lxc-attach –n guest0 </​code>​   - Now you can attach to the container by typing <​code>​ lxc-attach –n guest0 </​code>​
- +    ​start container in foreground mode <​code>​ lxc-start –F –n guest0 </​code>​ to get more Information ​
-start container in foreground mode <​code>​ lxc-start –F –n guest0 </​code>​ to get more Information ​+