0

I am currently running several Ubuntu Server systems on independent machines and would like to explore options for running each as a virtual machine on the same server to consolidate hardware. Currently, I have each machine setup running different services, some running docker containers and others hosting web related services. I am mostly self-taught, so I apologize in advance for major holes in my knowledge.

1 Answer 1

0

Try it.

Start with a base system (Ubuntu Server). Add an LXD and/or Docker Container. Test it. Try to maintain/update it. Twiddle with the networking. Try to backup your data. Then delete the container entirely, rebuild anew, and try to restore your data on the new container.

Some services require a VM; many don't, and can be hosted in a mere Container instead. An LXD Container looks and feels like a VM for many purposes.

Stay on top of your hardware: Consolidation means that a power supply failure or disk failure will take down everything. Know how old your hardware is and which UUID refers to which disk in the case. As hardware ages, start to keep spares on hand. Backups are vital -- set up proper backups for each service as you install it (don't wait). Test how to restore from backups and write yourself a checklist that's accessible when your server is down.

You will make changes. Lots of changes. You will add and delete containers and VMs. When you create a new service, make yourself a step-by-step checklist of how to rebuild it the same way (you won't remember). When you make a change, or add new software to a service or alter a config file, update your checklist. Containers in particular are disposable -- you might be rebuilding them in a couple years from scratch.

3
  • LXD containers, great suggestion, thank you. I will start learning. LXD looks to be a cross between a VMs and Docker containers. Great admin suggestions on hardware, I also need to learn how to properly monitor and allocate system resources, I've only touched on this with Docker. I've built many docker images and containers for various reasons and have learned to comment and document everything. Gitbook and markdown files for everything. Jul 2, 2021 at 14:30
  • 1
    Use btrfs as filesystem for your VM image files, it has many advantages when using VM. It would take too much to explain all features of btrfs filesystem, but you should really read about it, I guarantee, you will love it! :-) btrfs may be a bit slower in reading/writing data but that is only relevant for booting/loading your VM. Most performance depends on huge amount of RAM. it's also wise to give database VM (and other memory hungry VM) access to a real swap partition on a real drive (either enterprise SSD or a good SCSI harddisk).
    – paladin
    Jul 2, 2021 at 14:56
  • LXD is great, thank you. I completed the LXC/LXD Deep Dive on A Cloud Guru, and have been switching most of my projects over to Linux containers, exactly what I was looking for. Jan 16, 2022 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .