Two tips for installing Mac OS X 10.5 Leopard in QEMU

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

carpelfunnel
Space Cadet
Posts: 2
Joined: Tue Aug 18, 2020 7:57 pm

Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by carpelfunnel »

Hello,

It started with trying to get the classic game Star Fleet I: The War Begins running in a Mini vMac-emulated Macintosh Plus 4MB. Then I stumbled upon this forum and learned that one could use QEMU to emulate a PowerPC Mac for running Mac OS X which intrigued me. Running Mac OS X 10.5 Leopard is just the ticket I need to access some old files of mine that modern GNU/Linux software (which I now use as a daily driver) can't read.

After lots of trial and error and fiddling, I managed to install and successfully boot into a fresh copy of Mac OS X 10.5 on a 64-bit Windows 10 host based on the E-Maculation wiki instructions here. For reference, here's my Windows batch file for starting QEMU (the 01-05-2020 Qemu 5.0 build for Windows with sound support and with fpu speed-up from here) to install Mac OS X:

Code: Select all

qemu-system-ppc-screamer-50.exe ^
-L pc-bios ^
-boot d ^
-M mac99,via=pmu ^
-m 2048 ^
-prom-env "auto-boot?=true" -prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" ^
-drive file=[Mac OS X 10.5 Leopard boot disc image as ISO file here],format=raw,media=cdrom ^
-drive file=[QEMU hard disk image in IMG format],format=raw,media=disk ^
-sdl ^
-netdev user,id=network01 -device sungem,netdev=network01 ^
-device VGA,edid=on ^
-g 1440x900x32
During the process, I learned two non-obvious things that may be useful for others intending to do the same.

1. It was hard to get a disc image of the Mac OS X 10.5 install media that successfully boots into the installer in QEMU. In the end, the only image that worked for me was this one from the Internet Archive: https://archive.org/details/Mac_OS_X_Le ... _Inc._2007
For some reason, the two 10.5 disc images from Macintosh Garden don't boot for me.

2. When the Mac OS X 10.5 installer is about to finish, it gave me an "Install Failed" screen that claims 'The installer could not make the computer start up from the volume "Macintosh HD".' At this point, the installer offers to restart the computer for you to retry the installation. DO NOT click the "Restart" button! Instead open the "Choose Startup Disk" utility from the "Utilities" menu, click to select the volume to which you installed Mac OS X 10.5 (called "Macintosh HD" by default), then click "Restart...".

Image

Image

This will reboot the QEMU virtual machine back into the installer. Just manually turn off the virtual machine.

Now, remove the line in the QEMU batch file that attaches the installer image, and change the line with "-boot d" to "-boot c" and the virtual machine will now boot into the freshly installed Mac OS X 10.5 Leopard (at least for me). Internet access is available via Safari 3.0.4 though most pages refuse to load because of what looks like outdated HTTPS support in this years-old version of Safari.

My main problem now is I still can't figure out how to set up a shared folder between this QEMU Mac OS X 10.5 guest and my Windows 10 host! The instructions in the E-Maculation wiki is for Mac OS 9.2.2 and not for Mac OS X...

Nonetheless, I hope this information is helpful for someone and saves some time fiddling.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by Cat_7 »

Hi,

Thanks for the report.
Your qemu.bat file can be greatly simplified as many parameters are at their defaults already. I removed those:

Code: Select all

qemu-system-ppc-screamer-50.exe ^
-L pc-bios ^
-boot d ^
-M mac99,via=pmu ^
-m 2048 ^
-drive file=[Mac OS X 10.5 Leopard boot disc image as ISO file here],format=raw,media=cdrom ^
-drive file=[QEMU hard disk image in IMG format],format=raw,media=disk ^
-sdl 
The -g parameter only controls the size of the initial yellow openbios screen, so I normally omit it.

ad 1: Yes it's a shame those images will not boot with Qemu.
ad 2: I know this error can occur, but the resulting disk image would still boot on my side. If it works for you, then all the better.

