XZ - 03 Mac OS

XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils. We are living as nomad in Cyprus!! Install XZ Utils From Source. Cent OS Linux OS Mac OS Ubuntu. B1 Free Archiver opens/extracts xz/txz/tar.xz file on Mac. B1 Free Archiver is a free software for creating archive folder and extracting archive file. B1 Archiver works on all platforms - Windows, Linux, Mac and Android. The freeware supports most popular formats including xz/txz/tar.xz. B1 Free Archiver is compatible with: Mac OS X 10.9. Amazon.com: 1080p Webcam, Computer Camera with Microphone, Auto Focus Web Camera for Computers, Desktop, Laptop, 110 Degrees Wide Screen Video Calling Recording Streaming, Skype Web Cam for Mac OS X Win 10 8 7: Electronics.

Today's release of Python 3.3 includes the lzma module in the standard library for LZMA/XZ files, but it didn't work 'out of the box' under Mac OS X 10.8 Mountain Lion - it requires XZ Utils. This is how I installed it.
At the time of writing Python 3.3 doesn't come pre-compiled for Mac OS X 10.8 Mountain Lion (only older versions of OS X), so I built it from source (having installed XCode via the App Store for free). However, I had a warning about _lzma
  1. Get WinZip now to open your XZ file(s) then enjoy all that the world's most popular compression utility has to offer, including the easiest and most practical file compression, file protection and encryption, complete file management and data backup capabilities.
  2. The maximum version of Mac OS X, OS X, or macOS supported by each G3 and later Mac follows. For complete specs on a particular system, click the name of the Mac. For all Macs that are compatible with a specifc maximum supported version of Mac OS X - courtesy of EveryMac.com's Ultimate Mac Sort - click the OS of interest.
not being built, and the associated test_lzma.py was skipped.

Xz - 03 Mac Os Catalina

You have to install the XZ Utils library as well, I opted to do this under my home directory:

Xz - 03 Mac Os Operating System


