OpenVMS x86 on QEMU/KVM

Discussions on the x86 port of OpenVMS
Post Reply
User avatar
issinoho
Site Admin
Posts: 241
Joined: Tue Feb 01, 2005 12:53 am
Location: Scotland
Contact:

OpenVMS x86 on QEMU/KVM

Post by issinoho »

Assumptions
  • OS: Debian GNU/Linux 12 (bookworm) x86_64
  • Host: Intel NUC7JY
  • Kernel: 6.1.0-26-amd64
  • CPU: Intel Celeron J4005 (2) @ 2.700GHz
  • GPU: Intel GeminiLake [UHD Graphics 600]
  • Memory: 7287MiB / 7524MiB
Pre-requisites
Install QEMU / KVM & Libvirt

Code: Select all

sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon -y
sudo systemctl enable --now libvirtd
Install Virt-Manager GUI for KVM

Code: Select all

sudo apt install virt-manager -y
Run KVM Virt-Manager
Go to the Application launcher and search for “Virtual machine manager” (VMM) and run it. Before it opens, the system will ask to provide the root password. This will allow it to create and manage virtual machines.

Configure Virtual Machine
From the VMM, click File → New Virtual Machine

Wizard Step 1
  • Choose, Local install media
  • Click, Forward
Wizard Step 2
  • Click, Browse… and from the Locate ISO media volume dialog find and select the OpenVMS installation ISO image.
  • Click, Choose Volume
  • Deselect the Automatically detect… checkbox.
  • In the Choose the operating system… input box, start typing the word, generic and options will appear above.
  • Select, Generic or unknown OS
  • Click, Forward
Wizard Step 3
  • Set Memory to 8192
  • Set CPUs to 2
  • Click, Forward
Wizard Step 4
  • Set disk image size to at least 16 GiB
  • Click, Forward
Wizard Step 5
  • Choose and type a suitable Name
  • Click the Customize configuration before install checkbox
  • Click, Finish
  • The VM hardware configuration dialog appears.
Virtual Hardware Configuration
Overview
  • Change the Chipset to Q35
  • Change the Firmware to UEFI x86_64
  • Click, Apply
Disk 1
  • Change Disk bus to SATA
  • Click, Apply
CDROM 1
  • Change Disk bus to SATA
  • Click, Apply
Boot Options
  • Enable the checkbox next to, Start virtual machine on host boot up
  • In the Boot device order list, enable the checkbox next to, SATA CDROM 1
  • Using the up arrow to the right of the list, move this entry to the top of the list.
  • Click, Apply
NIC
Make sure the Device model is set to e1000
NAT
  • Make sure the Network source is set to NAT
Bridge
  • Make sure the Network source is set to Macvtap device...
  • Set Device Name to be the hardware address of the network card, e.g. eno1
Click, Apply
Click, Begin Installation

Boot from Installation Media
In the VMM, select the virtual machine instance and click the Play button on the toolbar.

Click the Open button on the toolbar.

From the UEFI console window, display the available devices.

Code: Select all

BOOTMGR> DEVICES 

BOOTABLE DEVICES: B = BootMgr Device, V = Default VMS Boot Device

 BV DKA0        (HD) = FS0    UEFI: V9_2_2       VMS: X86SYS       16384 MB  SATA Disk
    DKA100     (DVD) = FS1    UEFI: V9_2_2       VMS: None         1481  MB  SATA DVD
Now, boot from the installation media, using the appropriate device.

Code: Select all

BOOTMGR> b dka100:
The system will state that a Terminal Utility should be used for access.

To enable Automatic Boot of the VM to OpenVMS, type the following.

Code: Select all

BOOTMGR> auto boot
In order to interrupt an automatic boot and drop to the boot manager, press the <ESC> key within 5 seconds.

Now boot from the disk with the installed operating system.

Code: Select all

BOOTMGR> b dka0
Access System Console
From a terminal on the host, access the VM console as follows.

Code: Select all

screen virsh console NAME-OF-THE-VM
Where NAME-OF-THE-VM can be verified by the following command.

Code: Select all

virsh list
 Id   Name      State
-------------------------
 1    OpenVMS   running
To exit the session, use the following control sequence, <ctrl>-<shift>-]

virsh Cheat Sheet
virsh is your friend especially if running the host headless. I prefer to use screen also which provides a convenient management layer over the sessions.

So, to connect to a VM use.

Code: Select all

screen virsh console NAME-OF-THE-VM
Where NAME-OF-THE-VM can be verified by the following command.

Code: Select all

virsh list --all
Ctrl + ] will exit the session back to the shell.

The following will allow you to manually edit the VM configuration.

Code: Select all

virsh edit NAME-OF-THE-VM
To dump the config to an XML file (for configuration management, etc)

Code: Select all

virsh dumpxml NAME-OF-THE-VM > config.xml
To stop/kill a VM (OpenVMS VMs don't yet play nicely with graceful shutdown).

Code: Select all

virsh destroy NAME-OF-THE-VM
And to start a VM.

Code: Select all

virsh start NAME-OF-THE-VM
You may or may not need to use sudo with the above depending on your user configuration. There are a whole bunch more virsh commands but the above allow me to do day-to-day management from a terminal.
Post Reply