Work in Progress
This page is currently a work in progress. If you would like to improve it, please request a wiki account.
Table of contents:
Currently KVM on OpenIndiana only supports recent Intel chipsets with VT and EPT instructions. It is also a very fresh port so bugs are to be expected.
pkg install \
First create a zvol for the guest:
zfs create -p -V 10G rpool/kvm/myguest/disk0
Create a vnic (assumes e1000g0 as your primary NIC, substitute as necessary):
dladm create-vnic -l e1000g0 vnic0
MAC=$(dladm show-vnic -po macaddress vnic0)
Invoke the qemu-kvm command, for example:
pfexec /usr/bin/qemu-kvm \
-boot cd \
-vnc 0.0.0.0:1 \
-smp 2 \
-m 2048 \
-drive file=/dev/zvol/rdsk/rpool/kvm/myguest/disk0,if=ide,index=0 \
-drive file=/path/to/some/cdimage.iso,media=cdrom,if=ide,index=2 \
-net nic,vlan=0,name=net0,model=e1000,macaddr=$MAC \
-net vnic,vlan=0,name=net0,ifname=vnic0,macaddr=$MAC \
The /usr/bin/qemu command is vanilla QEMU with no KVM support. You must use /usr/bin/qemu-kvm to use KVM.
- Recent changes in illumos has caused malfunction of VirtualBox package on OI /hipster, thus making it unusable (it is crashing whole system). Since I already had few VB guests, all using zfs volumes, I have decided to try KVM instead...
- Opening bug at VirtualBox for compiling problems did not show any progress
- KVM (which also was failing because same illumos change) was easily fixed (see #4410) and OpenIndiana forum could not offer solution for VirtualBox failure problem.
- I was using Windows guest, so I can run some s/w which is missing for OI platform: Skype, TeamViever, Zoom, etc... (like recent browser versions, since OI Firefox 52 has lack of some ciphers support, for example). This example has purpose to give an idea how to use it, w/o spending hours on digging it from internet...
qemu-kvm has several limitations (as far as I can tell):
- it has no support of spice libraries, which provide clipboard sharing
- graphical cards support is poor (maximum I could get is 1024x768, which is really not enough)
- Using guest GUI also has limitations:
- both native vga and vnc support are lacking interaction with host MATE environment (shared folders and clipboard)
- vnc support offers password protection, but you have to use
change vnc password command to set it after guest boot (so no other people can access VM)
- Decided to enable remote desktop "server" on windows (so, user MUST have password set) and to access guest with rdesktop (present in OI; support both shared folder and clipboards) or xfreerdp (self compiled; supports shared clipboards, but I could not manage to get support for shared folders) utility