dutch-master Posted October 6, 2018 Report Share Posted October 6, 2018 Before asking my list of questions, first some back ground info: Since earlier this year I work for a thrift shop-chain. Part of my job (for 2 days/week) is running the PC refurbishment project. When I first joined this project Linux Mint was used to install a new OS on refurbished computers. Trust me, systemd on a P4 is a disaster. But who wants systemd anyway ;) So after a while I came across some nice professional network hardware (Gbit managed switches, several) and using an Intel Core 2 machine I created a local network w/o internet access. I also took the decision to change the OS to Devuan Linux with the MATE DE, as the intended audience/user-base are novice Linux users. To this aim I maintain a local repo of Devuan, updated weekly via a portable HDD drive. In the near future a new fiber-optic internet connection will be activated, but as its speed cannot match what I have now to transfer large chunks of data (sorry, packages ;) ) I'll keep the local repo in use for the time being. But the updating process will need some overhauling, having to log around with heavy USB drives is getting quite tedious now. So, with the upcoming access to high-speed internet I've obtained permission to connect to the to-be-launched wifi network during the night to update said repo. But I also would like to have a local Funtoo repo on the same machine, equally updated during the night. This means I need at least 2 virtual machines and from reading my way around, it seems Linux Containers may do what I want: run a Funtoo base system, with a pair for virtual machines on top, one running Funtoo and the other Devuan, each updating itself during the night before switching off again. (I'll be writing some scripts for that, but first getting to grips with LXC!) Is this possible, how do I proceed (the replacement server already has a fresh Funtoo 1.2 install on it) and how do I create my own containers as I'm aware there's nothing for Devuan nor the Core2 metal the server runs on (Funtoo only supports Westmere so far, by the looks of it). TIA! Link to comment Share on other sites More sharing options...
palica Posted October 13, 2018 Report Share Posted October 13, 2018 Try starting here: https://www.funtoo.org/LXD Link to comment Share on other sites More sharing options...
dutch-master Posted October 14, 2018 Author Report Share Posted October 14, 2018 Thx! Yes, I've found that (contributed the installation part for it) but it doesn't really answer how to create images myself. Is it just a text file, if so, what syntax do I need and if not, how do I create an image, especially for Devuan while running Funtoo. Link to comment Share on other sites More sharing options...
palica Posted October 14, 2018 Report Share Posted October 14, 2018 Take a look at https://build.funtoo.org/funtoo-current/x86-64bit/generic_64/lxd-latest.tar.xz for example. You will find metadata.yaml and rootfs - this is what you need for devuan. Modify the yaml and pack rootfs of devuan as a archive. Then import as per https://www.funtoo.org/LXD#Import_the_image Link to comment Share on other sites More sharing options...
palica Posted October 14, 2018 Report Share Posted October 14, 2018 note: there is also lxd-p2c tool: lxd-p2c -h Description: Physical to container migration tool This tool lets you turn any Linux filesystem (including your current one) into a LXD container on a remote LXD host. It will setup a clean mount tree made of the root filesystem and any additional mount you list, then transfer this through LXD's migration API to create a new container from it. The same set of options as `lxc launch` are also supported. Usage: lxd-p2c <target URL> <container name> <filesystem root> [<filesystem mounts>...] [flags] Flags: -c, --config Configuration key and value to set on the container -h, --help Print help -n, --network Network to use for the container --no-profiles Create the container with no profiles applied -p, --profile Profile to apply to the container --rsync-args Extra arguments to pass to rsync -s, --storage Storage pool to use for the container -t, --type Instance type to use for the container --version Print version number Link to comment Share on other sites More sharing options...
dutch-master Posted October 14, 2018 Author Report Share Posted October 14, 2018 Excellent! Great news, I'll investigate further tomorrow. Many thanks helping out! :) Link to comment Share on other sites More sharing options...
Recommended Posts