Virtualization for Homeassistant, Pi-Hole and others
Introduction
For almost 7 years now, I have been dealing with IT quite a lot. At the beginning I used a Raspberry Pi for many players. At that time, this had many advantages for me. The Raspberry Pi is cheap, actually has enough power for home application and there is a great community that provides help.
Meanwhile, however, I almost completely departed from the Raspberry Pi and replaced it with a virtualization host. In my case, this has many advantages, for example the fast creation or copying of systems. Virtual networks and the availability of devices directly in several VLAN's and more.
But here too, virtualization is a big field. There are many providers and as soon as it goes towards Enterprise, it will be fast expensive (even if there are exceptions). In this article, I would like to introduce a handful of virtualization software for private use and to the Disadvantages. Some things can be done on your own Windows computer (for people with previous knowledge, yes I speak of VirtualBox ;) ).
As a marginal note, it should be said that the Raspberry Pi is in principle also able to virtualize and even orchestrate, but this should not be the subject here :).
Main part
What systems are considered?
This article is intended to give a very rough overview and not to go very technically, nor to give an insight into themes. Here, only solutions are mentioned which can be placed quickly and easily by everyone. Accordingly, it is also called "the big players". In this case:
Of course, this is only a small fraction, the entire possibilities for virtualization. However, I cannot list all the solutions, nor does it make sense to consider them all.
With the software solutions shown here, however, a good cross-section of all possibilities is shown, such as the home server for the Smarthome incl. DNS Guard (PiHole or Wireguard) and still some Windows or Linux machines can virtualize.
In the following, therefore, I would like to briefly refer to my selection and, if necessary, this is also better understandable.
Why did I choose these programs?
As mentioned above, I have already used these and other virtualization programs and can therefore operate them more or less well. With Unraid and Proxmox I also have the most experience...
Nonetheless, you may have other requirements than me and for this reason I would like to give a cross-section of the requirements as a selection.
With the solutions considered here, there is something for the advanced user (Proxmox), but also for someone who wants to set a VM on the PC "just quickly" without operating an extra server, here in the example VirtualBox. Furthermore, Synology VMM gives every Synology NAS owner the opportunity to get even more out of their own device and Unraid is something for the Selfbuild NAS user who wants to do a lot with an intuitive web interface. So there's something for everyone and Synology Virtual Machine Manager is a small look at the side, which is still possible in the jungle of technology.
What does this post even consider?
I think it is quite logical that this contribution cannot completely encrypt all the solutions and, if necessary, even give instructions. That would blow the post and I would doubt that you would want to read this post.
Instead, I will take a little into different use cases, which cover the respective program well and show which disadvantages (or advantages) there are. I may give a recommendation, but in the end you have to decide for yourself what you want to use. I can only give you a quick overview of what you could use.
If you have any further questions, you can ask me E-mail write, I will answer them as soon as possible and as detailed as appropriate.
Let's start now...
What is virtualization and why can you benefit from it?
First of all, we stay down here. What is virtualization and is there differences?
Quite simply, computer virtualization is the technology with which a single physical computer is divided into several virtual computers which can be operated independently of one another.
A virtualization software, the hypervisor, is installed on the physical computer, which allows multiple operating systems to run simultaneously on a single physical computer.
Each virtual computer has its own operating system, its own applications and resources such as memory, CPU and network access.
There are two types of hypervisor, Type 1 hypervisor are installed directly on the computer and can therefore communicate directly with the hardware and control, manage and assign it. In this post, both Proxmox and UnRAID are to be classified as Type 1 Hypervisor solutions. The other two are called Type 2 hypervisors. Virtual Box is Type 2 in any case. At VMM, I could only find relatively old posts, where VMM was called Type 2 hypervisor based on Qemu. If I find other information here, I will of course update it accordingly.
Virtualization thus enables us to operate several systems independently on a computer, but what brings us to it? In short, we can separate services from each other and thus allow the infrastructure to run more clearly and at the same time potentially safer and more stable. Instead of installing all programs that we need (for example routers, Pi-Hole, Unbound, Homeassistant, NAS, CA, Project Host (general server), VPN, Backup, MQTT, DB, CMS-Test, CMS-DEV and few others) on a server, so that these can be changed with other programs/library libraries or may not be started by default (2 web servers of programs). Furthermore, in the case of a program, errors would possibly be only 1 service and not in the worst case all services (if the DIenst e.g. triggers a kernel panic, or makes the server unusable after an update). Lastly, resources can also be distributed more meaningfully.
The best example is DB Server. Depending on the configuration, these services take as much memory as possible to caching data or results from queries to buffers. With a large server, with for example 10 services, a service could "klauen" the other resources. As soon as power is required, no available. This is, of course, a rather remote example, because many programs are programmed "savingly" rather than releasing used memories as soon as possible. But the principle remains.
What virtualization platform should I use now?
To virtualize computers, each platform can be used more or less equally well. Here it comes to the personal application. For this reason, I only give an application-related recommendation and show you what you should consider and what advantages or disadvantages the use of the individual platforms has.
proxmox
In this comparison, Proxmox is probably the most potent solution and still the most extensive one. However, it also requires most knowledge or is the solution, which requires the most effort to set up and operate.
Proxmox can map more or less an entire data center and therefore supports both backup management, permission management and multi-site management.
If you want to make your systems available, Proxmox offers you the best approach. You can integrate several systems as nodes and thus distribute VMs either to multiple systems for load balancing, but also to buffer a system failure.
Live migration and snapshots are also supported by Proxmox and enable good manageability. These functions provide at most VMM of Synology. Several NAS systems can also be connected together and VMs can be migrated to other stations.
Lastly, Proxmox supports both VMs and containers and provides a backup function for both systems. These can be stored in the pool (e.g. with ZFS), but also externally stored.
Basic things like VLAN, Bridges etc. are also supported.
UnRAID
UnRAID is actually a NAS software with the ability to host Docker containers and VMs.
Accordingly, the actual strength of UnRAID is the management and provision of data within a network.
All interactions with UnRAID are usually regulated via the integrated web interface. There, both new shares can be created and VMs can be created.
A nice feature of UnRAID is the so-called Community Applications. A community-run app store in the Docker Container can be downloaded and used directly.
Docker containers of e.g. ghcr.io can also be downloaded and used, but the existentiality of this extension is quite worth mentioning, as in the Repos, for example, installations for Pi-Hole and many others can be found.
For virtualization, UnRAID relies on KVM and can therefore communicate directly with the hardware just like Proxmox.
With one of the latest versions, ZFS is now supported, unfortunately UnRAID is not multi-site capable and for this reason cannot carry out live migrations. No fallback solutions are also possible natively. Here Proxmox as an adult RZ package makes a much better picture, but also Synology VMM. Of course, one should not forget that UnRAID is a NAS system and wants to be considered as such.
Unlike Proxmox, UnRAID can create SMB Shares directly and release them on the network and provide some other NAS capabilities. However, it should be mentioned that Proxmox could also take over these activities theoremically if the corresponding packages are reinstalled. The integration in the web interface would then of course be "only" given via the webshell.
Synology VMM (Virtual Machine Manager)
Synology VMM I recently used the first time, and until recently I was not recommended in any case until I could work with several NAS systems of the brand.
For home use, the performance of the Synology systems is usually sufficient if only "smaller" installation is to be created, which do not require an infinite amount of power or even require a graphics card.
Synology is "leider" only one type 2 hypervisor and relies on the OS of Synology. Accordingly, the performance is a little worse (depending on the application case), but Synology has built up a very impressive field within this ecosystem. In addition to load balancing across multiple instances, live migrations are also possible, but also creating snapshots. Backups are created very quickly and played back. If you have a synology and don't need much power, you should always look at this system.
Administration is very easy to do through an app. The memory can be made available directly on the NAS, so that the memory of the VM is kept directly redundant.
All in all, Synology VMM is a very interesting package if you have the hardware anyway. In my opinion, it makes no sense to buy a synology for the VM skills. Then I would rather put on UnRAID and build the system myself. However, if you want to have the Synology as a NAS and want to create on top VMs, if necessary, it is very well served here.
VirtualBox
Lastly, VirtualBox remains. VirtualBox is probably one of the oldest and most famous products. From school to dev calculator, this solution is much more frequently installed on the device.
VirtualBox can be installed on many systems, as both Linux, Windows and MAC are available.
The biggest advantage for VirtualBox is certainly the easy accessibility. On the PC it is installed quickly and you can start immediately. Many providers also offer direct import machines, which simplifies the start again.
VirtualBox, in my opinion, is ideal when it comes to temporary machines that you want to create quickly, but in everyday life does not have a purpose for a virtualization host. VirtualBox is a huge tool that can be used easily. It actually supports any common function of virtualizers and can be made available quickly for the respective PC. Since VB works directly on the PC, where you are usually yourself, network/communication problems are not a thing. Of course, external systems are easy to connect when you know its infrastructure, but VB can be virtually set directly to the same NIC and, for example, be directly available locally, but not from outside.
If you want a permanent VM, however, I would tend to the other alternatives. What you end up is, of course, a matter of taste. Technically, nothing speaks against a continuous operation of VirtualBox.
Summary
In order to complete this article, I would like to conclude by summarising all the solutions. As described above, this article does not cover all the depths and there are points that may even influence the choice of software, but I cannot cover it in this post. I would fundamentally draw the following conclusion, which is also my recommendation.
1. Temporary/Mobile Virtualization
If you want to have a VM to temporarily virtualize something and do not need the VM all day (e.g. for a work project), you should use VirtualBox. It's fast set up and you always have where you work.
Two. Synology owner
If you already own a Synology Nas, you should also use it. If the performance is enough, absolutely nothing speaks against the use of VMM. Synology also offers VPN solutions via plugin to get mobile access to the VM if you also want to access mobile.
3. Not Synology owner - but with NAS request
If you want to get a NAS, but the Synology is too expensive - does not have enough power for VMs, or you prefer to build yourself, look at UnRAID. UnRAID is a NAS software that can also virtualize. There is a large and helpful community, as well as many plugins to simplify entry.
Many services such as VPN or DNS servers can be installed with one click and you can easily deploy networkshares, but also connect them to the VM by day.
4. Enthusiast
If you really want to deal with virtualization, get to know techniques such as ZFS, Failover, etc., look at Proxmox. As a fully grown-up data center software, you can learn a lot and play a lot. Everything is possible from automatic backups to automatic recovery of failed machines. The learning curve is correspondingly high!
Back…