I am taking some of my well earned vacation time, and spending it nerding out at home.
I updated the homebrew package on my iMac, and ran brew install hercules. Hercules is an IBM mainframe emulator. It’s capable of emulating anything from a 360 to a current system/Z mainframe. And if you have access to any mainframe OS software, you can run your own 4 cpu z890. I downloaded the Debian Linux for s390x installer, and am having at it now.
Several articles about installing linux under hercules, but not all of them explain it clearly. I read at least three, but the most helpful was http://www.josefsipek.net/docs/s390-linux/hercules-s390.html Thanks to the original author to getting me over the hurdle.
To get tuntap networking to work on my Mac, I first needed to download and install tuntap software for MacOS Sierra. http://tuntaposx.sourceforge.net/ to the rescue.
I had to use homebrew again to install squid and dnsmasq, to provide HTTP and DNS proxy services for my point-to-point attached mainframe virtual machine. I need to find the MacOS commands to NAT the mainframe’s tun0 connection, but for now, keeping it behind a proxy isn’t really a bad thing.
My goal is to to get lxc guests running under Debian GNU/Linux on an s390x server. Just ‘cuz I can. I do honestly think that would be a way to convert my work environment from LPARs running z/vm hosting multiple z/linux guests running multiple JVMs into LPARs running native z/Linux running each guest as an LXC container instead, which then runs the JVMs. We get all the benefits of containers, and can forego the overhead of z/vm and multiple z/linux instances, each scheduling tasks and managing memory and swap independently.
Combine this with a strategy of using overlayfs to add a writable filesystem on top of a read-only base OS filesystem, and you end up with easily upgradable systems, and shared memory and shared swap space advantages too. You’d get most of the performance advantages of running JVMs inside Linux Containers, but continue to operate, manage, and monitor your software the same way you do today. Call it a half step towards converting everything towards micro-services.
I’d love to do a proof of concept project, with 1 decent size LPAR in our dev lab, where we can try to operate over all the same existing development environments. See how much faster and more efficient Linux Containers are compared to the z/vm solution.
Figuring out just the right hercules configuration file was the hardest part.
First I had to create a couple virtual disks for the OS. There are five versions of the IBM 3390 disk drive, with different sizes. I chose a 3390-1 for the /boot partition, and a 3390-54 second drive to format with LVM to hold root, swap and /home partitions.
Then I launched hercules, ipled the card reader to boot up the installer. Then I configured the network and switched to the SSH installer, picked the disk layout I wanted, and sat back for a couple hours. The hercules emulator is fairly slow, and the install process is entirely single threaded, and it downloads everything from the network.
dasdinit -lfs ./0110.3390 3390-1 LX0110
dasdinit -lfs ./0111.3390 3390-54 LX0111
hercules -f hercules.cfg
Here’s my config file:
CNSLPORT 3270 # TCP port number to which consoles connect
CPUMODEL 2086 # Z890
LOADPARM 0120.... # IPL parameter
PANRATE SLOW # Panel refresh rate (SLOW, FAST)
PANTITLE "LPAR HERC1"
# .-----------------------Device number
# | .-----------------Device type
# | | .---------File name and parameters
# | | |
# V V V
#--- ---- --------------------
0009 3215-C / noprompt
000C 3505 ./kernel.debian ./parmfile.debian ./initrd.debian autopad eof
000E 1403 ./printer.txt crlf
# created with: dasdinit -lfv ./0110.3390 3390-1 LX0110
0110 3390 ./0110.3390
# created with: dasdinit -lfv ./0111.3390 3390-54 LX0111
0111 3390 ./0111.3390
# point-to-point tunnel from zlinux to host
1000.2 CTCI -n /dev/tun0 -t 1500 192.168.5.2 192.168.5.1