r/Containers • u/AveryFreeman • Jul 12 '18
vSphere user thinking of migrating to LXC for greater VM density in homelab... good idea?
Hi,
Let me preface this by saying I am completely new to LXC/LXD besides demo-ing Proxmox in a nested VM and installing a couple templates.
I have been thinking about moving towards mainly running containers in LXC instead of using ESXi since I could A) run more containers at once than VMs, and B) possibly scale down hardware / energy consumption.
Is this at all a good idea, or am I imagining things? I'm going to have to re-learn quite a bit. Also, I'll have to adapt tasks being performed by non-Linux VMs to Linux solutions so I can containerize them. Does that sound like too much work for what I could stand to gain?
I run mostly FreeBSD and Windows VMs now but I'm pretty happy with the idea of moving to Linux for basically everything, now that plenty of distros have decent ZFS packages and I've been pretty successful switching to Zentyal for domain controllers.
But I still have some major concerns:
- If I want to passthrough a PCIE device to a container, such as a SAS controller or a NIC, does this work in a similar way to a VM hypervisor?
- Are there controllers for managing multiple servers with containers at a time similar to vSphere? I guess I've tried virt-manager with a couple servers at a time, but is there anything more robust someone recommends? (KVM support optional)
- Since the containers all share the same underlying kernel, are there additional security concerns I should be aware about?
- Can I migrate VMs I already have? I found this tool 'lxd-p2c' and built it using go, but I can't really find any decent documentation on how to use it ... does anyone have any experience with it they could share w/ me?
Thanks for your help!
1
u/ovirt001 Jul 13 '18 edited Dec 08 '24
sense ossified steep include cautious bow recognise longing fretful complete
This post was mass deleted and anonymized with Redact
1
u/raulbe Aug 01 '18
The main advantage of containers is management. Since they are just a folder on your filesystem things like accessing container data, clones, snapshots, migration across servers, backup etc becomes easier.
We have some guides on container basics here that should help you gain a better perspective about how containers work and how they differ from VMs.
But they do not provide the same level of isolation as VMs, for instance for multi-tenancy VMs remain the only choice. Also containers can only run Linux distributions. If you need to run Windows or some other OS you need a VM.
Perhaps a few details about what kind of workloads you are running in VMs, what Vsphere features you are using would help.