GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

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

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

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Sharing requires you use the Tun/Tap service instead of slirp networking, as the guest can't see the host using slirp. If your host is 10.12, you can create a bridge device in your Network settings, and attach Tun/Tap to that device.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Has anyone been able to make sharing work on Mac OS X? I wanted to open up an Appleworks file on my host system in the guest. Working with one set of files would make things easier than having to copy between guest and host. I have tried AFP, FTP, and SMB. All of them failed with my Mac OS 10.4 guest.
Adespoton is right. When you use tap networking and bridge the connection you can use the AFP, FTP and SMB protocols to connect.

Install tuntaposx.

In Sierra I have my en0 permanently connected to bridge0 and use:

sudo ./qemu-system-ppc -L pc-bios -boot c -M mac99 -m 256 -prom-env 'auto-boot?=false' -netdev tap,ifname=tap0,id=network0,script=no,downscript=no -device rtl8139,netdev=network0 -prom-env 'boot-args=-v' -drive file=~/QemuOSX/OSX_10.4Tiger_6gb.img,format=raw,media=disk

to boot Mac OS X. While waiting for me to type boot at the openbios prompt, I add tap0 to the bridge0 with:

sudo ifconfig bridge0 addm tap0

and boot Tiger. When you have sharing enabled, the tiger machine will show up in the finder for you to access. Please note that I came across some issues with Tiger not being able to enter a folder I copied over and showed me the spinning beach ball. A respawn of the finder process fixes the issue.

Best,
Cat_7
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Thank you very much everyone for the help. I plan on making guest sharing a lot easier with my front-end application. Hopefully it will be as easy as simply selecting a folder to share. For those who are not familiar with my front-end, the link is here: http://www.mediafire.com/file/7parvyzvd ... beta_2.zip. I'm working on a new version and was wondering if anyone had any feature requests.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

I see you've got the March build bundled; are you planning to update to the July build, or are you waiting for the next official release?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Hi,

It seems the beta 2 runs in Sierra, where I had problems before.
Can you add a build that supports resolution switching? It is available in the default source.
Or add an option to select a resolution that goes into the -g argument?

As Qemu defaults to the g3beige, to get any Mac OS guest to run I have to enter the -M mac99 additional argument. Can this requirement for Mac guests be better documented? Or perhaps be filled in when one selects to emulate a Macintosh?

btw: the command line now shows this as location of qemu:
"/private/var/folders/nh/kxhz430d3g52s1kd3w_vrftw0000gn/T/AppTranslocation/954CB4E9-5E09-48A9-B84B-3A7B2739DC0C/d/MacQEMU.app/Contents/Resources/Front-End/../QEMU/binaries/qemu-system-ppc"

This is fixed when copying your app to the desktop, remove the original and pasting back the copy.

I haven't been able to provide my own Qemu build. I added qemu 210 to the preferences and tried to make a configuration with it. The command line looks like this:
"/Users/hsp/qemu-master/qemu-system-ppc" -name "OSX104" -hda "/Users/hsp/QemuOSX/OSX_10.4.11Tiger_6gb.img" -boot c -m 256 -device usb-kbd -device usb-mouse -M mac99

Perhaps there is a issue with the path to the pc-bios folder? I tried adding it a -L pc-bios and as -L "/Users/hsp/qemu-master/pc-bios". Both do not work.

Best,
Cat_7
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

