Galcon Games
Phil Hassey - game dev blog
Phil Hassey as Rambo
".. I've been there,
I know what it's like,
and I'll do it again if I have to."

OS/X and virtualization

Hey .. so I got myself a MacBook Pro.  Here’s why:

- I found that at pycon, having linux on my laptop just didn’t work so hot.  Just too many driver issues to really make it be great for day to day use.

- I really would like to be able to do all my dev from one machine.  With a Mac “supposedly” I can work in Windows, Linux, and OS/X from the same machine.  Then, gee, I wouldn’t have to have my house cluttered up with so many computers.

I got the machine a few days ago.  Since then I’ve been playing around with my different options for realizing the “one machine” vision.  Here are some of my experiences so far:

Parallels Desktop

- I was able to install XP Pro easily.  Had a minor mouse related glitch when running Microsoft Office Live Meeting and sharing my desktop.  Tried playing Vampyre Story (a new adventure game by Bill Tiller!), this didn’t work.  Game crashed during the startup of the game.  So I guess the DirectX promises are a bit shallow.

- I was able to install Ubuntu 8.10 and 8.04.  However, in 8.10, the shared disk was useless.  In 8.04, the VM hangs after a while for no particular reason.  Most of these issues seem to be well covered in the Parallels forums.  So it seems that Parallels is useless for Linux stuff .. at least for Ubuntu, which is the distro I want to switch to for dev, since it’s most likely to be used by a Linux gamer.

- I tried interacting with their support and found that they appear to be using babblefish to translate my questions to their foreign staff who then type in an incoherent answer which is then translated back to English.  Somehow it didn’t seem worth the bother.

- If they fixed the Linux VM hang issue, it would be an excellent solution for all my VM needs.  

Crossover Games

- I tried to run Vampyre Story.  It didn’t even get through the installer before locking up and anytime I put a disk into the computer it tried to interact (weird default setting, I was able to switch that off).

- Not really useful to me.  I suppose it could be good if your game of choice is supported.

VMWare Fusion

- I was able to install XP Pro easily.  It auto-installed its Tools.  Sound seemed to work better in this than in Parallels.  Vampyre Story failed exactly the same way as in Parallels.  I suspect they have some common code for doing the DX9 emulation.  Too bad it doesn’t work for my game of choice.  Hopefully the 3D is good enough for my game dev, which isn’t so bleeding edge.

- I was able to install Ubuntu 8.04 on it.  The handing of Fullscreen vs. Windowed mode isn’t nearly as smooth as in Parallels.  One real drawback is that if I have both Windows and Linux in Fullscreen mode, Fusion attempts to put them both on the same “Space”, so I can really only have one in Fullscreen mode at a time.  That is non-awesome.

- If it weren’t for the Fullscreen issues, this was looking like an excellent solution.  I guess I’ll have to wait and see if Parallels or VMWare fixes issues quicker.  It does seem that VMWare has a better commitment to Linux support, which is hopeful.

Boot Camp

- OS/X comes with “Boot Camp” which allows for Dual booting of your machine into OS/X or Windows.  It works great if you don’t mess up.  It took me three tries to get Windows XP Pro installed properly.  (HInt: read the Apple troubleshooting guide BEFORE you try to run Boot Camp, not afterwards.)

- I was able to play Vampyre Story with no problem.  The game looks great!

- I haven’t tested much else, but since it’s just booting into Windows, I’m guessing it will work fine.  When running Vampyre Story the fan is on most of the time.  I guess all those pretty graphics really tax something or other.

Misc Thoughts

Both Parallels and Fusion support shared disk, which I’m hoping works.  It won’t be until I really dive into some dev that I’ll be able to comment on that.  Nice stuff, anyways.  

I do hope this all works out, as I really want to trim down the amount of machinery I have in my office.  I think my favorite experience so far was getting Parallels doing fullscreen for both Linux and Windows.  With OS/X Spaces, I was able to switch between OS/X, Windows, and Linux with the press of a key. 

Battleplan

I’m basically taking off a few weeks from game dev to mess around with this machine.  Some of the things coming up are:

- Figuring out how to deal with python under OS/X.  If anyone cares to give me tips in advance, I’d sure appreciate it.  I’m aware there are at LEAST 3 major ways of doing this.  1. Use the included python 2. Use the python from python.org 3. Use darwin 4. Use macports .. Or something like that.  I’m not sure which will be best for my situation.

