Virtualization: Steps to install kvm/qemu and libvirt for virtual machines (VM Host Server)

The preliminary instructions in the Rockstor documentation about how to currently enable automatic updates, i.e. on the command line,
https://rockstor.com/docs/interface/system/update_channels.html?highlight=yast#auto-updates
inspired me to try installing KVM, qemu, and libvirt hosting capabilities to run virtual machines on Rockstor.

With some little sidesteps it was possible to follow the official documentation at:
https://doc.opensuse.org/documentation/leap/virtualization/html/book-virtualization/

The basic steps were:

# install yast module
zypper install --no-recommends yast2-vm

# start yast 
yast

# 1.) change network settings from using network manager to wicked.
# 2.) go to virtualisation -> enable kvm server
#       (will now be able to configure network bridge with wicked)
# 3.) change network back to network manager
#       (avoid rockstor gui to show errors)

Now it’s possible to install and use a libvirt frontend, e.g. virt-manager on your desktop, and to connect to the libvirt daemon running on Rockstor to create and run some additional VMs on the NAS Hardware.

Note: To be able to successfully log into a VM from remote, e.g. your desktop, the VM’s configuration for “Spice” seemed to require to be first configured to listen on “all interfaces” (instead of “default”).

3 Likes

(It does not seem to be possible for me to edit my last post anymore.)

Correction: Configuring “Spice” to listen on “all interfaces” was bad advise (insecure workaround) found on the net. The “Spice” protocol should only listen locally (usually the default). Virt-manager can create secure tunnels through SSH, to access the local ports from remote nevertheless.

The problem of repeated password prompts (easy to misinterpret as failing), is due to the high number of connections that are created (maybe 8). The proper fix for this is to set up ssh public-key auth to the host (e.g. with ssh-copy-id).

3 Likes