Highlighted
Contributor
Contributor

VMotion for Fusion?

Here's my use case/goal:

  • I have 3 macs (1 at work, 1 at home, 1 MacBookPro (MBP))

  • I will have an AppleShare volume on the mac at home, that I share to the other two. That will contain my VM disk images.

  • I want to have a VM that I move from machine to machine, based on where I am at the time.

  • The VM will run Mac OS X Server (but, only because I can't just run Mac OS X Client).

I'm pretty sure that the immediate answer is "Fusion doesn't do VMotion". But, just to be thorough, I want to be sure that that's true: Is there anything I can do (as an individual) to do soemthing like vmotion of a VM from one Mac to another, using VMWare Fusion?

DIdn't think so. So, here's my work around plan, and I'm hoping for insights about strategies and gotchas, and whether or not anyone has already done it (esp. with Applescripts, sh/perl scripts, and/or Automator workflows):

Script #1:

If that VM is running on the current host: tell the guest OS to close its networking, suspend the guest OS, and close the VM.

Script #2:

Start an SSH session to the home mac, port tunneling the AFP protocol.

Check that the AFP volume is mounted, if not, mount it. If it can't be mounted, exit.

Run Script #1 on the other two hosts, via SSH; if there's an error/failure, exit.

Start the VM. Un-suspend the guest OS. Bring that VM/Guest OS to the foreground.

Given the size of a virtual host disk image (it'll probably be 75 GB for the OS/Applications part, and then I'll might mount the home directory separately via AFP), I doubt it'll be practical to copy the disk image to a local file before running it. I do expect a lot of latency due to remote disk mounting. But, I also hope/expect that the interactive user interface will be much smoother and more usable than VNC.

Anyone done anything like that? Can anyone think of any gotchas? Anyone have any examples of the specific commands that would be necessary/useful? Is suspend really the thing I'm looking for here? What about snapshotting/etc. What safety things can I do to protect the integrity of the virtual machine? Any other thoughts?

0 Kudos
4 Replies
Highlighted
Immortal
Immortal

I'm pretty sure that the immediate answer is "Fusion doesn't do VMotion"

Fusion doesn't do VMotion.

If that VM is running on the current host: tell the guest OS to close its networking, suspend the guest OS, and close the VM.

Normally Tools tells the guest OS to release networking on a soft suspend, but I don't remember if it works for OS X guests in 3.1.1. If not, you're right, you need to do this part.

Script #2:

Start an SSH session to the home mac, port tunneling the AFP protocol.

Check that the AFP volume is mounted, if not, mount it. If it can't be mounted, exit.

Run Script #1 on the other two hosts, via SSH; if there's an error/failure, exit.

Start the VM. Un-suspend the guest OS. Bring that VM/Guest OS to the foreground.

This all sounds good.

But, I also hope/expect that the interactive user interface will be much smoother and more usable than VNC.

IMHO VNC isn't that bad over a fast link, though of course it depends on what you're doing (for example, video is right out). If you go the suspend/resume route, keep in mind that the second computer will have to read in the suspend file (probably at least a GB, maybe more depending on how you've configured the virtual machine) before it can do anything. Since it's easy to use Fusion's built-in VNC server (), I would try that before experimenting with more complicated scripts such as what you're proposing. Also take into consideration the performance impact of running a virtual machine off a network share.

Can anyone think of any gotchas?

You may run into issues if your computers have very different processors, e.g. suspending on a current Mac Pro and resuming on a 1st-gen mini, as the 2nd CPU may not have all the features the 1st did (and the guest will be unpleasantly surprised). Fusion will warn you about potential incompatibilities.

Anyone have any examples of the specific commands that would be necessary/useful?

If you're not already aware of it, look into /Library/Application Support/VMware Fusion/vmrun

Is suspend really the thing I'm looking for here?

Yes.

What about snapshotting/etc.

Snapshots don't help your use case. Actually, I take that back. If you had a base image synced across your Macs, then rsynced the delta files, that might work. It's a different approach, though, and I don't have time at the moment to write it up.

What safety things can I do to protect the integrity of the virtual machine?

What are you worried about with respect to integrity of the virtual machine?

0 Kudos
Highlighted
Immortal
Immortal

I agree with etung you should try VNC first to see how it works for you. If you are working with a Windows guest you should also try RDP. In my experience RDP over 1gbit LAN is very functional, and over the internet with 1Mbit upload its not too bad depending what your doing. If you are worried about security you could setup a VPN with something like openvpn.

RDP client for Mac:

Edit:

Since you are working with a mac guest, maybe Aqua Connect or xrdp? Never used them but I have had much better exierience with RDP than VNC so maybe worth a try.There is also Apple remote desktop which I think uses VNC.

http://www.aquaconnect.net/mac-remote-desktop.php

0 Kudos
Highlighted
Immortal
Immortal

There is also Apple remote desktop which I think uses VNC.

It's VNC plus some additions (e.g. different compression schemes).

I forgot to mention that unless you're going to be using the virtual machine on the second computer for long amounts of time, I would expect you to get better results via a remote desktop protocol because of the amount of data that needs to be moved, regardless of the link speed. A slow connection will cause any protocol to look/perform poorly, but it'll take forever to sync the changes regardless of whether you go with snapshots or suspend. A fast connection will sync quickly, but remote desktops will work better too.

johnkzin : Have you considered simply storing the virtual machine on an external drive? This will give you easy portability between machines, and you can even suspend, disconnect/reconnect the drive, and resume working.

0 Kudos
Highlighted
Contributor
Contributor

re: "Have you considered simply storing the virtual machine on an external

drive? This will give you easy portability between machines, and you can

even suspend, disconnect/reconnect the drive, and resume working."

I have. I'm considering a few different approaches. But, carrying around an external drive, especially to just attach it to my MBP, seems a little retro-awkward. (retro in that it's sort of "modern sneaker-net", and awkward in having to juggle a hard-drive tethered to my laptop, making it a little less smooth to just pick up the laptop on my way to a meeting or something). So, while it may turn out to be the solution that has the best performance, it's not the solution I'm hoping for.

0 Kudos