'virt-manager' doesn't work on nixos yet so i need to stick to the command line. i've tried to fix virt-manager but didn't succeed.

how to import stuff

virt-install --connect qemu:///system --hvm --name muse-sequencer --ram 1024 --file muse-sequencer.img --vnc --import

virsh list --all

adding a bridge

to add a bridge interface:

   virsh edit muse-sequencer

see also https://help.ubuntu.com/community/KVM/Networking

VNC

virsh xmldump muse-sequencer > muse-sequencer.xml

in this file i found this line:

   <graphics type='vnc' port='-1' autoport='yes'/>

which tells us that vnc is enabled by default!

on the server also run:

   netstat -tulpen | grep 127.0.0.1
   tcp        0      0 127.0.0.1:5900          0.0.0.0:*               LISTEN      0          8790       2313/qemu-system-x8 
   tcp        0      0 127.0.0.1:5901          0.0.0.0:*               LISTEN      0          617036     22497/qemu-system-x 
   tcp        0      0 127.0.0.1:6011          0.0.0.0:*               LISTEN      0          603760     19055/sshd: root@pt 
   udp        0      0 127.0.0.1:123           0.0.0.0:*                           0          13255      2381/ntpd           

this tells us either to look at port 5900 or 5901 (since we have two running VMs)

on the client install tightvnc:

   nix-env -i tightvnc
   installing `tightvnc-1.3.10'
   building path(s) `/nix/store/0gs6lwx1czwp816znnxqh4v109n8rlms-user-environment'
   created 4241 symlinks in user environment

now let's tunnel vnc over ssh:

   ssh -L 5900:localhost:5900 nix9000-root

afterwards i started:

   vncviewer

http://www.cyberciti.biz/faq/linux-kvm-vnc-for-guest-machine/

nixos related

https://nixos.org/wiki/QEMU_guest_with_networking_and_virtfs

links

Powered by MediaWiki