Home » Technology » OpenVZ libvirt small howto

OpenVZ libvirt small howto

i have been running my projects on openvz for about the past 10 years, i like it because it is stable, and simple to handle.

meanwhile on my workstation i have been using libvirt in combination with kvm and qemu for about the same time to test operating systems and network setups as well as coding for certain environments.

libvirt is the management framework that made it easy for me to configure, deploy and run those machines, until a few weeks ago i didnt come to my mind that libvirt has had a remote control ability for ages.

when i finally realized the true potential of that management framework and looked up their website i saw alot of working connection strings for… xen, qemu, vmware (of all things…), hyper-v and of course, openvz support.

now for the base setup i had to install libvirt on the box, and make it listen to the external adress via tcp.
there are multiple ways to do this, and i decided to go with the ssl/tls road.

so i created a pair of certs, placed them into a subfolder i created under /etc/ssl, and then edited the file /etc/libvirt/libvirtd.conf, heres basically the important bits i changed:

finally i installed the sasl tools and setup a sasl user and password combination:

now i have the following string added to my bashrc to access the openvz box, and it works like a charm: