Archivo de la etiqueta: Debian

MacOS Xen: Snow Leopard as guest on a Xen domU

Some days ago I started trying to get MacOS X to run as a virtual machine on Xen. After all if the OSx86 guys are getting it to run on normal PC hardware, why not on virtual hardware?

There’s not much info available and most of them is incomplete. The more accurate sites I could find were:

Some notes:

  • I’m using Debian Squeeze with the bundled Xen 4.0 for the hypervisor and the dom0. The server si a cheap (~300€) PC with a DualCore E5700 @3Ghz and 4Gb of RAM. Other versions of Xen may need different options or have a slightly different config file syntax.
  • I assume you already know how to configure a Xen domU, access it through Xen’s built-in VNC server, etc.
  • Instead of using the original Snow Leopard DVD and then patching like here, I’m taking the easy road using iATKOS S3 v2 which is already upgraded to 10.6.3 and bundles several the OSx86 patches.

My /etc/xen/hackosx.cfg file is a mix of those on the previously mentioned pages:

kernel = "/usr/lib/xen/boot/hvmloader"
memory = 512

name = "hackosx"

vif = [ 'type=ioemu,ip=,bridge=xenbr0' ]
disk = [

# first boot from disk, then from cd if that fails


Fix the path to the HD image file/dev and the iATKOS ISO if you need.

So, let’s begin:

  • On the dom0 run “xen create /etc/xen/hackosx.cfg” and access it via VNC.
  • Run Disk Utility and partition the virtual HD. Return to the installer.
  • On the screen where you select the destination HD, click the customize button on the bottom left. Besides the default options (on the screenshot) I also selected the following (NOT on the screenshot and NEEDED for OS X to run on Xen):
    • Patches->Modified Kernels->qoopz 10.3.0
    • Drivers->Main Hardware->SATA/IDE->Intel SATA/IDE
    • Drivers->Main Hardware->PS/2->Apple PS/2
    • Drivers->Network->Wired->Realtek->RTL8139

    iATKOS default options

  • Continue with the installation.

The installer proceeds normally until the end. In my case it gets stuck in “Remaining time: 8 minutes approx.” so after a while seeing the progress bar not… well… progressing, I went to the dom0 and restarted the virtual machine. Note: I had to re-install several times until I got the right options and the installer hanged for me at that point always.

Despite the unfinished installation, access again the VM after restarting it with VNC. This time you’ll see the usual OS X 1st time wizard configuring the language, time zone, user account, etc. Yay!

Now, on to the upgrade to 10.6.6:

If everything worked as expected, now you’re running MacOS X Snow Leopard updated to 10.6.6 on a Xen domU. o/

Some additional details:

  • Network performance with the default OS X RTL-8139 driver is TERRIBLE (at least right after installing iATKOS, before upgrading to 10.6.6). Follow these instructions to replace it.
  • If you go to apple menu on the upper left corner and then “About this Mac”, the Finder restarts and you don’t get the About window. :-/ Nevertheless the system is upgraded: “uname -r” says 10.6.0 (same as in my MacBook Pro) and the App Store is installed.
  • Run Software Update. There’s a Safari update, a Java one and an iTunes one. ;-) (yes, Software Update works and these upgrades don’t break any of the MultiBeast patching).
  • Install VineServer (it’s free). Is a much better VNC server than the one integrated in Xen and more compatible/standard than the one bundled in OS X.
  • Disable power saving in System Preferences -> Energy Saver. When the virtual OS goes into power saving I don’t know how to wake it, you can VNC to it but it’s completely unresponsive. Maybe there’s a fix, iATKOS and/or MultiBeast have a fix for power saving (not for Xen of course, but maybe it helps) and Xen’s config seems to have some options for power management.

Enjoy. :-)

March 23th update: Apple released the MacOS X 10.6.7 upgrade yesterday. I’ve just tried to install it through Software Update and it works. No need to run MultiBeast even.

Grande Debian, y grande screen

Este finde pasado he actualizado la Debian del Slug de Etch a Lenny. En remoto desde Alicante, a ratos y a lo largo de los tres días (viernes-domingo). XDDD

Cómo molan dos cosas:

  • dist-upgrade de una plataforma no sé si minoritaria, pero desde luego menos extendida y probada que i386, sin problemas. Todo a la primera. Yay!
  • screen. En remoto con una hardware tan justito y lento como el slug hubiera sido imposible. Con screen: abre sesión, “aptitude full-upgrade”. Apaga el ordenador, cena con amigos, vuelves a casa, ssh, screen … mira, pregunta algo. Respondes. Apagas y a dormir. Al día siguiente otra vez … luego desde casa de un colega …