adespoton wrote:I see you've got the March build bundled; are you planning to update to the July build, or are you waiting for the next official release?
I am waiting for the next official release which is only a few weeks away. That would be version 2.10.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Cat_7 wrote:Hi,
It seems the beta 2 runs in Sierra, where I had problems before.
Can you add a build that supports resolution switching? It is available in the default source.
Or add an option to select a resolution that goes into the -g argument?
Version 2.10 is what will be bundled and it supports resolution switching. There isn't a need to add support for the -g argument now.
Cat_7 wrote: As Qemu defaults to the g3beige, to get any Mac OS guest to run I have to enter the -M mac99 additional argument. Can this requirement for Mac guests be better documented? Or perhaps be filled in when one selects to emulate a Macintosh?
This will be solved by adding a drop down menu that offers the mac99 option as default.
Cat_7 wrote: btw: the command line now shows this as location of qemu:
"/private/var/folders/nh/kxhz430d3g52s1kd3w_vrftw0000gn/T/AppTranslocation/954CB4E9-5E09-48A9-B84B-3A7B2739DC0C/d/MacQEMU.app/Contents/Resources/Front-End/../QEMU/binaries/qemu-system-ppc"

This is fixed when copying your app to the desktop, remove the original and pasting back the copy.
Gatekeeper is what does this. System Preferences > Security & Privacy > General is how to access it. Allowing Apps downloaded from anywhere would fix this problem.
Cat_7 wrote: I haven't been able to provide my own Qemu build. I added qemu 210 to the preferences and tried to make a configuration with it. The command line looks like this:
"/Users/hsp/qemu-master/qemu-system-ppc" -name "OSX104" -hda "/Users/hsp/QemuOSX/OSX_10.4.11Tiger_6gb.img" -boot c -m 256 -device usb-kbd -device usb-mouse -M mac99

Perhaps there is a issue with the path to the pc-bios folder? I tried adding it a -L pc-bios and as -L "/Users/hsp/qemu-master/pc-bios". Both do not work.
I'm going to guess when you push the run button QEMU might appear for a second then disappear. I would go to File->Display Full Command-Line and paste this text into a terminal window. Then try to run it. If QEMU outputs an error message you will be able to see what is wrong. Usually it is trying to use the "Send Key" feature for a version of QEMU that doesn't have this custom feature added. Another possibility is your img file has been moved to another location. To note I see a lot of problems with using QEMU 2.10 RC 1 in QEMU Front-End. Generating the command-line and running it in a terminal window it what I currently do. I plan on fixing compatibility issues soon.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

I'm going to guess when you push the run button QEMU might appear for a second then disappear. I would go to File->Display Full Command-Line and paste this text into a terminal window. Then try to run it. If QEMU outputs an error message you will be able to see what is wrong. Usually it is trying to use the "Send Key" feature for a version of QEMU that doesn't have this custom feature added. Another possibility is your img file has been moved to another location. To note I see a lot of problems with using QEMU 2.10 RC 1 in QEMU Front-End. Generating the command-line and running it in a terminal window it what I currently do. I plan on fixing compatibility issues soon.
This command generated by MacQEMU works from the command line, but not in MacQEMU:
"/Users/hsp/qemu-master/qemu-system-ppc" -name "OSX104" -hda "/Users/hsp/QemuOSX/OSX_10.4.11Tiger_6gb.img" -boot c -netdev user,id=mynet0 -device rtl8139,netdev=mynet0 -m 256 -device usb-kbd -device usb-mouse -M mac99 -L "/Users/hsp/qemu-master/pc-bios"

Also, when starting with the generated command from the command line, qemu complains about the missing format=raw argument.

Best,
Cat_7
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Cat_7 wrote:
I'm going to guess when you push the run button QEMU might appear for a second then disappear. I would go to File->Display Full Command-Line and paste this text into a terminal window. Then try to run it. If QEMU outputs an error message you will be able to see what is wrong. Usually it is trying to use the "Send Key" feature for a version of QEMU that doesn't have this custom feature added. Another possibility is your img file has been moved to another location. To note I see a lot of problems with using QEMU 2.10 RC 1 in QEMU Front-End. Generating the command-line and running it in a terminal window it what I currently do. I plan on fixing compatibility issues soon.
This command generated by MacQEMU works from the command line, but not in MacQEMU:
"/Users/hsp/qemu-master/qemu-system-ppc" -name "OSX104" -hda "/Users/hsp/QemuOSX/OSX_10.4.11Tiger_6gb.img" -boot c -netdev user,id=mynet0 -device rtl8139,netdev=mynet0 -m 256 -device usb-kbd -device usb-mouse -M mac99 -L "/Users/hsp/qemu-master/pc-bios"

