KVM at Hetzner
Well I have been asking myself if it is really necessary to write such a page since there are way too many confugins reports around that describe this item as a very complicated matter. Indeed it seemed very complicated to implement virtual hosts at Hetzner, especially in times where Hetzner offers additional subnets.
But let me point out that most of these HOWTOs are either outdated or describe very special situations.
Let me describe the conditions in which this TechTip works:
- You have a Root server at Hetzner from the EQ series
- You have an isolated IP address for your root server
- You have an additional subnet, where the IP addresses are NOT adjacent to your base IP, but you really have a full subnet in the form 184.108.40.206/28. The IP oy four root server is NOT part of the subnet.
- Your subnet is at lease a /28 subnet, better /27. This is because there must be a gateway host in your subnet, which consumes another IP. So you have the full number -3 eventually available as real usable IPs.
- Do not even try to create bridge settings in /etc/network/interfaces! It is not worth the effort!!!
- Just leave the /etc/network/interfaces in the shape you got it from the installimage
- Install libvrt on the rootserver with apt-get.
- Install virt-manager on your client so that you can connect.
- Create a routed subnet with exactly your network properties on your rootserver in virt-manager (virt-manager should run on your client.
- Do not bother for bridge settings!!!!!! libvirt will care for it. There will be a virtual bridge for every subnet you define.
- To facilitate access from virt-manager to the rootserver you can add your ssh public key to the /root/.ssh/authorized_keys file on the rootserver.
- Then simply create the virtual host in virt-manager. It makes sense to upload some ISO images to /var/lib/libvirt/images on the rootserver.
- You can also create the virtual images on your local machine and migrate the image to the rootserver with a mouseclick!