Virtual Machines & Binary Compatibilty

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Virtual Machines & Binary Compatibilty

Bjarne D Mathiesen
Q : Will this scenario work ?!?

If i create a VM of 10.6.8 in VirtualBox on my 2012 MacPro w/ Xeon CPUs,
can I then rsync my macports installation to a Core 2 Duo based Mac Mini
without any problems ?!?

--
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

Richard L. Hamilton-3
I don't know how it is now, but macOS/OS X clients on VirtualBox used to be a real pain to set up, starting with an ancient version of OS X and then updating to the desired level, with fingers crossed. Parallels (yearly subscription fee) is much better, but I know it does enforce the Server requirement (see next paragraph).

Also, for Snow Leopard, the OS license requires that OS and client both be OS X Server, and virtualization software will probably enforce that regarding the client (although by creating the right file in the image, it might be possible to fake having Server).  Good luck getting media for that.

Additionally, where non-identical CPUs are involved, I think some ports need to be built locally, because of the optimizations they do.  I think ffmpeg may be one, and one or more math libraries also; but I don't know of any authoritative list of those.  I think one might suppose that ports for which no prebuilt binaries exist (even for newer OS versions) might be among those, but I don't know of any straightforward way to construct an authoritative list of such packages, either.

There are a few files outside of /opt/local (or whatever installation directory), such as those in /Applications/MacPorts, and probably some in /Library/LaunchDaemons and/or /Library/LaunchAgents; maybe
a few others too.  One could in principle find them all by running port contents installed  and inspecting the output.

But even then copying installations from one machine to the other, unless they were the same year and model and CPU and of course OS version, would IMO be a really bad idea.

I haven't done it, but there are in general ways to build and package port binaries, which can then be made available to other machines.  There's probably documentation available for how to do that. Again, there will be ports for which that's not a good idea either. So expect to have to learn some things, dig around, ask more questions  etc, if you want to do it right. :-)  I don't have the answers, not having been involved in the creation of any of this, nor having had the need to pursue such things for myself, as yet.

> On Aug 31, 2019, at 15:13, Bjarne D Mathiesen <[hidden email]> wrote:
>
> Q : Will this scenario work ?!?
>
> If i create a VM of 10.6.8 in VirtualBox on my 2012 MacPro w/ Xeon CPUs,
> can I then rsync my macports installation to a Core 2 Duo based Mac Mini
> without any problems ?!?
>
> --
> Bjarne D Mathiesen
> Korsør ; Danmark ; Europa
> ----------------------------------------------------------------------
> denne besked er skrevet i et (næsten) M$-frit miljø
> MacOS X 10.13.6 High Sierra :
>   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
>   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
> MacOS X 10.6.8 Snow Leopard :
>   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
>   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
>

Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

Ken Cunningham
In reply to this post by Bjarne D Mathiesen
Sure -- almost all the buildbots run in VMs, after all :>

It runs VMWare, I believe Ryan has said.

The ports that are cpu specific are generally forced to build locally.

I use VirtualBox for 10.4 Intel and 10.6 32bit (and a bunch of older Windows systems -- windows95, windows98, windows2000, etc).

I use Parallels for 10.5 - 10.14. For 10.5 and 10.6 you need server editions of MacOS, as mentioned.

I use qemu for 10.4 PPC and 10.5 PPC on a MacPro 5,1, but that is really stretching it I guess ....

To share local archives, I do this:

https://trac.macports.org/wiki/howto/ShareArchives2

I have a huge library of > 800 ports built for 10.4 PPC, and more than that built for 10.5 Intel and 10.6/libc++ shared locally.


Ken

Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

Bjarne D Mathiesen
In reply to this post by Richard L. Hamilton-3
Richard L. Hamilton wrote:
> I don't know how it is now, but macOS/OS X clients on VirtualBox used to be a real pain to set up, starting with an ancient version of OS X and then updating to the desired level, with fingers crossed. Parallels (yearly subscription fee) is much better, but I know it does enforce the Server requirement (see next paragraph).

