Unraid VM QemuPPC MacOS9 Libvirt Setup

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
daschmc
Space Cadet
Posts: 1
Joined: Sun Oct 02, 2022 5:43 pm

Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by daschmc »

Setup VM by using virt-manager but machine want boot. What am I missing?

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>PPCVM</name>
  <uuid>f9957e6d-1ad7-4b29-8d94-a05d828d402c</uuid>
  <title>PowerMAC</title>
  <memory unit='KiB'>131072</memory>
  <currentMemory unit='KiB'>131072</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='ppc' machine='mac99'>hvm</type>
    <loader type='rom'>/usr/bin/pc-bios/openbios-ppc</loader>
    <nvram>/etc/libvirt/qemu/nvram/ppcnvram.qcow2</nvram>
    <boot dev='cdrom'/>
    <bootmenu enable='no'/>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-ppc</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/MacOS904DE.iso'/>
      <target dev='sda' bus='scsi'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/disks/SecondCache/PPC/MacHD.img'/>
      <target dev='sdb' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:a7:f9:c8'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <graphics type='vnc' port='-1' autoport='yes' keymap='de'>
      <listen type='address'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='virtio' heads='1' primary='yes'>
        <acceleration accel3d='no'/>
      </model>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
      </source>
      <rom file='/usr/bin/pc-bios/qemu_vga.ndrv'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-L'/>
    <qemu:arg value='/usr/bin/pc-bios/'/>
    <qemu:arg value='-M'/>
    <qemu:arg value='mac99,via=pmu'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='VGA,edid=on'/>
    <qemu:arg value='-prom-env'/>
    <qemu:arg value='auto-boot?=true'/>
    <qemu:arg value='-prom-env'/>
    <qemu:arg value='vga-ndrv?=true'/>
  </qemu:commandline>
</domain>
Image
Image
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by Cat_7 »

Hi,

I'm not sure what libvirt is adding to the command line, but you might want to try running qemu from a shell script without it:

/usr/bin/qemu-system-ppc \
-L /usr/bin/pc-bios \
-M mac99 \
-device VGA,edid=on \
-prom-env 'auto-boot?=true' \
-prom-env 'vga-ndrv?=true' \
-boot d \
-drive file=/mnt/user/isos/MacOS904DE.iso,format=raw,media=cdrom \
-drive file=/mnt/disks/SecondCache/PPC/MacHD.img,format=raw,media=disk

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by adespoton »

IIUC, LibVirt will integrate Qemu with KVM. This works great for virtualizing qemu-system-x86_64 on an x86_64 host -- it seems to me that since you're running on Unraid, you're on x86_64 hardware -- but qemu-system-ppc is going to be emulated, not virtualized, so libvirt won't provide anything useful. You need to emulate the entire architecture (in this case the Mac99 architecture) and not attempt to pass your actual hardware through.
sasdakota
Space Cadet
Posts: 4
Joined: Mon Nov 28, 2022 8:17 pm

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by sasdakota »

I am wanting to build an OS 9.2.2 VM under unraid as well.

Running on their current release of 6.11.3 which i'm told has PPC emulation provisions.

Will report back once I can figure out the template requirements.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by adespoton »

sasdakota wrote: Mon Nov 28, 2022 8:20 pm I am wanting to build an OS 9.2.2 VM under unraid as well.

Running on their current release of 6.11.3 which i'm told has PPC emulation provisions.

Will report back once I can figure out the template requirements.
They're likely falling back to qemu-system-ppc, so you'll have to set up the template to define mac99 as the profile to use.

https://www.emaculation.com/doku.php/pp ... mu-for-osx

If they aren't overriding default values, that should be all you need to set up. If they're overriding default values (like UTM does), then you'll have to manually repopulate a number of things to get memory management and input devices working again.
sasdakota
Space Cadet
Posts: 4
Joined: Mon Nov 28, 2022 8:17 pm

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by sasdakota »

I was able to make a little bit of headway yesterday. Stuck at an error message.

"operation failed: unable to find any master var store for loader: /usr/bin/pc-bios/openbios-ppc"

This might be an UNRAID issue, but figured more eyes the better. Any suggestions?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by adespoton »

Searching for the error leads me to suspect that you don't have all the OpenBIOS files present at /usr/bin/pc-bios/

You can probably copy them directly from the equivalent Windows or macOS archive on here.

https://github.com/foxlet/macOS-Simple-KVM/issues/395

Seems like this is a common issue with people building for KVM from source.
sasdakota
Space Cadet
Posts: 4
Joined: Mon Nov 28, 2022 8:17 pm

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by sasdakota »

I decided to build a real MacOS9 machine. Just ordered an Apple MDD DP1.42 machine to setup dual boot on 9.2.2/10.5.8, This machine will virtualize 8.6 and possibly older through emulators.

Might come back to this one day, but for now I will limit the Unraid server VM's to Windows and Intel MacOS.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by adespoton »

sasdakota wrote: Sat Dec 10, 2022 8:23 pm I decided to build a real MacOS9 machine. Just ordered an Apple MDD DP1.42 machine to setup dual boot on 9.2.2/10.5.8, This machine will virtualize 8.6 and possibly older through emulators.

Might come back to this one day, but for now I will limit the Unraid server VM's to Windows and Intel MacOS.
I'm confused about "This machine will virtualize 8.6 and possibly older through emulators."

How do you propose to do this? I don't believe KVM is available on LinuxPPC, which means you're limited to running ancient versions of SheepShaver, Basilisk II and Mini vMac. And you can already run modern versions of those on modern hardware.
sasdakota
Space Cadet
Posts: 4
Joined: Mon Nov 28, 2022 8:17 pm

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by sasdakota »

I am thinking you took that comment as that is the purpose for me running 9.2.2?

If so, my apologies, I threw that in as a if I want the period correct experience(pains) I would just virtualize it with your given examples. This rehash of the Pre-X era for me is just for sport and hobby. Nothing mission critical.
Moonlike0763
Space Cadet
Posts: 1
Joined: Fri Mar 03, 2023 4:40 pm

Re: Unraid VM QemuPPC MacOS9 Libvirt Setup

Post by Moonlike0763 »

Libvirt simplifies remote access and management when using clients like virt-manager. I want to host Mac OS 9 on one of the VM hosts in my rack, rather than locally, so I'm interested to figure out how to fix it to boot as well.
Post Reply