Power PC Virtual Machine?


Recommended Posts

I have a few old games from an old power pc mac that I would like to see if I could setup a virtual machine to run.  I know that QEMU  has support for emulating completely different architectures but am completely baffled on how to set one up.  I don't know if the QEMU binary for PPC emulation is included in UNRAID either.

Anyone ever played with this idea or know anything about it?

  • Like 1
Link to comment
  • 2 years later...
  • 7 months later...
On 1/20/2020 at 4:58 AM, mkfelidae said:

I have a few old games from an old power pc mac that I would like to see if I could setup a virtual machine to run.  I know that QEMU  has support for emulating completely different architectures but am completely baffled on how to set one up.  I don't know if the QEMU binary for PPC emulation is included in UNRAID either.

Anyone ever played with this idea or know anything about it?

Would that be 32bit? 

Link to comment
  • 3 weeks later...
6 minutes ago, daschmc said:

Did anyone tried it yet?

cant get it to work because qemu-System-PPC is still missing 🤔

Binaries are here, which version are you on?

root@computenode:/sbin# ls /usr/bin/qem*
/usr/bin/qemu-aarch64*     /usr/bin/qemu-i386*    /usr/bin/qemu-nbd*        /usr/bin/qemu-riscv64*         /usr/bin/qemu-system-ppc*      /usr/bin/qemu-x86_64*
/usr/bin/qemu-aarch64_be*  /usr/bin/qemu-img*     /usr/bin/qemu-ppc*        /usr/bin/qemu-storage-daemon*  /usr/bin/qemu-system-riscv32*
/usr/bin/qemu-edid*        /usr/bin/qemu-io*      /usr/bin/qemu-pr-helper*  /usr/bin/qemu-system-aarch64*  /usr/bin/qemu-system-riscv64*
/usr/bin/qemu-ga*          /usr/bin/qemu-keymap*  /usr/bin/qemu-riscv32*    /usr/bin/qemu-system-i386*     /usr/bin/qemu-system-x86_64*

 

Link to comment
  • 5 weeks later...
4 minutes ago, SimonF said:

You need to change the emulator part in the XML to be the PPC binary.

 

  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>

What do you suggest I change it to? If I try qemu-system-ppc it gives me no such file or directory error.

Here is my failed ppc XML. It is a heavily modified winXP template.

 

failed ppc.xml

Link to comment
8 minutes ago, sasdakota said:

I am stuck here. Need to read up on how qemu uses openbios-ppc and why CLI under linux works but UNRAID template does not.

Have you tried using virsh to convert cli to xml?

 

domxml-from-native¶
Syntax:

domxml-from-native format config
Convert the file config in the native guest configuration format named by format to a domain XML format. For QEMU/KVM hypervisor, the format argument must be qemu-argv. For Xen hypervisor, the format argument may be xen-xm, xen-xl, or xen-sxpr. For LXC hypervisor, the format argument must be lxc-tools. For VMware/ESX hypervisor, the format argument must be vmware-vmx. For the Bhyve hypervisor, the format argument must be bhyve-argv.

 

Link to comment

I have not looked into that. It seems that this is something related to the nvram function where the VM wants to store variable data. I thought maybe the machine would create this file on first start up but so far no joy.

 

Would love to get more eyes on this, the last XML I posted has gotten me the closest. I am for now trying to use emaculation's posted QEMU 9.2.2 image. Tested the image to work under ubuntu with qemu-ppc installed.

Link to comment
  • 2 weeks later...

This is my latest configuration. Manually added "pc-bios" folder from Qemu GitHub repository to "/usr/bin". But still no boot. "OpenBios" quotes "No valid state has been set by load or init-program". Tried it 1000x times with different configurations, read Libvirt references, used UTM configurations but I don't know what is missing 😕

(The image I'm using boots perfectly on Unraid when starting from shell)

./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 c -drive file=/mnt/user/isos/QEMUclean.img,format=qcow2,media=disk -drive file=/mnt/user/isos/Universal_Toolbox.toast,format=raw,media=cdrom -spice port=5900,addr=127.0.0.1,disable-ticketing

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>macosx10.0-ppc</name>
  <uuid>69d674e8-e498-469b-8a90-76bcf1c2a753</uuid>
  <memory unit='KiB'>65536</memory>
  <os>
    <type arch='ppc' machine='mac99'>hvm</type>
  </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>
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
      <image compression='off'/>
      <gl enable='no'/>
    </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='0x03' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 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=cuda'/>
    <qemu:arg value='-m'/>
    <qemu:arg value='64'/>
    <qemu:arg value='-boot'/>
    <qemu:arg value='c'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='ide-hd,bus=ide.0,drive=drive1,bootindex=0'/>
    <qemu:arg value='-drive'/>
    <qemu:arg value='if=none,media=disk,id=drive1,file=/mnt/user/YOURIMAGE.qcow2,discard=unmap,detect-zeroes=unmap'/>
    <qemu:arg value='-prom-env'/>
    <qemu:arg value='boot-device=hd:,\\:tbxi'/>
    <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:arg value='-accel'/>
    <qemu:arg value='tcg,tb-size=128'/>
  </qemu:commandline>
  <qemu:capabilities>
    <qemu:add capability='blockdev'/>
    <qemu:add capability='drive'/>
  </qemu:capabilities>
</domain>

 

Edited by daschmc
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.