I've done a clean install from scratch of 10.13.x in VirtualBox.
The only limitation is, that you'll have to hard-code the screen-size.
It's also possible to port this to a WinTel 10 machine.

The reason I'm interested in using a VM for 10.3.6 is, that I'm
currently making my toolchain universal on a 32 bit Core Duo in order to
be able to rsync this to my 64 bit Core 2 Duo because
LibcxxOnOlderSystems currently is sevely broken ... and it's taking
🤬ages🤬. Also, the MacPro has 12 CPU cores / 24 threads, and it's
blisteringly fast when compiling clang & llvm et al.

Alternatively, I could use my Core i7 MacBook Pro if that's a better
choice CPU vise ?!?

--
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

Richard L. Hamilton-3
All other things being kind of equal, I think I'd favor a host for the VM whose CPU generation was at least as new as what the guest OS would have originally run on, but as close as possible, of the available hosts.  Mostly I'd suppose an older OS could ignore features of a newer CPU that it didn't use...mostly.  But at the OS kernel level, compatibility issues that can usually be ignored at the application level (unless one attempts CPU-specific optimization) may exist. So the closer host and guest native CPU generations, IMO the better.

Curious what you mean by "hard-code the screen size" for macOS/OSX on VirtualBox (not looking for Hackintosh, would be running on a macOS Mojave or later host).  Easy macOS guest (usually the latest in the first few weeks after full release) is my main reason for Parallels, although If I get my hands on a working Snow Leopard Server DVD (or maybe polish the one I've got so it's fully readable?), I'd like to virtualize Snow Leopard too (being the last with Rosetta, and on which some rather old software can run) too - my 2007 Mac Mini is getting very old and cranky.  If I could have both Snow Leopard and Catalina (when past beta) guests on VirtualBox, I wouldn't need to spend for Parallels (although Parallels Access is nice, not that I don't have free alternatives there too); VirtualBox does best for Solaris (since there are guest extensions for it) and ok for CentOS or Ubuntu (the other guests I mainly run), and decent even for OS's like Haiku (open source BeOS successor), ReactOS (open source OS aiming for Windows compatibility), and even Syllable and I think Kolibri (doesn't do Plan 9 nicely though, that one's disk driver is more ancient than anything VirtualBox handles well).  So there's not much that runs on x86/x86-64 that I've tried that VirtualBox can't handle, give or take pain getting macOS working on it.  I still think Parallels does Windows a bit nicer than VirtualBox, though.

But for really weird (IBM and Burroughs mainframes, PDP-11, Apollo workstation), it still takes emulators, since their CPUs are so different. I think I collect OS's.  That, or OD-ing on geeky nostalgia. :-)

> On Sep 1, 2019, at 01:27, Bjarne D Mathiesen <[hidden email]> wrote:
>
> Richard L. Hamilton wrote:
>> I don't know how it is now, but macOS/OS X clients on VirtualBox used to be a real pain to set up, starting with an ancient version of OS X and then updating to the desired level, with fingers crossed. Parallels (yearly subscription fee) is much better, but I know it does enforce the Server requirement (see next paragraph).
>
> I've done a clean install from scratch of 10.13.x in VirtualBox.
> The only limitation is, that you'll have to hard-code the screen-size.
> It's also possible to port this to a WinTel 10 machine.
>
> The reason I'm interested in using a VM for 10.3.6 is, that I'm
> currently making my toolchain universal on a 32 bit Core Duo in order to
> be able to rsync this to my 64 bit Core 2 Duo because
> LibcxxOnOlderSystems currently is sevely broken ... and it's taking
> 🤬ages🤬. Also, the MacPro has 12 CPU cores / 24 threads, and it's
> blisteringly fast when compiling clang & llvm et al.
>
> Alternatively, I could use my Core i7 MacBook Pro if that's a better
> choice CPU vise ?!?
>
> --
> Bjarne D Mathiesen
> Korsør ; Danmark ; Europa
> ----------------------------------------------------------------------
> denne besked er skrevet i et (næsten) M$-frit miljø
> MacOS X 10.13.6 High Sierra :
>   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
>   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
> MacOS X 10.6.8 Snow Leopard :
>   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
>   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
>

Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

Bjarne D Mathiesen
Richard L. Hamilton wrote:
> Curious what you mean by "hard-code the screen size" for macOS/OSX on VirtualBox (not looking for Hackintosh, would be running on a macOS Mojave or later host).  

Here are the links I collected when I VMed 10.13

https://tobiwashere.de/2017/10/virtualbox-how-to-create-a-macos-high-sierra-vm-to-run-on-a-mac-host-system/

https://www.howtogeek.com/289594/how-to-install-macos-sierra-in-virtualbox-on-windows-10/
You can do the CPU stuff on a Mac before transferring to WinTel

https://forums.virtualbox.org/viewtopic.php?f=8&t=85084#p404335

https://www.dedoimedo.com/computers/virtualbox-network-sharing.html

https://saintlad.com/install-macos-sierra-in-virtualbox-on-windows-10/


--
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

ryandesign2
Administrator
In reply to this post by Richard L. Hamilton-3


On Aug 31, 2019, at 14:32, Richard L. Hamilton wrote:

> Also, for Snow Leopard, the OS license requires that OS and client both be OS X Server, and virtualization software will probably enforce that regarding the client (although by creating the right file in the image, it might be possible to fake having Server).  Good luck getting media for that.

I have copies of Snow Leopard Server available for sale if anyone still needs it.


Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

ryandesign2
Administrator
In reply to this post by Bjarne D Mathiesen


On Aug 31, 2019, at 14:13, Bjarne D Mathiesen wrote:

> Q : Will this scenario work ?!?
>
> If i create a VM of 10.6.8 in VirtualBox on my 2012 MacPro w/ Xeon CPUs,
> can I then rsync my macports installation to a Core 2 Duo based Mac Mini
> without any problems ?!?

Some ports may detect optional CPU capabilities, and build themselves to use those capabilities. Such a port might not work on earlier CPUs. But we would consider that to be a bug in the portfile: we would want such optional CPU capabilities only to be enabled if the user selects a nondefault variant of the port (such as the +perf variant of gdal).

The buildbot virtual machines run under VMware ESXi on 2009 Xserve hardware, which has Xeon CPUs. If that were a problem for any users with Core / Core 2 / Core 2 Duo CPUs, we'd probably have found out by now.


Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

Bjarne D Mathiesen
In reply to this post by ryandesign2


Ryan Schmidt wrote:
>
> On Aug 31, 2019, at 14:32, Richard L. Hamilton wrote:
>
>> Also, for Snow Leopard, the OS license requires that OS and client both be OS X Server, and virtualization software will probably enforce that regarding the client (although by creating the right file in the image, it might be possible to fake having Server).  Good luck getting media for that.
>
> I have copies of Snow Leopard Server available for sale if anyone still needs it.

What's the price & delivery costs ?!? :-)

--
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
Reply | Threaded
Open this post in threaded view
|

Re: Virtual Machines & Binary Compatibilty

Richard L. Hamilton-3
I'm also interested, if you'd prefer to reply off-list.

> On Sep 13, 2019, at 19:33, Bjarne D Mathiesen <[hidden email]> wrote:
>
>
>
> Ryan Schmidt wrote:
>>
>> On Aug 31, 2019, at 14:32, Richard L. Hamilton wrote:
>>
>>> Also, for Snow Leopard, the OS license requires that OS and client both be OS X Server, and virtualization software will probably enforce that regarding the client (although by creating the right file in the image, it might be possible to fake having Server).  Good luck getting media for that.
>>
>> I have copies of Snow Leopard Server available for sale if anyone still needs it.
>
> What's the price & delivery costs ?!? :-)
>
> --
> Bjarne D Mathiesen
> Korsør ; Danmark ; Europa
> ----------------------------------------------------------------------
> denne besked er skrevet i et (næsten) M$-frit miljø
> MacOS X 10.13.6 High Sierra :
>   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
>   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
> MacOS X 10.6.8 Snow Leopard :
>   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
>   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
>