Installing A Mainframe On A Laptop

For as long as I can remember I’ve been fascinated with massive computer systems like Mainframes and Supercomputers. Scenes like in the movie Hackers showing the Gibson Mainframes, War Games with the WOPR and images of huge data centers filled with enormous machines are a young computer nerds fantasy.

I don’t have a Mainframe, I’m not particularly prepared to buy one either. So as a Mainframe enthusiast, I figured I’d try the next best thing…

This post is intended to be less of a HOW-TO and much more about documenting how I personally got a Mainframe emulator working on my laptop. There’s various other articles around the web that I’ll be referencing, though to be honest, they weren’t as straight forward as I would have liked.  Hopefully by the end you might be able to get something similar up and running as well.

I’m going to build this environment on CentOS 7 running on a Lenovo Thinkpad with 8GB of RAM. Most Linux environments should be similar, though I can’t say the same for Windows or Mac.

First, you can download a Mainframe emulator Hercules using your Linux package manager. You can of course download the source and build Hercules yourself, but this article is not about building software on Linux, so let’s just use yum.

$ sudo yum install hercules

Following the FAQ on Hercules website,, let’s download a copy of MVS from This will give you an ISO archive that you can extract to your home directory. I’ve got a folder called mainframe and I’ve extracted the ISO into the folder mainframe/turnkey-mvs.

Inside the turnkey-mvs folder, there’s an executable called setup so let’s run that with the -a flag that assumes all default set up options.

$ ~/mainframe/turnkey-mvs/setup -a

This will install an MVS image into ~/mvs38j

After the installation completes, you will be asked to enter the MVS master password, which defaults to SECRET

Next you will need an IBM 3270 terminal emulator. I toyed around with building this from source, but it was just easier to once again use the CentOS package

$ sudo yum install x3270 x3270-x11 x3270-text

The next step elluded me for a bit, but it’s necessary to edit the startterm file in the mvs38j folder to add the number of terminal sessions to connect to the server.

$ vim ~/mvs38j/startterm
x3270 -port 3270 &
x3270 -port 3270 &
x3270 -port 3270 &
x3270 -port 3270 &
x3270 -port 3270 &

Now we can start MVS

$ ~/mvs38j/startmvs

This should start up the MVS service that you can connect to.

Open the x3270 application. I had more luck running the GUI version rather than the terminal client. From the Connect menu, create a new connection to localhost:3270. Hopefully this will connect the x3270 client to the MVS service, you should see a connection message in your MVS terminal window.

Now you need to start 3 more of these x3270 sessions and a telnet session

$ telnet localhost 3270

From the initial MVS terminal window (the server) you can now start the inital program load

Command==> ipl 148

IPL 148 tells hercules to load MVS. On one of your x3270 windows you should see the following message:

We’re now ready to start issuing commands to the system in order to get MVS running.

r 00,clpa
r 00,y
s jes2
r 01,format,noreq
r 02,y
r 03,y

IPL should now be complete and you should see the following screen on one of the other x3270 terminals.

To logon, type:

Logon ===> HERC01

Welcome to MVS. For more detailed information on commands and booting into MVS, I suggest reading the MVS Turnkey Cookbook.

Leave a Reply

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