[HECnet] Automatic Orderly Shutdown of Emulated VAX/VMS System in SIMH

Paul Koning paulkoning at comcast.net
Sun Jun 10 14:13:06 PDT 2018



> On Jun 10, 2018, at 4:00 PM, Mark J. Blair <nf6x at nf6x.net> wrote:
> 
> I'm not sure if the HECnet list is the best place to ask this, but hopefully it's not too far off topic.
> 
> Let's say that I want to run a full-time SIMH emulation of a VAX running VMS (because I do). This would be my full-time DECnet presence on my local network, my primary means of moving things between my DECnet-speaking computers and my modern machines, and my full-time HECnet presence if I ever find a good way to have persistent internet access at my rural home. The SIMH emulation would be hosted on a Linux server.
> 
> It's easy enough to set up the host server to automatically launch a SIMH emulation at boot time, but I don't know yet how to deal with automatically and cleanly shutting down the emulation when the host server needs to shut down. In particular, I'd want to somehow trigger an orderly VMS shutdown when the host server needs to perform an unattended shutdown, such as when the UPS signals a power failure. If there's a way to checkpoint the entire emulation and then restore it later, that might also be a good option, as long as I can prevent corrupting the emulated system's filesystems by suddenly yanking the virtual power plug.
> 
> Is there any prior art for setting up an unattended SIMH-based VAX/VMS emulation like this?

I haven't done this with VMS, but I've done it with a Cyber emulation.  It involved a systemctl script:

-bash-4.2$ cat dtcyber.service
[Unit]
Description=DtCyber emulator
After=syslog.target network.target

[Service]
Type=simple
User=cyber1
Environment="HOSTNAME=cyber1"
WorkingDirectory=/home/cyber1/D
StandardOutput=journal
ExecStartPre=/usr/bin/cp /home/cyber1/D/sys/871/cy871.ecs.initial /home/cyber1/D/sys/871/cy871.ecs
ExecStart=/home/cyber1/D/dtcyber cybis871auto
ExecStop=/home/cyber1/D/stop-dtcyber.py
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

The "stop-dtcyber.py" script is a Python script that connects to the guest OS console and sends it the necessary commands to perform a shutdown, followed by commands to the emulator to make it stop.  Python is a nice tool for this because you can easily script telnet interactions or the like.

	paul




More information about the Hecnet-list mailing list