Son pequeños detalles que al final te acostumbras a ellos y creo que no los valoras en su medida, si no te paras a pensar lo coñazo que hubiera sido tener que reinstalar, que la actualización no fuera bien y al reiniciar no arrancara, o no haber podido ir entrando y saliendo de la sesión durante tres días sin tener que mantener el ordenador encendido y la conexión ssh abierta (y sin cortes con un 3G de Yoigo!).


Mi nuevo servidor

[spanish]Señores, señoras, les presento a mi nuevo servidor del que he hablado estos días:[/spanish]
[english]Ladies and gentleman, let me please introduce you to my new server, the one I’ve been blogging about lately:[/english]

dscf0042.JPG dscf0044.JPG

[spanish]¿Qué? ¿Que no lo veis? ¡Si hombre! La caja ésta gris encima del disco iomega, ligeramente más grande que la Fonera

Para el que no conozca éste chisme ya, se trata de un Linksys NSLU2, un pequeño cacharro que cuesta unos 80€ y trae dos puertos USB2 y uno ethernet, permitiendo pincharle discos externos USB y hacerlos accesibles por la red en plan NAS. Y lo mejor de todo: se le puede flashear el firmware cambiándolo por ¡¡una Debian!! :-D

No es muy potente, lleva un procesador XScale (ARM) a 266Mhz y sólo 32Mb de RAM, aunque hay páginas que explican cómo ampliarle la memoria hasta 256Mb. Pero bueno… hace su papel, y sobre todo es pequeño, no ocupa lugar, no hace ruido y apenas consume electricidad.

Yo por ahora lo tengo con todo ésto y aguanta (tira de swap bastante, eso si):


What? You don’t see it? Yes! The small grey box on top of the iomega disk, slightly bigger than the Fonera

In case you don’t know it yet, it’s a Linksys NSLU2, a small device around $100 that comes with two USB2 ports and an ethernet connection. Plug an external USB hard drive to it and it’ll become available over the network like a NAS share. And the best part is: you can flash its firmware and install Debian!! :-D

It’s not that powerful, it has an XScale (ARM) processor at 266Mhz and only 32Mb of RAM. There are pages explaining how to install up to 256Mb. Nevertheless, it works and is small, doesn’t make noise, and has a small electrical consumption.

Up to now I’m running the following on it and it works quite well:



# cat /proc/cpuinfo
Processor	: XScale-IXP42x Family rev 2 (v5l)
BogoMIPS	: 266.24
Features	: swp half fastmult edsp
CPU implementer	: 0x69
CPU architecture: 5TE
CPU variant	: 0x0
CPU part	: 0x41f
CPU revision	: 2
Cache type	: undefined 5
Cache clean	: undefined 5
Cache lockdown	: undefined 5
Cache format	: Harvard
I size		: 32768
I assoc		: 32
I line length	: 32
I sets		: 32
D size		: 32768
D assoc		: 32
D line length	: 32
D sets		: 32

Hardware	: Linksys NSLU2
Revision	: 0000
Serial		: 0000000000000000

# free
             total       used       free     shared    buffers     cached
Mem:         29988      28988       1000          0        404       4808
-/+ buffers/cache:      23776       6212
Swap:       979924      41164     938760

# uname -a
Linux eliza 2.6.18-6-ixp4xx #1 Tue Feb 12 00:57:53 UTC 2008 armv5tel GNU/Linux

# pstree
     |         |-kblockd/0
     |         |-khubd
     |         |-3*[kjournald]
     |         |-kmirrord
     |         |-kpsmoused
     |         |-kseriod
     |         |-kswapd0
     |         |-2*[pdflush]
     |         |-scsi_eh_0
     |         `-usb-storage
     |            `-svscan-+-supervise---dnscache
     |                     |-3*[supervise---multilog]
     |                     |-supervise---tinydns
     |                     `-supervise---mlnet---mlnet---mlnet

netatalk de Debian y MacOS X Leopard

[spanish]Estoy instalándome un nuevo servidor de archivos en casa (frikada… ya contaré más cosas otro día) y al instalar netatalk no conseguía conectar desde el portátil con MacOS X Leopard, daba error al introducir el usuario y contraseña.

Resulta que hay que recompilar el paquete netatalk, más información y un step-by-step en: Make Netatalk talk to Leopard (Mac OS X 10.5)
[english]I’m installing a new fileserver at home (more on this one of these days…) and after installing the netatalk package I wasn’t able to connect to it from MacOS X Leopard, it returned an error after the user/pass prompt.

Googling about it I’ve found that you need to recompile the netatalk package, more info on this and a detailed step-by-step here: Make Netatalk talk to Leopard (Mac OS X 10.5)[/english]