As promised earlier, the final bits of getting an application that runs on the old hardware on to the VM is now all done. I tried to install the app but, I really did not want to spend too much time trying to figure out all the nuances about it. Since this is really an effort that would eventually see the app being replaced at some future date, I wanted to get it done easily.
So, over the last long weekend, I did the following:
a) Created a brand new VM running SCO Open Server 5.0.5 on the RHEL 6.2 machine. The specs of the VM are: 2GB RAM, 8GB disk, qemu (not kvm), i686, set the network card to be PC-Net and Video as VGA. This is the best settings to complete the installation of SCO in the VM.
b) Meanwhile on the old machine, I did a tar of the whole system – “tar cvf wholesystem.tar /”. This is probably not the best way to do it, but hey, I did not want to spend time just picking what I wanted and what I did not need from the old machine. The resulting “wholesystem.tar” file was about 2G in size.
c) Ftp’ed the wholesystem.tar file to the VM and did an untar of it on to the VM – “cd /; tar xvf /tmp/wholesystem.tar “. This resulted in a VM that could boot, but needed some tweaks.
d) The tweaks were:
- Changing the network card to reflect the VM’s settings
- Changing the IP#
- Disabling the mouse on the VM
d) SCO is msft-ish (or may be msft learned it from SCO) in that the tool that is used to do the changes “scoadmin” will, after changes are done, need the kernel be rebuilt which then necessitates the rebooting of the VM to pick up the new values
e) Edited the /etc/hosts file to reflect the new IPs and added in /etc/rc.d/8/userdef file a line to set the default route on the VM: route add default 126.96.36.199
The VM’s IP is 188.8.131.52 and in the /etc/resolv.conf file, the nameserver was set to 184.108.40.206 and 220.127.116.11 (Google’s public DNS)
a) The old machine had two printers – an 80 column and a 132-column dot matrix printer – connected to its serial and parallel ports. I did not want to deal with this issue for the VM and got hold of two TP Link PS110P print servers. What’s nice about these are that they are trivial to work with (they are running Linux anyway) and by plugging them to the printers (even the serial printer had a parallel port), both printers were on the network and so printing from the SCO VM was now trivial.
b) Configuring the SCO VM to print to the network printer was using the rlpconf command. The TP Link print server has an amazing array of options and I picked the LPR option and the LPT0 and LPT1 device queue on the two TP Link print server. While the scoadmin has a printer settings section, for some reason the remote printers set up by it never quite worked. In any case, the rlpconf edits the /etc/printcap file to reflect the remote printers and that is all that is needed. Here’s what the /etc/printcap looked after the rplconf command was run:
# Remote Line Printer (BSD format)
the IP #s were set in the TP Link print servers and their respective print spools.
c) so, once that was done, running lpstat -o all on the VM shows the remote printer status:
#lpstat -o all
lp1 is available ! (06,05,02,000000|01|448044|443364|04,02,02|8.2,8.3)
lp1 is available ! (03,02,03,000000|01|450384|445932|04,02,01|8.2,8.3)
Initially, I had set up the VMs using the default networking setting for KVM. The standard networking in KVM assumes that the VM is going to go out to the network and not running as a server per se. But this VM was going to be accessed by other machines (not the RHEL6 host) on the office LAN, so the right thing to do is to set up the a Bridging network instead of a NATed network. RHEL 6.2 does not, by default, have bridging set up and I think that need to change. NATing is fine, but in order for the VM to be accessed from systems other than the host, there has to be additional firewall rules set up if it is to be NATed, but a one liner iptables rule: “iptables -I FORWARD -m physdev –physdev-is-bridged -j ACCEPT” if it was on a Bridge.
I think the dialog box that sets up the VM via virt-manager should add an option to ask if a you need a bridged network. The option is there, but not obvious. So following these instructions carefully – they work.
Well, that was it. The SCO Open Server 5.0.5 with the application that was needed is now running happily in a VM on a RHEL 6.2 machine and the printing is via the network to a couple of print server.
I must, once again, take my hats off to the awesome open source developers of KVM, QEMU, BOCHS etc for the wonderful way all the technologies have some together in a Linux kernel as fully supported by Red Hat in Red Hat Enterprise Linux. There is an enormous amount of value in all of this, that even a premium subscription of this RHEL installation is a fraction of the true value derived. The mere fact that a 20th century SCO Open Server can now be made to run in perpetuity on a KVM instance is mind-boggling (even if Red Hat does not officially support this particular setup).