Best Practices for virtual machine backup (programs and data) in VMware Fusion
search cancel

Best Practices for virtual machine backup (programs and data) in VMware Fusion

book

Article ID: 303386

calendar_today

Updated On:

Products

VMware Desktop Hypervisor

Issue/Introduction

This article describes the best practices for backing up a virtual machine with VMware Fusion. It details the issues that must be taken onto consideration, the steps in an ideal process, and the drawbacks of relying on Time Machine exclusively.

Symptoms:
  • Time Machine backups take up too much space, too quickly
  • Restoring virtual machines from a Time Machine backup fails


Environment

VMware Fusion Pro 11.x
VMware Fusion 2.x
VMware Fusion Pro 10.x
VMware Fusion Pro 8.x
VMware Fusion 11.x
VMware Fusion 5.x
VMware Fusion 3.x
VMware Fusion 1.x
VMware Fusion 7.x
VMware Fusion 4.x
VMware Fusion 6.x
VMware Fusion 8.x
VMware Fusion 10.x

Resolution

To back up the entire virtual machine (the operating system installation, application files and settings, and all user data), copy the .vmwarevm bundle (the object in the Virtual Machines folder), while the virtual machine is shut down.

Note: Ensure that the virtual machine is shut down and not suspended.

Because of the length of time involved, and a high potential for redundant data, this method is best used on an occasional basis, after installing new programs/updates or making significant configuration changes.

For more information about how to back up a virtual machine by copying it, see Copying a virtual machine in VMware Fusion (1001524).

For constantly-changing data files, it is best to use any or all of these methods: These methods are easy and non-intrusive enough to be used regularly (such as daily). It is possible to set up Windows Scheduled Tasks so that any of these options can happen automatically, assuming the removable media is present and has the space available.

For example, an ideal backup procedure would include these steps:
  1. Initial setup
     
    1. Program and data backup
       
      • Mirroring:
        Set up Mirrored folders, and store all of the files you create in Windows in a Mirrored folder (thus keeping it on the Mac). For more information, see Setting up mirrored folders for your Mac and virtual machine (1014127).

        OR
         
      • Sharing:
        Set up Shared folders, and store all of the files you create in Windows in the Shared folder. For more information, see Sharing a folder from your Mac to a virtual machine (1004055).

        OR
         
      • Manual / scheduled copy:
        Copy the files you want to back up from where they are saved in Windows into a shared folder. This copy can be scheduled to run automatically. For more information, see:
        • XP: The Microsoft Knowledge Base article, How To Schedule Tasks in Windows XP
        • Vista: The Microsoft Vista support article, Schedule a task
        • Windows 7: The Microsoft Windows 7 support article, Schedule a task

          Note: The preceding links were correct as of September 5, 2013. If you find that a link is broken, provide feedback and a VMware employee will update the link.
           
    2. Operating system and application backup

      When the virtual machine is shut down, copy the virtual machine bundle to an external drive (for example, your Time Machine drive).
       
  2. Regular maintenance

    On a regular basis, back up your Mac's folders (including the Shared / Mirrored folders) using your normal backup method. If you use Time Machine, this happens automatically (assuming your external drive is plugged in) every hour. In most other backup programs, this can be scheduled. Backing up the Mac folders containing your Windows data ensures that your Windows files and data are also backed up.
     
  3. Occasional maintenance

    There is no need to back up your virtual machine bundle unless you make configuration changes to an application or the operating system, or install new programs or OS updates. After doing this, you can drag your virtual machine bundle to the external disk (you can replace the old/original copy, to save space) to back it up.


Additional Information

A large (250 GB+) external drive, as suggested by Time Machine, is desirable.

It is possible to use Time Machine to back up the data in your virtual machine, but it is not the best practice. For more information, see Excluding the Virtual Machines folder from being backed up by Time Machine (1014046).

There are three caveats when using Time Machine in combination with a virtual machine:

  1. Because of conflicts, some versions of VMware Fusion exclude your virtual machine's directory from Time Machine backups. To check if this exclusion is in place on a system already using Time Machine:
     
    1. Open System Preferences > Time Machine.
    2. Click Options to see which (if any) directories are being excluded.
       
  2. Time Machine takes differential backups of files at the file level (rather than the block level). If any file is altered, Time Machine backs up the entire file on its next run-through. Virtual machines consist mainly of virtual hard disks, files that can be equal in size to the size of the virtual operating system's assigned space. This file size depends on whether you are using sparse disks or a monolithic disk and if you have pre-allocated the disk. For more information on these disk types and how to identify them, see the Broadcom Communities document, https://community.broadcom.com/communities/communityhomeblogs?CommunityKey=0c3a2021-5113-4ad1-af9e-018f5da40bc0

    For example, a 60 GB virtual machine with a monolithic, pre-allocated hard disk has a single 60 GB file for its virtual hard disk. Every time that virtual machine is started, or any document within the virtual machine is edited, that 60 GB file is modified, and Time Machine backs it up. Since Time Machine backs up every hour, a 1 TB drive fills up in less than a day.
     
  3. If Time Machine backs up a running virtual machine, it attempts to capture files that are being written to. The resulting backups are likely corrupt and unusable. In combination with the previous point, this may result in a filled backup disk with unusable backups.

 

Copying a virtual machine in VMware Fusion
Sharing a folder from your Mac to a virtual machine
Excluding the Virtual Machines folder from being backed up by Time Machine
Setting up mirrored folders for your Mac and virtual machine