Using Migration Assistant in 10.9 Mavericks from Disk Images

So, our SOP for migrating users to new computers is to create a disk image of their old computer. This is the very first thing we do. There are two reasons for this. First it gives us a safety net incase we do something really stupid that wipes out their original data before we have imported it (yes, that has happened). Second, it is actually faster.  Not much, but enough to make it worthwhile. We also keep this image around for at-least one month just in case we missed something during the import process.  We keep them around longer if space is available, but we will not delete them before one month is up.

After the disk image is created and the computer base image has been installed, we normally mount the disk image and run Migration Assistant to import their user account.  Only that doesn’t work in 10.9 Mavericks any more (actually I think it is broken in 10.8.5 as well). The reason is simple, although a bit frustrating that Apple didn’t account for this.  The new Migration Assistant logs the current user out before starting. I’m sure there are very good reasons for this.  But a side effect is that Mac OS X, rightly so, unmounts all user-mounted disk images when the user is logged out. This means the disk image containing the old computer data is unmounted as well, which is why we can’t find it in Migration Assistant.

I found a solution via some command line tools.  It is easy, but unfortunately takes some documentation since it isn’t something you are likely to do that often. So, fire up the Terminal app and use this simple (but not easily remembered) command:

sudo hdiutil attach /Path/To/Image.dmg

The hdiutil command will mount the disk image.  The sudo part, if you are not familiar with it, will run the command as the root user. When a disk image is mounted as the root-user it is not automatically unmounted at logout, which makes it available to Migration Assistant. And since Migration Assistant also runs as the root user, this is fine since it can still access all the data it needs.

17 comments for “Using Migration Assistant in 10.9 Mavericks from Disk Images

  1. Glenn Foster
    November 23, 2013 at 7:39 pm

    I certainly appreciate your suggestion of getting a Time Machine .dmg to show up on the migration assistant in Mavericks.

    Unfortunately I get the following response in Terminal:
    “hdiutil: attach failed — No such file or directory”

    The disk image on the desktop opens normally. I would appreciate your suggestions.
    Thanks,
    Glenn Foster

  2. November 23, 2013 at 7:50 pm

    That error indicates that the path and/or filename is not correct. You may have spaces or other special characters in the path or filename that need escaping. I recommend typing the following into Terminal: “sudo hdiutil attach ” (including the space at the end, and not pressing enter yet). Then drag the DMG file from your Desktop into the Terminal window. It will automatically add all the escaping needed for special characters. Then you can press enter/return and it should work correctly.

  3. Glenn Foster
    November 23, 2013 at 9:33 pm

    Daniel,
    Many thanks for your prompt response.
    After dragging over the DMG file, the terminal says
    “Checksumming whole disk (Apple_HFS : 0)_” and doesn’t ask for password.
    The Time Machine.dmg does not appear with the Migration Assistant.
    Sorry

  4. November 24, 2013 at 7:42 am

    Not asking for a password is normal unless you built the DMG with a password (very uncommon). But maybe you better tell me what you are trying to accomplish. Why are you trying to mount a Time Machine.dmg? If you made a DMG of a Time Machine disk I’m not sure that will work with this process. Migration Assistant expects to connect to a Time Machine server when doing Time Machine restores; or it expects a fully functional installation when restoring from a disk image/hard drive.

    If the DMG appears as a mounted disk image on your Desktop then the Terminal command worked (which it sounds like it did) and Migration Assistant just isn’t looking at the drive since it sounds like it isn’t a full-working installation.

  5. Glenn Foster
    November 24, 2013 at 8:23 am

    Good morning Daniel,
    What I am “trying to accomplish” is to transfer my programs and files from the External Hard Drive (Seagate 3 TB) that I used on the OS 10.8.5 installation on a (since erased) hard drive on my MacMini 5,1 (16GB RAM) to a second hard drive on the Mini to which I’ve installed Mavericks.
    When I saw your article on getting the Migration assistant to see a .dmg, I was hoping the migration assistant would see the Time Machine.
    On the Seagate external hard drive, I have two partitions, a small one with a duplicate OS 10.8.3 start up, and the large Time Machine partition. The migration assistant sees the Start-up partition just fine, but not the Time Machine one.
    If all else fails, I might be able to transfer the material manually to the new system, but it would be tedius and probably less effective.
    Thanks,
    Glenn

  6. November 24, 2013 at 5:21 pm

    Gotcha, now I get what you are trying to do. The only three possibilities I can think of is to do the same as you did before (mount the DMG from the Terminal) and then try telling Migration Assistant to restore from a Time Machine backup and see if it by chance detects the DMG as a Time Machine disk.

    The second option would be to use a second Mac. If you attach the DMG to another Mac and then turn on File Sharing, you should be able to connect to that Mac and see the TM volume, and hopefully Migration Assistant would see that as a valid TM source.

    The last option would be to use a spare HDD and restore the TM volume from the DMG to that HDD which Migration Assistant should for sure see it as a valid volume.

    Hopefully one of those options is available to you and will work. I know Apple does some wonky stuff with Time Machine and they expect things to be a very specific way/format.

  7. Glenn Foster
    November 24, 2013 at 6:23 pm

    Daniel,
    Many thanks for your suggestions. I’ll try them and get back to you in the next day or two.

    Glenn

  8. Glenn Foster
    November 25, 2013 at 8:33 am

    Daniel,
    Your third suggestion of copying (cloning) the TM to an external HD and then have Migration Assistant look for it worked very well.
    Many thanks,
    Glenn

  9. Nathan
    November 25, 2013 at 7:09 pm

    I’m trying to restore from a disk image on Mavericks, and I used this process but once Terminal finished its checksumming, I got this error message:
    hdiutil attach failed – no mountable file systems

    Now what?

  10. November 25, 2013 at 7:26 pm

    Does the disk image mount correctly when double clicked in the Finder? That error means the DMG is corrupt usually.

  11. December 2, 2013 at 7:12 am

    Also if you login as root and run the Migration Assistant, it works as well.

  12. Matt
    December 30, 2013 at 12:48 pm

    Worked great for me, thank you!!!

  13. Clinton
    January 3, 2014 at 10:05 am

    Hello,

    If a fresh out of the box setup, shrink the partition and use disk utility to “restore” that partition with the .dmg you wanted to migrate from. Then migrate from that partition.

    Takes longer, yes. But, it is a non-terminal way around the issue.

    I plan to capture a new .dmg of 10.9 once I’ve put all the Apps in that are used for our enterprise environment, and hopefully create a master recovery/boot/backup disk image to get around all this crap.

  14. Clinton
    January 3, 2014 at 10:06 am

    Edit for my previous comment:

    shrink the primary partition, then create a new second partition, and use disk utility to “restore” that partition with the .dmg you wanted to migrate from.

  15. Brian Hinton
    January 6, 2014 at 2:53 pm

    Daniel – Thanks for the great info – like you we also do DMGs for locAL backups and I’ve been cursing Apple for months now because they changed how Migration Assistant works. This solution worked great!

  16. David L
    February 6, 2014 at 4:02 pm

    Worked as stated. Thank you!

  17. R1Law
    June 4, 2014 at 2:43 pm

    Daniel, worked like a charm! Awesome help on this one especially the shortcut on the terminal command, the time machine backups were on a networked DroboFS and the address path was not easily found – no ip address and a very odd series of alphanumerical strings between “/”‘s

Leave a Reply

Your email address will not be published. Required fields are marked *