Page 1 of 2

Qemu non-KVM installation

Posted: Fri Apr 14, 2023 10:43 am
by nix23
Since my old warhorses are all not capable of running OpenVMS (no XSAFE) i try to run it with qemu (full emulation), i know it's not supported but for the fun let's try it, so this is my qemu one-liner:

Code: Select all

qemu-system-x86_64 -bios /usr/share/edk2-ovmf/x64/OVMF.fd -cpu Cascadelake-Server-v4 -M q35
 -smp 8,sockets=1,cores=8,threads=1 -m 6192 -drive file=./openvms0.img -cdrom ./X86E921OE/X86E921OE.ISO
  -netdev user,id=mynet0,net=192.168.1.0/24,dhcpstart=192.168.1.200 -nic user,model=e1000 -serial stdio
vms_bootmgr starts and see's the Disk (openvms0.img), then proceeds to boot, connection to Com works, all CPU's get initialized then crash. Has anyone a idea how to proceed?

Since .txt or none at all is a invalid extension as attachment i cant add the crash from the serial-console.

Re: Qemu non-KVM installation

Posted: Fri Apr 14, 2023 10:54 am
by tim.stegner
compare your QEMU version(s) against the list of those tested found in the E9.2-1 installation guide.

Re: Qemu non-KVM installation

Posted: Fri Apr 14, 2023 11:04 am
by nix23
The Version is 7.2.1, but i really don't think that's the Problem. As i wrote i use Qemu in full-cpu-emulation mode (-cpu Cascadelake-Server-v4), and not as a "frontend" to KVM, i think that's the much bigger nono then the version ;)

That's the crash-dump from the Serial-Console:

https://pastebin.com/QqFc7yfJ

Re: Qemu non-KVM installation

Posted: Fri Apr 14, 2023 1:51 pm
by volkerhalle
nix23,

VSI Dump Kernel SYSBOOT Jan 23 2023 14:03:45
Dump kernel has bugchecked, code = 0000020D
...

This is a KRNLSTAKNV, Kernel stack not valid bugcheck, not in OpenVMS, but in the dump kernel. I've been told, that this bugcheck can happen when starting the secondary CPUs.

Could you start QEMU without "-smp 8" ?

Volker.

Re: Qemu non-KVM installation

Posted: Fri Apr 14, 2023 2:23 pm
by nix23
Hi Volker,

I had the same idea without -smp the dump looks a bit different but still crashes:

https://pastebin.com/f6zgJgmT

Code: Select all

qemu-system-x86_64 -bios /usr/share/edk2-ovmf/x64/OVMF.fd -cpu Cascadelake-Server-v4 -M q35 -m 6192
 -drive file=./openvms0.img -cdrom ./X86E921OE/X86E921OE.ISO -netdev
  user,id=mynet0,net=192.168.1.0/24,dhcpstart=192.168.1.200 -nic user,model=e1000 -serial stdio 

Re: Qemu non-KVM installation

Posted: Sat Apr 15, 2023 5:36 am
by nix23
Ok one step forward with a different processor (SandyBridge-v2) it hangs now at (also without smp):

Installing required known files...

Configuring devices...

%SYSTEM-W-NOPAGEFILE, no pagefile installed; system trying to continue

Code: Select all

qemu-system-x86_64 -bios /usr/share/edk2-ovmf/x64/OVMF.fd -cpu SandyBridge-v2 -smp
 8,sockets=1,cores=8,threads=1 -M q35 -m 6192 -drive file=./openvms0.img -drive file=./openvms1.img -cdrom ./X86E921OE
 /X86E921OE.ISO -netdev user,id=mynet0,net=192.168.1.0/24,dhcpstart=192.168.1.200 -nic user,model=e1000 -serial
  stdio

Re: Qemu non-KVM installation

Posted: Sat Apr 15, 2023 6:37 am
by volkerhalle
The system is auto-configuring the devices. Something seems to need a lot of virtual memory and there is no pagefile. Looks like some kind of memory allocation loop problem.

Can you remove the network interface - as a test.

Volker.

Re: Qemu non-KVM installation

Posted: Sat Apr 15, 2023 6:49 am
by dmjb
Also ran into the "%SYSTEM-W-NOPAGEFILE, no pagefile installed; system trying to continue" issue while attempting to emulate x86 VMS on an M1 Mac using QEMU. My configuration is as follows:

Code: Select all

qemu-system-x86_64 -L . -m 8192 -vga cirrus \
-machine q35 \
-cpu EPYC-v1 \
-bios OVMF.fd \
-device ahci,id=ahci \
-device ide-hd,drive=disk,bus=ahci.0 \
-device ide-cd,drive=cd \
-drive id=cd,file=X86E921OE.ISO,if=none \
-drive id=disk,file=ovms.img,if=none \
-chardev socket,id=term0,port=12345,host=127.0.0.1,server=on,wait=off \
-serial chardev:term0
The output on the serial console with the various extra boot logging enabled is here: https://pastebin.com/AX0tX4XR

I get some warnings about unsupported features in the CPU emulation when I start QEMU, which makes me wonder if the boot fails because VMS is relying on one of these features:

Code: Select all

qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.rdseed [bit 18]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.sha-ni [bit 29]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.80000001H:EDX.fxsr-opt [bit 25]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.80000001H:ECX.misalignsse [bit 7]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.80000001H:ECX.3dnowprefetch [bit 8]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.80000001H:ECX.osvw [bit 9]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.80000001H:ECX.topoext [bit 22]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.8000000AH:EDX.nrip-save [bit 3]
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.0DH:EAX.xsavec [bit 1]
I also tried this with an emulated Skylake processor, but VMS crashed after the swapper inswapped the first process with bugcheck code 20D. I got a warning about PCID functionality not being supported by QEMU, so I wonder if VMS was trying to use that functionality when it got to a point where it was starting the first process, and it crashed out afterwards.

I fully appreciate that what I am trying is not a supported configuration, but I am sharing some of these notes in case they are useful to someone with more knowledge of QEMU who may be able to get VMS to boot on an emulated CPU.

Re: Qemu non-KVM installation

Posted: Sat Apr 15, 2023 7:26 am
by volkerhalle
Exactly which boot flags did you use ? So I can reproduce this on a working E9.2-1 system disk (VMware Workstation Player 16) and look at the differences in the console output...

Volker.

Re: Qemu non-KVM installation

Posted: Sat Apr 15, 2023 7:56 am
by nix23
volkerhalle wrote:
Sat Apr 15, 2023 6:37 am
Can you remove the network interface - as a test.

Volker.
Same problem:

Code: Select all

%SYSTEM-W-NOPAGEFILE, no pagefile installed; system trying to continue
I can also see that error:

Code: Select all

%VMS_BOOTMGR-I-HWRPB,   Unable to determine System Serial Number
Is that important?