Also, when starting with the generated command from the command line, qemu complains about the missing format=raw argument.
Thanks for the command-line. I will investigate. The message about the raw format can be ignored. Maybe I will specify the format at being raw to QEMU. That would eliminate the message.

Right now I am trying to figure out how to run QEMU so that sharing can work with the host - but without having to run QEMU in root mode. Changing the permissions to the /dev/tap0 file did fix this problem for a little while. When I rebooted the file's permissions where changed back :(. Meaning I had to use sudo with QEMU again. There has to be a way for the host and guest to share files easily. VirtualBox uses guest additions (kernel extensions?) to make the guest use something that QEMU doesn't have. This route is a possibility.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Ronald P. Regensburg »

Programmingkid wrote:Gatekeeper is what does this. System Preferences > Security & Privacy > General is how to access it. Allowing Apps downloaded from anywhere would fix this problem.
That option is not available anymore in macOS 10.12 (Sierra). Right-click (or ctrl-click) > Open will still work though.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

I have been doing a lot of thinking in terms of what programming language to use and was wondering what version of the Mac OS the Mac users here use. This information would help me to know what should be the minimal system requirements to my front-end application. Since I asked the question I will go first.
Mac OS 10.12.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Ronald P. Regensburg »

I think that minimal OS should be at least OS X 10.11 (El Capitan). All fully 64-bit capable machines (Core 2 Duo and later processors) that can run Mac OS X 10.6 (Snow Leopard) can be upgraded to OS X 10.11. Those include several models that are now 10 years old. But only newer Mac models can run macOS 10.12 (Sierra).

For several reasons, some do not want to upgrade beyond Mac OS X 10.6 (Snow Leopard) or beyond OS X 10.8 (Mountain Lion), though.

(Apple changed the name of its X OS twice: Mac OS X > OS X > macOS.)
Mac OS X 10.6 (Snow Leopard) was released 2009
OS X 10.8 (Mountain Lion) was released 2012
OS X 10.11 (El Capitan) was released 2015
macOS 10.12 (Sierra) was released 2016
CharlesS
Granny Smith
Posts: 107
Joined: Thu Aug 14, 2008 9:05 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by CharlesS »

Programmingkid wrote:I have been doing a lot of thinking in terms of what programming language to use and was wondering what version of the Mac OS the Mac users here use. This information would help me to know what should be the minimal system requirements to my front-end application. Since I asked the question I will go first.
Mac OS 10.12.
Use Swift for the programming language. Nobody wants to have to scramble to rewrite the thing at the last minute once Apple decides that Objective-C is the new Carbon.
There's no earthly way of knowing, which direction we are going, for the rowers keep on rowing, and they're certainly not showing any signs that they are slowing.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

For OSes: there's a bunch of Macs that only go as far as 10.7 as well as a bunch that go as far as 10.11.

The cutoff OSes to me are:

10.4 if you want full PPC capability too (not an issue here)

10.6 if you want a base Intel compile

10.7 if you want to support all Intel hardware

10.11 if you want to support all 64-bit Intel hardware

10.12 if you want to just use the latest features

10.13 if you want to be very cutting edge ;)


As for language: I agree; might as well go with Swift, unless you want to go with C/Qt or some esoteric combo like that. I guess you could even do it as a Chrome plugin in JS, but Swift seems to me to make the most sense, unless you're trying to be cross-platform (in which case, Chrome might be the best option, as it's the new Java)
MetalSnake
Granny Smith
Posts: 120
Joined: Fri Nov 09, 2007 5:42 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by MetalSnake »

I'm running 10.12.6
adespoton wrote: 10.6 if you want a base Intel compile

10.7 if you want to support all Intel hardware