Getting files in and out of Leopard is quite easy:
-You need to have some folder set up to be shared in Windows 10.
-In Leopard, select Go/Connect to server.
-At Server Address type smb://ip-address of your w10 host machine.
-Click Connect.
-Enter your W10 username and password.
-A dialog will appear in which you select the W10 shared folder.
-Click OK. The content of the folder will appear in the OSX finder.

Please note that you are running a sound-enabled qemu build. Sound is not perfect in OSX guests. And it will slow down the emulation.

Best,
Cat_7
carpelfunnel
Space Cadet
Posts: 2
Joined: Tue Aug 18, 2020 7:57 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by carpelfunnel »

Thanks for the tips!

I'm still having trouble getting a shared folder to work after sharing a folder on the Windows 10 host, here's what I tried.

(a) Using your suggested simplified qemu.bat file, my Mac OS X 10.5 virtual machine starts fine with Internet access. In the Network section of its System Preferences I can see that the system's IP is 10.0.2.15 with a router address of 10.0.2.2. In contrast, my Windows 10 host system's IP is 10.0.4.2 (assigned by my real, physical router's DHCP server). In Mac OS X, I tried Go -> Connect to Server in Finder with smb://10.0.4.2 and smb://10.0.2.2 both of which failed. Looks like the two systems are on different networks and that's whey the connection failed?

(b) I also tried to create a new TAP interface and bridge it to my LAN Ethernet adapter in Windows 10 by installing OpenVPN on the host. After doing this, I see that my Windows 10 host is now connected to the LAN via the bridge interface. Booting the Mac OS X virtual machine it now gets an IP that appears to be on the same network as the host in the form of 10.0.4.x. Internet connectivity still works but it still can't access the Windows 10 host... The relevant line in by bat file is:

Code: Select all

-netdev tap,ifname=OpenVPN-TAP,id=network01 -device sungem,netdev=network01 ^
where "OpenVPN-TAP" is the name of the hosts TAP adapter.

What am I missing? Thanks for your help.
win.exe
Tinkerer
Posts: 42
Joined: Tue Apr 07, 2020 4:59 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by win.exe »

Hi,
Also, the reason you're getting the "Install Failed" error is that NVRAM is not currently preserved in QEMU and the Installer saves the Boot Information in NVRAM.
kschindl
Space Cadet
Posts: 3
Joined: Sun Jun 06, 2021 4:26 am

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by kschindl »

ok, it is quite some time later and i got the same problem not able to access the windows 10 host with smb. i always get an smb error -36. using the apple info to add ]

Code: Select all

[default]
minauth=none
did not help.

i tried on several machines under windows 10, wine in ubuntu 16.10, 20.04 all cannot connect using smb. under wine the windows credential does not pop up. under windows, sometimes.
under ubuntu i can use ftp to exchange files. a bit painful using the terminal, but it works.

also there are other strange things:
while under ubuntu 16.10 (quite an old machine) things work except smb, a bit slow, but fine
ubuntu 20.04: issues with mounting cd iso at startup, it does not recognize the image, even it is the same i used under 16.10. this machine is dualboot, same problem on windows 10 partition
windows 10 (another pc): internet connction alsways gets timeout in safari, running update

any ideas regarding smb and these strange differencies?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by Cat_7 »

Hi,

Strange, accessing a shared folder on my W10 machine from Leopard just works on my machine.
My qemu uses tap networking connected to a bridge bridging my default network adapter and the tap device.

In Leopard I get an IP address from my router just fine. I can then use the Connect to Server option and enter smb://ip-adress of bridge.
This gives me the option to log in and to select a share, which is then mounted on the Leopard desktop.

Differences between hosts might be explained by access rights and smb versions?
I do have "SMB 1.0/CIFS enabled in the "turn windows features on or off" dialogue.

Best,
Cat_7
kschindl
Space Cadet
Posts: 3
Joined: Sun Jun 06, 2021 4:26 am

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by kschindl »

Cat_7 wrote: Sat Jun 12, 2021 6:14 am Hi,

Strange, accessing a shared folder on my W10 machine from Leopard just works on my machine.
My qemu uses tap networking connected to a bridge bridging my default network adapter and the tap device.

