Virtual Control – Linux, VirtualBox and OS/2 or eComStation

This is part one of a two part article about a “real life” control system that is a candidate for moving to a VM on Linux. This control system is being used right now in a real manufacturing facility.

Last year in February I wrote the article “Windows 98? Linux and VirtualBox! (Maybe)“. It is about using VirtualBox to perhaps keep an old Windows 98 system running in a virtual machine (VM). In that article I touched on the concept of a business that runs a system controller on old hardware that may be saved by moving the system to a VM. This article is a follow-up on that concept to cover a recent test we did at ERACC for moving a control system from “real” hardware to a VM. I have not asked permission to name names so I will just call the company that contacted me “client” and use first names only for the people involved.

Several weeks ago I was contacted by Stan at the client about an IBM OS/2 Warp 3 system that runs a critical control system in their manufacturing facility. The hardware for this system is around 15 years old and they recently had problems with the SCSI hard drive. The concern is that this old hardware is eventually going to fail completely as all things man-made eventually do. They could purchase a new control system, but that would cost in the tens of thousands of dollars. Perhaps $40,000/US or more for the controller and cost of the installation from the control system manufacturer. In this current poor economy businesses are looking for ways to save money so a solution with a $40K or more price tag is going to be very carefully researched before such an expenditure will be made. This case is no exception. In the course of the client’s research my company was discovered as we still support OS/2 in its current incarnation as eComStation.

So Stan contacted me. He wanted to know if we could build them a new PC to run the current control system software. I assured Stan we could do that, but I suggested that we try running the software inside an eComStation VM using VirtualBox on a Linux system first. My reasoning is if it works this “future proofs” the current control software and keeps them from having to purchase a new system any time soon. I planned to help get the VM up and running at their facility and all of this could be done for well under $2500/US. I mentioned that I would need a disk image of his current control system and would work from that to create a VM with which to test. Stan agreed this sounded like a good idea and said he would get the disk image done and get back to me.

A few weeks passed. Then I received a call from Stan saying the disk image was ready on a USB thumb drive. I gave Stan our shipping address and he placed the thumb drive in the mail to us. When the thumb drive arrived I brought it to my work PC and copied the “disk.img” image file. This PC runs Mandriva 2010 Linux on an AMD Phenom quad-core based motherboard which includes AMD’s hardware virtualization. One needs hardware virtualization to run OS/2 or eComStation in a VirtualBox VM. The disk image was converted to a VirtualBox virtual disk image (VDI) using the command:

VBoxManage convertdd ./disk.img /data1/virtual_machines/virtualbox/vdi/disk.vdi

This VDI was then used to create a VM to try to boot it. Unfortunately it would not boot. So a new VM and VDI was created using eComStation 2.0 release candidate 7 (eCS2rc7). This new VM was booted and the VDI created above was mounted as a second “disk” in the VM. The data and programs were copied from the mounted second VDI to the new VDI and testing began. After editing the eCS2rc7 startup files, CONFIG.SYS and STARTUP.CMD, to include the relevant software for the control system the VM was rebooted. The first reboot failed as some of the old OS/2 Warp 3 based drivers failed to load. It was determined by trial and error what new drivers were needed to replace the old ones and which of the old drivers are irrelevant when using a VM. Finally we had a booting VM that started the control software.

We discovered that the control software uses TCP/IP to “talk to” the manufacturing hardware. This is important because a custom hardware interface would likely not work in this case. Any control software that communicates using TCP/IP or serial connections is likely to work just fine though. We had what we needed to know to proceed with this project. I contacted Stan and sent him the data, with screen shots, in an e-mail. Stan forwarded the information to MIS at the client. As of now we are waiting for MIS at the client to give the go ahead to continue. I am confident that this will get a “green light”, so I am “jumping the gun” a bit with this article.

I will write part two once the project has proceeded to its conclusion, good or bad. Although, “good” is the only outcome I think is likely.

This article has had this many unique views:

click for free hit counter
FREE HIT COUNTER

Notice: All comments here are approved by a moderator before they will show up. Depending on the time of day this can take several hours. Please be patient and only post comments once. Thank you.

Edit Sat Mar 20 12:25:38 CDT 2010: Fix typo as pointed out by John Angelico, Thanks for the “heads up”.

Share

Published by

Gene A.

Gene is a "Unix Guy", network technologist, system trouble-shooter and IT generalist with over 20 years experience in the SOHO and SMB markets. He is familiar with and conversant in eComStation (a.k.a. OS/2), DOS (PC, MS and Free), Unix, Linux and those GUI based systems from Microsoft. Gene is also a follower of Jesus (forgiven, not perfect), and this does inform his world view.

