Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
dev0# nc -U /var/run/kvm/vm01./ctl
QEMU 0.14.1 monitor - type 'help' for more information
(qemu)

...

Code Block
(qemu) info vnc
info vnc
(qemu) change vnc ::5900
change vnc ::5900
(qemu) info vnc
info vnc
Server:
     address: :::5900
        auth: none
Client: none
(qemu) 

As you see, there is no VNC by default (we did not configure it in the service), then By default we use a UNIX socket for VNC server but here we changed it and assign port 5900, second query shows us that the VM is now configured as a vnc server.

...

In some time you will see the booted system:

Bingo! It works! (wink)

Boot options example:

Code Block
dev0# svccfg -s kvm:vm01 addpg boot application
dev0# svccfg -s kvm:vm01 setprop boot/order = astring: cd
dev0# svccfg -s kvm:vm01 setprop boot/once = astring: d
dev0# svccfg -s kvm:vm01 setprop boot/menu = astring: on


Serial properties example:

Code Block
dev0# svccfg -s kvm:vm01 addpg serial application
dev0# svccfg -s kvm:vm01 setprop serial/type = astring: telnet
dev0# svccfg -s kvm:vm01 setprop serial/mode = astring: server
dev0# svccfg -s kvm:vm01 setprop serial/option = astring: nowait
dev0# svccfg -s kvm:vm01 setprop serial/bind = astring: localhost:4444

By default we create a UNIX socket for the serial console (/var/run/kvm/vm01/console). You may use nc -U to connect it (like for control socket).


VNC

For a security reason we use a UNIX socket for the VNC server too. At any time you can change it as shown above but the better way is to use noVNC project to connect it. To do it you need a web socket proxy:

Code Block
dev0# apt install -y novnc websockify

And start it:

Code Block
dev0# websockify --web=/usr/share/novnc/ 6080 --unix-target=/var/run/kvm/vm01/vnc -D

The proxy will redirect all queries from the port 6080 to the specified UNIX socket. Also you can read about it here: How To use noVNC on DilOS

APPENDIX

HVM configurable properties:

...

  • diskX/zvol - name of zvol which will be used as storage device for the VM
  • diskX/model - emulating model of the interface (virtio)
  • diskX/serial - serial no of the device (yes, we can specify it too!)

Boot options:

  • boot/order - devices order to boot the VM
  • boot/once - used to boot the VM only once (at first boot)
  • boot/menu - used to choose boot device at boot time (on/off)

Serial console properties:

  • serial/type - type of the connection (unix/tcp/udp/telnet)
  • serial/mode - mode of the connection (should be server or leave it empty)
  • serial/option - comma separated options of the connection (nowait,nodelay)
  • serial/path - UNIX socket full path (/var/run/kvm/vm01/console)
  • serial/bind - use this address:port pair where server is listen connections (empty by default)
  • serial/target - use this address:port pair to send all console data to this point (for tcp client type, for example)