$ curl -O http://tukaani.org/xz/xz-5.0.4.tar.gz
$ tar -zxvf xz-5.0.4.tar.gz
$ cd xz-5.0.4
$ ./configure --prefix=$HOME
$ make
$ make check
$ make install
Easy enough, and now (re)install Python 3.3 which I am also installing under my home directory:
$ curl -O http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz
$ tar -zxvf Python-3.3.0.tgz
$ cd Python-3.3.0
$ ./configure --prefix=$HOME
$ make
$ make test
$ make install
Done. Time for a quick check:
$ python3
Python 3.3.0 (default, Sep 29 2012, 19:41:44)
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> import lzma
>>> dir(lzma)
['CHECK_CRC32', 'CHECK_CRC64', 'CHECK_ID_MAX', 'CHECK_NONE', 'CHECK_SHA256', 'CHECK_UNKNOWN', 'FILTER_ARM', 'FILTER_ARMTHUMB', 'FILTER_DELTA', 'FILTER_IA64', 'FILTER_LZMA1', 'FILTER_LZMA2', 'FILTER_POWERPC', 'FILTER_SPARC', 'FILTER_X86', 'FORMAT_ALONE', 'FORMAT_AUTO', 'FORMAT_RAW', 'FORMAT_XZ', 'LZMACompressor', 'LZMADecompressor', 'LZMAError', 'LZMAFile', 'MF_BT2', 'MF_BT3', 'MF_BT4', 'MF_HC3', 'MF_HC4', 'MODE_FAST', 'MODE_NORMAL', 'PRESET_DEFAULT', 'PRESET_EXTREME', '_BUFFER_SIZE', '_MODE_CLOSED', '_MODE_READ', '_MODE_READ_EOF', '_MODE_WRITE', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__initializing__', '__loader__', '__name__', '__package__', '_decode_filter_properties', '_encode_filter_properties', 'builtins', 'compress', 'decompress', 'io', 'is_check_supported', 'open']
>>> quit()
Next will be to explore if this is actually useful for things like compressed sequence files.
Note for older versions of Python (which don't come with the lzma module), you can install PylibLZMA instead (PylibLZMA SourceForge page), which requires LZMA Utils (although I haven't tried that yet - my first attempt failed at the compile stage). Update - could perhaps try PyLZMA too (PyLZMA GitHub page)? Note these don't seem to support the XZ format.
Update
I've started a backport of Python 3.3's lzma module, currently working on Python 3.1, 3.2 and 3.3 (Mac OS X and Linux), so that I can use both LZMA and XZ files on older versions of Python.
Update
Fixed XY <-> XZ typos.
MacUpdate (Jan 2013)
I've just made the first public release of my lzma backport on PyPI, tested under Python 2.6, 2.7 and 3.0 to 3.3 on Mac OS X and Linux. Windows support is pending...

I always wanted to have an always-on Mac OS X machine which I could run Jenkins on to build and test iOS apps. While I have an old MacBook Pro I could use, I’d rather not have another computer running 247, especially one which would receive so little use.

While OS X runs in VMWare (with some hacks) and VirtualBox, it can also run on KVM with a few patches thanks to Gabriel Somlo’s excellent work. He just updated his site around a week ago and mentions that Mountain Lion runs well. Seems like the perfect time to try it out!

Patched QEMU + KVM + SeaBIOS…

Either follow the excellent instructions on Gabriel Somlo’s site to patch and compile the required components yourself, or if you happen to use Ubuntu 12.04, I’ve prepared some binaries which should speed the process along.

Using the Pre-Compiled Binaries

First, you’ll need libpixman-1-0 to run QEMU.

Download and unpack the binaries.

Copy and load the patched KVM modules.

Blank Drive Image

You can use qemu-img to create a blank drive image or use a zvol, actual device, whatever.

Mac OS X Installation Disc Image

I’m using Mac OS X Mountain Lion 10.8.5 for this. It’s important to have a clean disk image, not a hacked osx86 image because some of the kexts on the hacked images will cause a kernel panic on boot. It’s best to use the InstallESD.dmg located inside of the Install OS X Mountain Lion.app bundle.

The image needs to be an ISO file. If you have a DMG image then you can use Disk Utility’s “Convert” feature to make an ISO image (.cdr by default, but it’s the same thing).

VNC Client

Chicken is a great VNC client for OS X. It even supports creating an SSH tunnel automatically which is very handy.

OSK Key

The AppleSMC device needs a valid OSK key to function. This key is the same in all Macs and can be easily retrieved.

For OS X users, the Mac OS X Internals website has the source code to a program which can retrieve the key. I’ve included a binary of it in the above download.

For Linux on Mac users, Gabriel Somlo’s site has a C program which can retrieve this key.

Now connect over VNC and you should see the Chameleon boot prompt.

You can use -v for a verbose boot which can aid in troubleshooting. If you get a kernel panic here, make sure your OS X iso image is clean, not a hacked osx86 image.

If your terminal is filled with usb-kbd: warning: key event queue full and the keyboard doesn’t respond, just try again. While the keyboard works reliably once OS X boots, it sometimes has problems on the Chameleon boot prompt.

Hopefully the installer should just start right up.

Continue with the installer and start up Disk Utility to partition your drive.

Close Disk Utility and continue with the Reinstall OS X option. Install to the disk partition you just created.

The installer will reboot and put you back on the Chameleon prompt. Choose the (Installer) Macintosh HD partition to continue with the install.

The install will continue and reboot once more. Choose the Macintosh HD drive in Chameleon again to configure the install. I skipped setting up an Apple ID and registering.

Now you should have a mostly functional Mac OS X installation!

…though as you can see, it’s not exactly perfect.

Energy Saver

Disable “Computer sleep” and “Display sleep” in the System Preferences. Resuming from sleep doesn’t work and will cause the virtual machine to lock up.

Absolute Mouse Positioning

Most KVM guests can make use of the tablet device to synchronize the position of the mouse with it’s position over the VNC window. OS X, unfortunately, does not support this device.

If you enable OS X’s internal screen sharing and use it in place of QEMU’s VNC server then mouse positioning works perfectly. You can allow normal VNC viewers to connect by clicking on “Computer Settings…” in the Screen Sharing options.

Networking

The patches to QEMU include fixes to make the e1000 device work under OS X. To enable it for bridged networking, add a network bridge for KVM just add something like the following to the QEMU command:

Virtio

There is a virtio-net driver for Mac OS X which works great. Just install the driver, shutdown, and change the NIC model from e1000 to virtio in the QEMU command.

Display

QEMU emulates a Cirrus Logic GD5446 video card by default. Which this works fine over QEMU’s VNC server (though with a low color depth), the display glitches when using OS X’s Screen Sharing feature.

QEMU also supports the vmware video card. There’s even a VMsvga2 driver for it on OS X. However, this driver caused a kernel panic on boot so this option too fails.

The best option that I have found is to use the std video card.

Chimera

Chimera is a bootloader which was forked from Chameleon. It’s easy to install and will allow us to boot to OS X automatically and remove the -kernel argument to QEMU. Download and install Chimera to get started.

org.chameleon.boot.plist

To automatically boot into OS X without needing to press enter at the prompt, edit (create) the org.chameleon.boot.plist file at /Extra/org.chameleon.boot.plist. A simple example to automatically boot would be:

The EthernetBuiltIn and PCIRootUID keys fix the “Your device or computer could not be verified. Contact support for assistance.” error when logging in to the App Store.

smbios.plist

There’s another configuration file for Chimera, /Extra/smbios.plist. While I haven’t found a need to edit it personally (the App Store works fine without it), it can be used to change what model Mac the system identifies itself as as well as its serial number. There’s plenty of documentation as well as apps which help you edit the file.

Running

After the above steps, here is the command I use to boot the virtual machine:

Overall, I’m very satisfied with running OS X on KVM. It performs more than well enough for my needs, seems to be stable, and doesn’t seem to waste excessive CPU cycles on the host.