OpenVMS 9.2-3 Community Edition setup on KVM on Fedora/41
In January 2025, I got the update to the OpenVMS 9.2-3 Community Edition.
Actually I got two updates, there was a problem with the first update. This article describes a script that I developed for quicky getting a new or updated disk image for the community edition installed on a KVM host to the point where you can control it from DECnet or SSH.
It appears by default the VM will boot up with a DHCP assigned address with SSH enabled.
So if you can force the DHCP assigned address, or can easily find out what it is, you can use that for automating the configuration.
I want to avoid the password setting dialog, and I need DECnet IV for my home network, and I can not lookup a DHCP address easily to find the IP address.
So first I will describe using the first OpenVMS 9.2-3 update which I used for debugging the script. Then I will describe using it again for the second update.
It turns out that my previous install using virt-install tool to create the OpenVMS 9.2-2 edition was a mistake because unexpectedly converted the qcow2 file to be a raw format file.
I also learned that that system disk was way too small. I want to have a page file that is big enough to hold a crash dump.
Since VSI makes you replace the system disk with every update, you need to put your customized files on a second disk, which is another change that I will be making from the previous install.
The first OpenVMS 9.2-3 update to the OpenVMS 9.3 community edition showed up while I was developing a script to automatically setup the OpenVMS 9.2-2 disk. I got that script to the point where it could install and get DECnet IV access working.
Before running the script the VM needs to be created. I modified the VM definition using the virsh edit and the virt-manager utilities to match the disk configurations will be described below.
I saved the XML file for use as a template for deploying additional VMs which will need only small small edits that can be automated.
I ended up with 4 disks set arbitrarily to 50 Gb each.
- dka0: Current system disk
- dka100: Local data disk
- dka200: For backup of system disk
- dka300: Previous system disk.
$ unzip community_2025.zip
Archive: community_2025.zip
creating: community_2025/
inflating: community_2025/community-flat.vmdk
inflating: community_2025/community.vmdk
$ cd community_2025
$ ln -s community-flat.vmdk X86_V923-community-flat.vmdk
$ cd ..
$ sudo qemu-img convert -cpf vmdk -O qcow2 /mnt/public/vms/disks/community_2025/community.vmdk /var/lib/libvirt/images/community-flat_v923.qcow2
(100.00/100%)
$ sudo qemu-img create -F qcow2 -b /var/lib/libvirt/images/community-flat_v923.qcow2 -f qcow2 /data/libvirt_pools/main/robin_vms923.qcow2 50G
Formatting '/data/libvirt_pools/main/robin_vms923.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=53687091200 backing_file=/var/lib/libvirt/images/community-flat_v923.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
$ sudo mv /var/lib/libvirt/images/community-flat_v923.qcow2 /var/lib/libvirt/images/community-flat_v923_old.qcow2
Formatting '/data/libvirt_pools/main/robin_vms923.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=53687091200 backing_file=/var/lib/libvirt/images/community-flat_v923.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
- Note when creating this type of script, or using an "expect" type tool, the command termination character is the "\r" or carriage return character. Most of the examples I have found online incorrectly show using the "\n" or line-feed character. The "\n" will work in most, but not all cases, but the "\r" is the code actually sent by someone doing a manual configuration, so will be more reliable to use.
I have had to spend a a lot of time in the past debugging unneeded complexity in expect script automation because of this when the previous programmer encountered a device that would not work with '\n'. - These automation scripts work best with a terminal set to as "dumb" as possible, and with echo disabled. I was unable to control those settings until I was able to get to a DCL prompt. My experiments with changing the terminal settings seemed to cause more problems than they solved.
Detecting a "Username:" was an issue, it shows up too often in console messages, so I had to detect and set a flag to do the reboot.
Domain 'robin' destroyed
$ sudo qemu-img create -F qcow2 -b /var/lib/libvirt/images/community-flat_v923.qcow2 -f qcow2 /data/libvirt_pools/main/robin_vms923.qcow2 50G
For the TCPIP$CONFIG, the prompts change after the first run is done. I did not find a way to detect this.
The setup_vms_community_kvm.py script is expecting a VMS_PASSWORD environment variable to be set before it is run. It also is expecting the VM to be in a off state as it takes care of all the boot menu setup.
The script first sets the BOOTMGR settings to do a conversational boot, where it sets up the SYSTEM password and the minimum information needed for DECnet.
It then reboots the system and configures DECnet Phase IV. DECnet is configured first because it changes the MAC address of the network interface, so must be done before starting up the TCP/IP and SSH.
The next setup is to run the TCPIP$CONFIG.COM script to setup minimal TCPIP networking. I have the script hard coded to set the first device it finds to use DHCP to configure it. I setup some other stuff for routing and bind/DNS which appear to be ignored for a DHCP configuration.
Then a second reboot, and SSH is started. Apparently adding the DECNET startup seems to have
Comments
Post a Comment