(This is a guest post by Tenox)
Over the years I have heard a lot of fairy tale stories about the awesome networking capabilities of QNX. There is this particular one about dragging windows across virtual desktop created out of multiple networked PCs. Unfortunately I’ve never got a chance to see it with my own eyes, so I finally decided to take things in to my own hands. I want to see it!
Interestingly QNX 4.25 released in 2011 includes VMware drivers, so the choice of virtualization engine was obvious. You can download QNX4 Product Suite 2011 here: http://www.qnx.com/download/feature.html?programid=22480
I have created a standard 32bit virtual machine in VMware and booted with QNX4CD.110614.iso. The installation is straight forward, it detects VMware network and graphics cards with no problem. The setup will actually ask you for a QNX Node ID, this will be needed later to create the network. You can simply install few VMs with different Node ID at this point. I wanted to use linked clones so I opted Node ID 1 and changed that later. I’ve enabled to run Photon at boot and went with TCPIP v5.
For simplicity I’m going to run the nodes as DHCP clients. To enable that after first boot:
- edit /etc/config/bin/tcpip.1 and add /usr/ucb/dhcp.client en1 after ifconfig, before inetd,
remove node$NODE from the ifconfig en1 line.
- add /usr/ucb/hostname node$NODE.
- edit /etc/config/sysinit.1 and remove extra parameters from line with /bin/Net.ether2100 so it only has the & sign.
- reboot, check the nameserver in /etc/resolv.conf,
After that I was able to browse web with Voyager. The little OS is pretty fantastic, but as I’m interested in dragging windows, and the OS is covered nicely elsewhere I’m not going to go through all cool features of a single node. Let’s build a network!
I have shut down the virtual machine and created two linked clones. Powered them up. The two clones were able to ping each other over the virtual LAN. I’ve grabbed MAC addresses of both nodes and created a file /etc/config/netmap with entries for both nodes where one is marked with ID 1 and one with ID 2. The file should be identical on both nodes. You can use telnet or ftp to copy it across. Use netmap -f to reload the file.
In the next step I went to work #2 clone exclusively as I needed to change Node ID. Briefly following steps are required:
- cp /.boot /.altboot
- cd /boot
- cp build/install.1 build/install.2
- edit build/install.2 and change $ /boot/sys/Proc32 -l 1 to -l 2 – this is the Node ID.
- make b=install.2
- cp images/install.2 /.boot
- cp /etc/config/sysinit.1 /etc/config/sysinit.2
- cd /etc/config/bin
- copy each of .1 files to .2 as above
- shutdown -f
The configuration steps are documented in more details in this howto.
Also going back to the .iso install you can just specify the Node ID during setup. Much easier.
Type sin net to display list of nodes and their capabilities. If you issue sin info command you should see Node = 2. If you issue sin -n 1 info you should see Node 1 as the sin command was executed remotely on node 1.
You can list remote file systems like this: ls //<nodeid>/ for example: ls //2/. You can execute remote commands using on -n <nodeid> command, for instance on -n 2 who. Impressive, but still not what I wanted to see.
Let’s have look have look at a feature called Jump Gate. Sounds like Stargate and actually works pretty similar. Jump Gates, Ditto and other features are documented pretty well here.
Note the videos are best viewed in 1080p or “original” quality, full screen.
Impressive, but still not what I wanted to see…
This document sheds a little bit of light how you can extend desktop using phditto. After some experimentation, assuming my screen resolution is 1024×768 I figured this, on node 2 run: phditto -n 1 -x 1024 -w 1024 -h 768 -k. The parameter -x is the horizontal screen extension at offset x, –k is kiosk mode aka full screen. You can enter and exit from kiosk by pressing Ctrl+Alt+K. Here are the results:
(Note that these are two separate VMs talking to each other over the network)
Now this is exactly what I wanted to see! Show me another OS that can do that… Note that not all of the nodes have to be QNX OS. You can extend display by using Phwindows for Microsoft Windows or X11 as well!
Update: 4 node network!