In Leopard I get an IP address from my router just fine. I can then use the Connect to Server option and enter smb://ip-adress of bridge.
This gives me the option to log in and to select a share, which is then mounted on the Leopard desktop.

Differences between hosts might be explained by access rights and smb versions?
I do have "SMB 1.0/CIFS enabled in the "turn windows features on or off" dialogue.

Best,
Cat_7
Hi thx for this extremly fast response, on a weekend that is....
i use tiger not leopard, i did read leopard is slower, so i installed tiger

i did not use tap bridge (using openVPN) as it slows down the windows connection close to unusable.
so if i understand you right, u use an IP from the subnet your windows is in? i tried once with a static ip in same subnet, but had no luck either and internet did not work, if i remember right.
it might be an access right problem, not sure how to solve that one as the documentations i found are vague. honestly i miss a good manual for mac os x and the networking. i will try the smb/cifs feature on windows. question to that: auth is not set to no enscription on os x (as apple suggested to solve the -36 error)?

Have a nice WE
Karl
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by Cat_7 »

Well, the week is not organised the same for everyone ;-)

Due to connecting through the bridge my guest can receive an IP address from my DHCP server. So for me:
-the guest is on the same subnet as the host,
-the tap device connection allows access to all IP ports on the network,
-the guest is Leopard, I don't know how Tiger will do.

By now I do know whether Tiger would work with this setup: yes.

I don't know what it is you are trying to achieve, but have you read our guide?
https://www.emaculation.com/doku.php/pp ... networking
You can forward a guest port to the host in Windows, Linux and Mac OS hosts (such as port 21), enable ftp in the guest and then connect to that port with an ftp client capable of passive transfers.

Best,
Cat_7
kschindl
Space Cadet
Posts: 3
Joined: Sun Jun 06, 2021 4:26 am

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by kschindl »

Hi Cat

Thx again.
i just want to be able to access the host system to exchange data or import downloads. the safari in mac os x has SSL issues, so most HTTPS connections fail. download with host and import seems to work best.

yes i saw the instructions. i tried the tap, as i said the tap drops the cost transfer rate to a couple kB instead of mB. i had the bridge active while trying to download the nvidia driver update. it sucked.

but as you mentioned ftp is definitely works, just thought smb would be better as ftp you need to zip folders. did not find that mac os x has NFS... would work, too. sheepshaver with mac os can easily access the host...
so i guess i will go with ftp.

i will upgrade to leopard and see how it performs.
thx for your time

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

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by adespoton »

OS X does have NFS built-in, it's just hard to configure on non-Server builds.

See: https://knowledge.autodesk.com/search-r ... -OS-X.html
AqemuAndPearPCUser
Space Cadet
Posts: 2
Joined: Mon Jul 19, 2021 10:48 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by AqemuAndPearPCUser »

Hi im new to here, i only want to know if can i upgrade the RAM? :?:
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by Cat_7 »

Hi,

I believe the maximum amount of ram you can assign to Qemu running OSX is 2.0 Gb, so
-m 2048

Best,
Cat_7
AqemuAndPearPCUser
Space Cadet
Posts: 2
Joined: Mon Jul 19, 2021 10:48 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by AqemuAndPearPCUser »

Cat_7 wrote: Tue Jul 20, 2021 11:04 am Hi,

I believe the maximum amount of ram you can assign to Qemu running OSX is 2.0 Gb, so
-m 2048

Best,
Cat_7
Oh thanks! :wink:
ddubya
Space Cadet
Posts: 1
Joined: Sat Jan 08, 2022 7:56 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by ddubya »

It is also possible to boot 10.5 with the (-cdrom) device with this open-firmware command:

Code: Select all

boot cd:,\\:tbxi
This was useful to me since my dvd image was not in .iso format (mine are in .cloop to save some space). Here is the complete command. Note "-boot c" does not inject the necessary open firmware commands (qemu v5.1.50)

Code: Select all

/usr/local/qemu-screamer/bin/qemu-system-ppc -L pc-bios -M mac99,via=pmu -cpu g4 -m 1024m
 -prom-env auto-boot?=true -prom-env boot-args=-v -prom-env vga-ndrv?=true
 -display gtk -drive file=macosx-10.5.img -cdrom mac-os-x-10.5.cloop -boot c
  
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by adespoton »