14 thoughts on “Virtual Control – Linux, VirtualBox and OS/2 or eComStation”

  1. Hi Gene,
    You make a very key point, that the solution worked as communication is via TCPIP – if the system had required access to physical cards or IO ports on the system hosting the Virtualisation engine (even in many cases USB) you probably would have been “out of luck”.

    If the comapny comes back and says it doesn’t want a Linux based solution, another way to go would be an MS Windows 7 Professional installation with the VirtualXP add-in – this will run an eCS 2.0 image as well if you create it under MS VirtualPC 2007 and transfer it. This avoids two levels of open source software, Linux and Virtualbox. Some Companies are not happy with Open source.

    I was not surprised to hear that the OS/2 image didn’t work – there are issues in memory addressing that conflict with some (but not all) virtualisation engines, these were addressed in eCS 2.0 RC7.

    Here’s a couple of useful reference URLs for virtualisation of eCS on various platforms:

    Refer to the following url for general information arounf virtualisation and OS/2 – eComstation.
    http://www.os2world.com/wiki/index.php/Virtual_Machines
    and here if you are looking to install under ESX
    http://ewiki.ecomstation.nl/eCSunderVMWareESXiHowto

    Cheers/2
    Ed.

  2. Interesting article – thanks.

    Naturally, it would be a good idea to keep track of the Warp 3 drivers which are
    a) redundant in a VM and
    b) out of date
    for future reference.

    Oh, and a small typo:
    “all things man-made eventually does” –> “all things man-made eventually do”.

  3. Very useful information. My former employer have an industrial scale pilot plant which is controlled by in-house developed software running under OS/2 Warp. Currently negotiations are under way to give the pilot plant a new life as an operator training system.
    Virtualisation will help in the transition.

  4. John Angelico (comment #3) re: the drivers …

    Specifically the drivers that are not needed in a VM are the SCSI drivers for the SCSI controller and disk in the “real” hardware system. However, one of the SCSI drivers named UNI09DRV.SYS is checked for by the control software. (We determined this is a SCSI driver by examining the file in a hex editor and seeing the string “UNI09 SCSI device driver” in the file.) One sees errors from the control software startup sequence if this check fails. So it was loaded to prevent the errors. That driver requires an ASPI driver. The ASPI driver used with the Warp 3 system is circa 1997 so we loaded the OS2ASPI.DMD driver that comes with eCS and everything loaded at that point.

    We are having to await approval from MIS at the client to proceed with testing the VM on-site while connected to the manufacturing system. Once that proves to work then I expect the project to get an okay for completion.

  5. Nice article.

    I’ve done this a couple of (hundred) times with Windows and linux based systems. We’ve even done it with a Windows 3.11 system. Another great tool for legacy windows 3.11 applications is dosbox. It allows you to install Windows 3.11 inside Windows xp for example.

    As for hardware, new hypervisors can share usb and even pci devices. This works very well although it limits the possibilities for High availability and live migrations. I’m using the KVM hypervisor with a windows 7 guest which sync’s with a HTC phone over usb.

    Other solutions include remote ip based usb hubs. These do require drivers inside the guest OS so support is very limited (linux and Windows).

  6. Whatever happened to OS/2? We still use it in Australia as the core system in a lot of automatic teller machines. A lot more robust than XP apparently !

  7. A brief follow-up. An on-site look at the actual hardware showed that the communication is done over serial, not ethernet. There is nothing quite like actually looking at the back of the controller PC to see what is used. The end-user did not know what it used and I did not insist on a picture. I know better than to think I have everything before going on-site. It rarely works out that I do in these experiments. Oh well, we are getting a serial card for the test PC and will see how it goes next time on-site.

    1. Checking to see if you have an update. We had tried to move to newer data systems in my lab but found that the older OS/2 systems communicated better, faster and used less file storage. We are attempting to set-up eComstation in a Virtual Box on Dell Optiplex 320 computers with Intel D processor running Windows XP. First, hiccough was request for AMD accelerator — does this mean that the accelerator just needs to be toggled on in the Intel Bios?
      We have also had some issues with failure of eComstation to recognize serial cards. Did you have any problems?
      Thanks

      1. Neal, et al,

        Unfortunately upper management pulled the plug on this project before we could get far enough to determine feasibility. Management decided that doing an end-run around the manufacturer to “reinvent the wheel” so to speak would not really solve the problem. It was decided to just go ahead with the expensive upgrade to their hardware from the manufacturer and acquire a new support contract in the process.

        Windows for the host? Really? I recommend using something more stable and less prone to malware than Windows for hosting any critical systems in virtual machines. I prefer Linux or FreeBSD for the host.

        That said, yes the BIOS setting for hardware acceleration must be enabled. For a virtual machine you need to make sure the host recognizes the serial card. The serial ports in the VM will be virtual ports redirecting to the real ports.

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow the directions below to post a comment if you are human. After 3 failed tries reload the page to start with new images.