OpenVMS and SIMH

Introduction

OpenVMS is a general purpose OS that can run on VAX and Alpha hardware, and currently runs on Itanium. It is considered one of the most secure and stable operating systems on the market today. One of the features that helps with this stability is its clustering capabilities. DEC/Digital were pioneers in the world of clustering and already had such systems in the 80s. Cluster systems with an uptime of more than 10 years are known.

If we do not have any suitable hardware, we can always use the fantastic SIMH emulator to emulate a VAX. SIMH is an emulator created by Bob Supnick  that lets us emulate different systems:  PDPs,  VAX,  SDS, IBM,  Interdata, up to  26 machines. The aim of  SIMH is not to obtain speed, but an emulation as similar to reality as possible.

There is also a series of ‘Software Kits’ available for SIMH that let us directly install different versions of operating systems on this emulator. In future posts I will talk about them in more detail.

Installing SIMH

 

Well, since we want to install OpenVMS on VAX, the first thing we are going to do is install the emulator. From the start I assume that we are working on a computer with some variant of UNIX (the procedure for Windows is similar), personally I use linux (how strange, don’t I?). SIMH is also available for windows and OSX as precompiled packages. On linux you can install it with an apt or similar, or from the source. I prefer to compile my own executable:

mkdir /tmp/simh
cd /tmp/simh
wget http://simh.trailing-edge.com/sources/simhv37-3.zip
unzip simhv37-3.zip
#           leer los obligados README
mkdir BIN # el makefile no lo crea pero lo necesita
make      # usar make USE_NETWORK=1 si queremos soporte de red. Ver configuración

Most likely you will get an error like this one:

collect2: ld devolvió el estado de salida 1
make: *** [BIN/pdp1] Error 1

This is because simh needs the rt library, but it is not set in the makefile. It can be corrected using your favourite editor, and adding -lrt on line 11 of the makefile file so that it ends up like this:

OS_CCDEFS = -D_GNU_SOURCE -lrt

Now yes, it can be compiled without problems. Once compiled, you simply have to copy all the executables to a directory that is in your $PATH. I personally put my executables in $HOME/bin or in /usr/local/bin:

make    # usar make USE_NETWORK=1 si queremos soporte de red. Ver configuracion
cp BIN/* /usr/local/bin/ Configuración de SIMH

SIMH configuration

 

The configuration of SIMH is done with a simple text file.  As we are going to do different projects related to emulators and operating systems, I think it is a good idea to create a directory in $HOME called emuladores and put there whatever we create, in this case vms-vax.

In this particular case, we need the VAX firmware, but it already comes in the SIMH distribution, so we simply copy it to our working directory.

mkdir -p $HOME/emuladores/vax-vms
cp VAX/ka655x.bin  $HOME/emuladores/vax-vms
cd  $HOME/emuladores/vax-vms

Note on networking:

SIMH can use the network card, that is, it emulates the ethernet, but it does it in a somewhat particular way: it puts the network card in promiscuous mode, so that it analyses all the packets that go through the network,  captures the packets whose destination is the IP of our emulated machine, and hands them to the emulator. The particularity of this way of working is that it is very easy to implement, but it has two disadvantages:

  • You have to put the ethernet in promiscuous mode, that is, you have to be root.
  • You cannot log in on the same machine, that is, from a console you cannot telnet to the emulator (you can do it if you have two network cards or from any other node of the network).

Also bear in mind that to have network support, you need to have the pcap library installed and define  USE_NETWORK with the makefile (but we have already read that in the READMEs, haven’t we ? )

Well, since we already have it, we can launch it:

$ vax

VAX simulator V3.7-3
sim> 

Difficult, isn’t it? Once launched, we stay in a pseudo-shell that lets us control the emulator. It has quite a few options that we can see by typing help, but in principle we are going to use very few, like show device or boot. To leave the emulator a quit is enough. If we are emulating a machine and we want to change some option (for example to mount or unmount a tape drive), we can go back to the pseudo-shell  simply by pressing ^E (Ctrl+e key) and to go back to the emulated machine a cont.

Next I put the configuration file that we are going to use,  vax.ini:

;
; Cargar el micro-código de la CPU 
load -r ka655x.bin
;

; Usar un fichero para mantener los valores de la RAM no-volátil
attach nvr nvram.bin
;
; Vamos a simular una maquina con 64M de memoria
set cpu 64m
; Queremos que la maquina no nos acapare todo la CPU del host
set cpu idle=VMS
;
; Estos son los discos, el RA92 es el tamaño máximo soportado por el VAX
set rq0 ra92
;set rq1 ra92
;set rq2 ra92
set rq3 cdrom
;
; Conectamos los discos a los fichero que tenemos
attach rq0 vax2_d0.dsk
;attach rq1 openvms_d1.dsk
;attach rq2 openvms_d2.dsk
;
; Conectamos el fichero con la ISO al CD-ROM (en modo solo lectura)
attach -r rq3 vax_hobby_vms073.dsk
;
; Conectamos la Ethernet a la tarjeta de rede correspondiente
set xq mac=08-00-2B-AA-BB-DD
attach xq eth0
;
; Arrancamos la máquina
boot cpu

We put the previous fragment in our working directory, and we already have it ready to start installing OpenVMS

 

Installing OpenVMS