- Trying out the iPhoto, iMusic, Garageband, and iMovie software.  Linux has always lacked on the “use to use junk” front .. and Windows isn’t much any better.  So hopefully these tools will be nice.

- Figuring out a decent backup scenario.  I’m aware of timemachine, which I’m sure is great .. But I’m interested in having shared folders across several machines .. and doing backup to a 3rd machine.  We’ll see what I can come up with for that.  I’m quite comfortable with rsync, so I wouldn’t be surprised if that comes up.  Any suggestions would also be appreciated here.

16 Responses to “OS/X and virtualization”

  1. Rene Dudfield Says:

    hey,

    vmware seems to be ok for webstuff… but for graphics stuff not so good.

    Try not to mess too much with the system python, since system stuff uses it apparently. So best to keep it separate, I’ve found… especially when upgrading versions of osx.

    macports is cool! You can get heaps of FOSS software quite easily with it.

    I mostly use the python.org python, but also the macports python is also good. I don’t think python.org have made a binary for 2.6/3.0 yet, so sticking with 2.5 is the way to go.

    mac gvim is quite nice now… however you’ll need to mess around with config a bit.

    cu,

  2. Rene Dudfield Says:

    oh, I forgot to mention clonezilla… for full system backups.
    http://renesd.blogspot.com/2008/12/backup-tools-clonezilla.html

    Mac has the lovely time machine too… but only useful for the mac part.

    With vmware you can make snapshots of the virtual systems too.

  3. David Goodger Says:

    Have you tried Sun’s free VirtualBox?

  4. Ben Says:

    I’ve used both VMWare and Parallels in the past, but not very heavily. I recently switched to Sun’s VirtualBox and have been happy with it. It’s free (open source) and cross-platform (I use it under Mac OS X and Linux to virtualize Windows and Linux.)

  5. philhassey Says:

    I briefly checked out virtual box .. But not in much detail. Since I’m doing gamedev, I really want OpenGL under windows working.

    But maybe I’ll give it a spin just to see how it compares.

  6. Jonas Beckman Says:

    I frequently use Ubuntu and Windows XP under Fusion on my Macbook Pro. After using it for more than a year I still like Fusion – and Vmware is still improving it (especially for Linux users). As Rene also pointed out, snapshots are very useful for developers and Vmware has lots of experience with that.

    I switch between spaces with full screen VM:s all the time. There are issues: sometimes you have to drag VM:s to the space you prefer on startup. But then they stay put. Also, use the mac system settings for spaces and assign Vmware to some space other than 1 – that helps.

    A friend of mine uses Virtualbox (which is free) to run Linux and Windows on his Mac. So that is another alternative. But personally I don’t think VirtualBox is stable and polished enough.

    PS. For full system backups I have found SuperDuper very reliable and easy to use.

  7. philhassey Says:

    Jonas: Yeah, I’ve gotten it onto a separate space .. but when I’m trying to have two VMs fullscreen, even if I start out the VMs on separate spaces, when I switch them to fullscreen, they both jump onto the same space.

    Got any tips? Am I doing something wrong?

  8. Jonas Beckman Says:

    No, I am sorry. I cheat. :-) I always start out fullscreen and leave them in separate spaces most all the time. That works best. I find it annoying but no dealbreaker. YMMV, of course.

    Sometimes I do things like go into unity mode and drag’n'drop stuff between the Windows Explorer and the Mac Finder. That works. And Vmware’s virtual networking is pretty solid, so intra-VM communication works well.

    The Spaces issues may have to do with the lack of a good Apple API. See this forum thread: http://communities.vmware.com/message/1105434#1105434. I know that other Mac developers have said similiar things about Spaces currently being hard to use programatically.

  9. philhassey Says:

    Jonas: Thanks for the tip .. I was able to get both in fullscreen in separate spaces. I’ll just have to figure out the correct “order” to do things in to make that happen. :)

  10. nat Says:

    For Python, I’ve found that the .dmg framework installers are the cleanest option. There’s no dmg for 3.0 yet, but you can still do a framework install from source. Kumar McMillan has some nice instructions for that here: http://farmdev.com/thoughts/66/python-3-0-on-mac-os-x-alongside-2-6-2-5-etc-/ Framework installs won’t clobber each other at all, and you get the separate version-named executables (python25, python26, etc).

    For anything more complicated than, say, wget, I find MacPorts to be a huge pain in the ass. Definitely don’t use it to install python, and I’d really recommend against using it much at all.

  11. Arthur Says:

    I absolutely don’t agree with what nat said. I use MacPorts for almost everything, including Python 2.4/2.5/2.6.

    The included Python is nice but slightly outdated. If you want to run the latest release of a Python version you either have to install the dmg files from the Python website or use MacPorts to compile Python from source. Both methods work fine.

    The question is if you want to use MacPorts to install other Python related packages or not. Lxml is a good example, it’s a PITA to install it without MacPorts, but when you install it with MacPorts it will also try to install the python package because it has it as a dependency.

  12. AN Says:

    Have run both Fink and MacPorts in the past with preference for the latter for most things. However ive gotten over both and rarely use them much today compared to three years ago. Found MP easier to use in the past ad far as less issues.

    As you have found the full DX experience requires bootcamp, with virtualization promissong much but delivering little. Have started out a parallels user but judy switched recently to Fusion. Run virtualbox at work on XP for ubuntu and had some issues but overcame them. My officemate did the same for Vista and gave up. They all have their own unique issues. What I do is bootcamp for bare metal DX and then use Fusion to copy bootcamp to a file on OsX to play with on a daily basis where lots of use of snapshots let’s mybmachine stay clean and clear with only a few seconds wait to restore a snapshot if something serious stuffs up or XP hoses itself or catches any malware.

    I now use python org framework install on OSX exclusively with a lot of help from virtualenv, a macified version of faces virtualenv bashwrappers and of course iPython and whatever your fab editor and completely gone off needing a GUI IDE. There used to be an issue with deadline supper in Leopard for iPython but that’s taken care of so no worries there anymore (gnu versus bsd).

    I have not not found a need to install Ubuntu as it’s already on my work machine. Windows is around only to test out WMI and Win32 code I have which are all Windows services coded in Python. Ubuntu keeps me same at work but I don’t feel a draw to install it on my mac as most of the rest of my python code is platform agnostic. Might be different if it weren’t.

    Enjoy the machine, they’re grest and Ive not found anything better. Of course for the rest of the OSX experience apple provides tons of tutorial movies onnline though playing around is best.

    Cheers,
    AN

  13. Andy Says:

    A few things I’ve found very useful:

    Carbon Copy Cloner – you can “clone” your hdd, leaving you with a bootable identical copy of the drive. Also, unlike the free version of super duper, it can copy just the diffs. It usually takes me about 20-30 minutes to make my weekly backup.

    Drobox – sign up at getdropbox.com and you can share files between mac, windows, and linux. It makes a “dropbox” directory, and all changes are synced instantly across systems. It is a really nice service, and it just works.

    If you use emacs, you will want to do this:
    http://code.google.com/p/git-osx-installer/
    git clone latest emacs source
    ./configure –with-ns
    make -j3
    sudo make install
    then copy the emacs.app into your applications folder

    Enjoy your mac.

  14. Ari Says:

    A way that works for me:

    1) Leave the OS X python as it comes. Never, ever do anything that could disturb its peace.
    2) Install macports, and it should go cleanly into /opt/local/
    3) Make sure /opt/local/bin is in your user’s path before /usr/bin/ (where the system python resides). This is not default, you have to do it by yourself.
    4) When you install libraries and other stuff, make sure everything always goes to /opt/local.

    Of course similar approach with non-macports distributions is possible, but macports is a big win if you need a selection of libraries available through macports.

  15. Richard Jones Says:

    Avoid fink as long as possible. I ended up reinstalling OS X on an old laptop in order to get rid of it it’d gotten itself so badly tangled with the rest of the OS.

    My wife’s mac is backed up using a simple script fired off by SleepWatcher (google finds it). It fires whenever she wakes her laptop up and if there hasn’t been an rsync in the past 24 hours it runs one.

  16. philhassey Says:

    Hey, thanks everyone for the tips. I’m going to be messing around with this stuff over time so I’ll post more as I figure things out.

    Sounds like the vote is MacPorts over fink, given the choice ..


Galcon   Watermelons   Dynamite   The Hairy Chestival
All content of imitation pickles (c) 1999-2008 - Phil Hassey  "we care"