10.11 if you want to support all 64-bit Intel hardware
32bit Intel Macs can't update to 10.7
they came with a 10.4 version (10.4.9 iirc) and could be updated to the latest 10.6 but not further.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Whoops, you're totally correct. It's the memory limited Core 2 Duos that don't go beyond 10.7, and those are 64-bit. They're generally better off running 10.6 though.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Sounds like you want to be a member of the beta archive....
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

I don't currently have them; I keep myself busy with official releases, although I did keep a few DPs that never made it to a final product (Copland, 8.7, Rhapsody). Generally I get rid of my DPs when the GM comes along.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

I don't have beta archive creds myself, as I don't tend to focus on beta software.

8.7 was what eventually became 9.0, but before Apple made the decision to "re-brand" it was just supposed to be a point release upgrade of 8.5, as 8.6 had been. So 8.7 was released to developers for development, but the GM was 9.0. Not much changed between the 8.7 PR and the 9.0 GM other than the version info, but I kept a copy just because it felt like a significant historical event at the time.
User avatar
sentient06
Mac Mechanic
Posts: 188
Joined: Tue Mar 29, 2011 8:57 pm
Location: London, UK

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by sentient06 »

Ronald P. Regensburg wrote: For several reasons, some do not want to upgrade beyond Mac OS X 10.6 (Snow Leopard) or beyond OS X 10.8 (Mountain Lion), though.
That's quite correct. Snow Leopard has Rosetta. Good stuff. It runs some old, good software that otherwise never made into Lion. Recently I've been using an application that uses a Perl library to execute a bunch of scripts, it only works in 10.6, so I was glad to have a machine with it. In the most recent models that support Snow Leopard, it runs so fast that when I switch back to 10.10 at my job I don't want to look at it, it is coffee time.
adespoton wrote:8.7 was what eventually became 9.0, but before Apple made the decision to "re-brand" it was just supposed to be a point release upgrade of 8.5, as 8.6 had been. So 8.7 was released to developers for development, but the GM was 9.0. Not much changed between the 8.7 PR and the 9.0 GM other than the version info, but I kept a copy just because it felt like a significant historical event at the time.
Good times! =D
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Lately I have been noticing my Mac OS 10.4 VM freezing after only 10 minutes of use. Has anyone else noticed any freezing issues?
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

I have to admit I haven't run the latest builds for more than about 5 minutes... do you have a dumpfile from your host OS? Or is the freeze only in the guest OS and qemu's still happily running?

Also, it's possible that this has to do with the PMU (lack of) emulation -- if you disable all energy saver settings and screen savers, does it still freeze?
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

adespoton wrote:I have to admit I haven't run the latest builds for more than about 5 minutes... do you have a dumpfile from your host OS? Or is the freeze only in the guest OS and qemu's still happily running?
QEMU was still running. I went into the monitor and used the 'info registers' command to see if the CPU was brain-dead. It was. There were only one or two registers being changed between 'info registers' calls. Usually there are many registers being updated when an application is running.
adespoton wrote: Also, it's possible that this has to do with the PMU (lack of) emulation -- if you disable all energy saver settings and screen savers, does it still freeze?
Haven't thought about that. I will try this and report back.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Programmingkid wrote:
adespoton wrote: Also, it's possible that this has to do with the PMU (lack of) emulation -- if you disable all energy saver settings and screen savers, does it still freeze?
Haven't thought about that. I will try this and report back.
It worked! Going into the energy saver pane in System Preferences and sliding both sliders to 'Never' with unchecking the put hard drives to sleep option fixed the problem.

I made a wiki page for Mac OS 10.4 and added this info to it.
https://wiki.qemu.org/index.php/Documen ... /MacOS10.4

Thank you very much for the suggestion.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

This will be a problem (and the solution) for 10.3 as well (and 10.5). Not sure about earlier versions; likely anything that uses the PMU will lock up like this.
Post Reply