• Just looking around
    Posts: 10 from 2023/6/24
    I don't know where to post this, but I was playing with MorphOS in libvirt on Fedora and it actually works pretty well after a bunch of tinkering. I'll try to cover the reasons for things out of the ordinary.

    Machine Choice and Domain:
    - I used mac99, because with it and the firmware from http://zero.eik.bme.hu/ was the only way I could get everything to work, including networking, shutdown, etc.
    - Added "xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0" in order to add qemu overrides and commands.

    Video
    - Set the graphics to "bochs". Libvirt doesn't recognize "sm501" or "ati-vga".
    - Set an alias so we can override the driver type.
    - In the overrides change the card to "sm501" and remove the "vgamem", "bus", and "addr" settings for it, so it will function properly.
    - I started with "ati-vga", but trying to drag and drop anything resulted in a freeze, so I switched to "sm501"

    NIC:
    - Used "ne2k_pci" for the network because even though "sungem" and "rtl8139" would appear in the OS they would not pass traffic.
    - Added an alias so I can remove the bus and address. Setting these seems to prevent it from working.

    USB
    - Changed the USB controller to "pci-ohci"
    - Added the mouse and keyboard with qemu args, other stuff added by libvirt prevented proper function.

    Storage:
    - Added storage with qemu commandline args. Libvirt's settings prevented proper functioning.

    Audio:
    - No solution for audio.

    Installing:
    - Add the cdrom via qemu commandline args similar to how the hard drive is done.
    Code:

    <qemu:arg value='-cdrom'/>
    <qemu:arg value='morphos-3.18.iso'/>

    - In all cases (cdrom, firmware, and hda) you need to update values to use the full path.
    - Update to boot from the boot.img file on the cdrom by changing:
    Code:
    <qemu:arg value='boot-device=hd:,\boot.img'/>

    to
    Code:
    <qemu:arg value='boot-device=cd:,\mac_ppc32\boot.img'/>

    - If using Fedora with selinux enabled you'll need to set the selinux context of the bios file to make libvirt happy.
    Code:
    chcon -t virt_content_t openbios-qemu.elf

    - Create a disk file
    Code:
    qemu-img create -f qcow2 MorphOS.qcow2 8G

    - Boot and install.
    - Shutdown.
    Remove the cdrom values and restore the boot-device setting.

    Entire Example Domain XML:
    Code:

    <domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
    <name>MorphOS</name>
    <uuid>5509dd95-a210-4918-9f2a-a37dfe95e439</uuid>
    <memory unit='KiB'>2097152</memory>
    <currentMemory unit='KiB'>2097152</currentMemory>
    <vcpu placement='static'>1</vcpu>
    <os>
    <type arch='ppc' machine='mac99'>hvm</type>
    <boot dev='hd'/>
    </os>
    <clock offset='localtime'/>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>destroy</on_crash>
    <devices>
    <emulator>/usr/bin/qemu-system-ppc</emulator>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='usb' index='0' model='pci-ohci'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </controller>
    <interface type='user'>
    <mac address='52:54:00:46:f2:fb'/>
    <model type='ne2k_pci'/>
    <alias name='ua-net'/>
    <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='spice' autoport='yes'>
    <listen type='address'/>
    <gl enable='no'/>
    </graphics>
    <audio id='1' type='spice'/>
    <video>
    <model type='bochs' vram='16384' heads='1' primary='yes'/>
    <alias name='ua-video'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </video>
    <memballoon model='virtio'>
    <alias name='ua-virt'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </memballoon>
    </devices>
    <qemu:commandline>
    <qemu:arg value='-machine'/>
    <qemu:arg value='mac99,via=pmu,usb=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-mouse'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-kbd'/>
    <qemu:arg value='-prom-env'/>
    <qemu:arg value='boot-device=hd:,boot.img'/>
    <qemu:arg value='-boot'/>
    <qemu:arg value='d'/>
    <qemu:arg value='-vga'/>
    <qemu:arg value='none'/>
    <qemu:arg value='-bios'/>
    <qemu:arg value='openbios-qemu.elf'/>
    <qemu:arg value='-hda'/>
    <qemu:arg value='MorphOS.qcow2'/>
    </qemu:commandline>
    <qemu:override>
    <qemu:device alias='ua-net'>
    <qemu:frontend>
    <qemu:property name='addr' type='remove'/>
    <qemu:property name='bus' type='remove'/>
    </qemu:frontend>
    </qemu:device>
    <qemu:device alias='ua-video'>
    <qemu:frontend>
    <qemu:property name='driver' type='string' value='sm501'/>
    <qemu:property name='vgamem' type='remove'/>
    <qemu:property name='addr' type='remove'/>
    <qemu:property name='bus' type='remove'/>
    </qemu:frontend>
    </qemu:device>
    </qemu:override>
    </domain>


    sxtK3SYl.png

    [ Edited by AA5ikkR5SQC6pJSc 24.06.2023 - 21:13 ]
  • »24.06.23 - 21:21
    Profile