It's probably worth noting that QEMU can address block devices as raw storage, so you can attach but not mount your .cloop images and then have QEMU load the block devices as optical media. I do this with .sparsebundle bundles for my disk images, with startup and shutdown scripts to automatically attach and detach the images before/after running QEMU.
psh
Tinkerer
Posts: 47
Joined: Mon May 17, 2021 10:41 am

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by psh »

Hi!
i am trying to download the images from archive.org and oh boy its so slow!. Why i have this problem?
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by adespoton »

archive.org appears to throttle the connections if there's more than one from an IP address.
psh
Tinkerer
Posts: 47
Joined: Mon May 17, 2021 10:41 am

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by psh »

adespoton wrote: Tue Jan 11, 2022 3:08 pm archive.org appears to throttle the connections if there's more than one from an IP address.
I do think i had only one IP address
how the hell is that?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by Ronald P. Regensburg »

adespoton is referring to possibly more connections (more than one download) from that one IP address.
skjfhniasubcoivu
Space Cadet
Posts: 3
Joined: Sat Mar 12, 2022 8:27 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by skjfhniasubcoivu »

psh wrote: Tue Jan 11, 2022 1:29 pm Hi!
i am trying to download the images from archive.org and oh boy its so slow!. Why i have this problem?
You should use a download manager such as Free Download Manager to download from archive.org. It will be much quicker.
skjfhniasubcoivu
Space Cadet
Posts: 3
Joined: Sat Mar 12, 2022 8:27 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by skjfhniasubcoivu »

I have successfully been able to install Mac OS X 10.5.6 within QEMU and it runs just fine but I've updated a copy of the 10.5.6 image to 10.5.8 and it updated successfully but it's taking an absolute age to boot. So far I haven't got past the spinning wheel on the Apple logo but doesn't lock up it appears to be doing something as my CPU temp stays up by 10 degrees. Is there a reason it might not boot?
psh
Tinkerer
Posts: 47
Joined: Mon May 17, 2021 10:41 am

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by psh »

skjfhniasubcoivu wrote: Sat Mar 12, 2022 8:31 pm
psh wrote: Tue Jan 11, 2022 1:29 pm Hi!
i am trying to download the images from archive.org and oh boy its so slow!. Why i have this problem?
You should use a download manager such as Free Download Manager to download from archive.org. It will be much quicker.
is it safe?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by Cat_7 »

I have successfully been able to install Mac OS X 10.5.6 within QEMU and it runs just fine but I've updated a copy of the 10.5.6 image to 10.5.8 and it updated successfully but it's taking an absolute age to boot. So far I haven't got past the spinning wheel on the Apple logo but doesn't lock up it appears to be doing something as my CPU temp stays up by 10 degrees. Is there a reason it might not boot?
Usually the kext cache needs to be rebuild after such an update. That can take some time. However, an automatic restart (or even two) might also be part of the update procedure. Qemu will not do this, so you have to do that manually. After that, "speed" should be restored.

Best,
Cat_7
HilbertofIdeals
Space Cadet
Posts: 3
Joined: Tue Aug 31, 2021 9:42 pm

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by HilbertofIdeals »

Hi! I tried out your tips (the DVD image you provided works!) and followed the QEMU installation instructions, but for some reason I keep encountering this problem that keeps Leopard from installing. About a third of the way through the installation progress bar, the installer just shows a message that says it "could not validate the contents of the 'AdditionalSpeechVoices' package."

Here's a link to what I'm seeing: https://drive.google.com/file/d/1OVILYI ... sp=sharing

It's likely different from the issue you had where it said it couldn't make it boot from the hard disk, but I don't know where this issue is coming from or how to solve it. Does anyone know?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Two tips for installing Mac OS X 10.5 Leopard in QEMU

Post by Cat_7 »

Hi,

That might indicate something is wrong with your installer image.
You might try to install the minimum set of software by customising the installation and later on try to install additional software.

Best,
Cat_7
Post Reply