1 2 3 Previous Next 34 Replies Latest reply: Mar 17, 2008 1:40 PM by RDellimmagine RSS

    Enabling back time machine for vmware fusion images

    vojko Novice

      I installed vmware 1.1.1 (was using 1.1.0) and it disabled backups for vmware images. Is it possible to enable them back, i have some important stuff in there and it would be nice to have it backuped once in a while.

        • 1. Re: Enabling back time machine for vmware fusion images
          Guru

          Fusion intentionally disabled Time Machine for two reasons: space (your backup would quickly fill up) and correctness (Time Machine can cause freezes in some circumstances). If you want to back up a virtual machine, the easiest way is to do it manually.

           

          If you must stick with Time Machine, however, you can - shut down Fusion and remove the exclusion flag from the virtual machine (I think xattr will do this, but I'm not at a Leopard box right now to check). Note that Fusion will add the flag back the next time you run that virtual machine, so let the backup finish first.

          • 2. Re: Enabling back time machine for vmware fusion images
            rcardona2k Champion

            Eric is correct, xattr can remove the Time Machine exclusion flag so your VM files can be part of the backup (so long as the VM is not running).  This message has the exact command line: Re: Time Machine Backup Strategies for Fusion?

            • 3. Re: Enabling back time machine for vmware fusion images
              vojko Novice

              So basically i'll have to run xattr -d com.apple.metadata:com_apple_backup_excludeItem * everytime i quit vmware image i was running to enable it for backup?

              • 4. Re: Enabling back time machine for vmware fusion images
                rcardona2k Champion

                Yes that command works in the VM bundle directory, the one ending with a name like WinXP.vmwarevm.  The more generic form for all virtual machines is:

                 

                find ~/Documents/Virtual\ Machines -type f -name "*.vm[des][kms]" -print -exec xattr -d com.apple.metadata:com_apple_backup_excludeItem {} \;
                

                 

                • 5. Re: Enabling back time machine for vmware fusion images
                  Guru

                  vojko, you could put Richard's command into a script, and possibly also trigger a backup off of it.

                  • 6. Re: Enabling back time machine for vmware fusion images
                    vojko Novice

                    I've tried the script. I've tried running xattr -d ... * by hand on the bundle and inside of the bundle and it still won't backup. Well it backups up a bit but the file is only big about 800kb so i'm guessing it backups everything but the vmdk which is about 10Gb.

                    • 7. Re: Enabling back time machine for vmware fusion images
                      Guru

                      The script won't work unless you can figure out why the command didn't work. Without having tried it and just from inspection, Richard's command should affect the .vmdk disk files. Are you referring to the .vmwarevm bundle being only 800 kB? When did you check, does Time Machine give some indication when it's done?

                      • 8. Re: Enabling back time machine for vmware fusion images
                        vojko Novice

                        (double post)

                        • 9. Re: Enabling back time machine for vmware fusion images
                          vojko Novice

                          Yes the bundle vmwarewm was only 800 kb after i restored it. And i've checked the content and everything was there besides vmdk file.

                           

                          Here is what i do.

                           

                          I run vmware fusion power on the virtal machine and shut it off.

                           

                          So now i have:

                          vojko-drevs-imac:Virtual Machines.localized vojko$ xattr -l Windows\ XP\ Professional.vmwarevm/

                          com.apple.metadata:com_apple_backup_excludeItem:

                          0000   62 70 6C 69 73 74 30 30 5F 10 11 63 6F 6D 2E 61    bplist00_..com.a

                          0010   70 70 6C 65 2E 62 61 63 6B 75 70 64 08 00 00 00    pple.backupd....

                          0020   00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 00    ................

                          0030   00 00 00 00 00 00 00 00 00 00 00 00 1C             .............

                           

                           

                          and

                           

                          vojko-drevs-imac:Windows XP Professional.vmwarevm vojko$ xattr -l *

                          Windows XP Professional.vmdk: com.apple.metadata:com_apple_backup_excludeItem:

                          0000   62 70 6C 69 73 74 30 30 5F 10 11 63 6F 6D 2E 61    bplist00_..com.a

                          0010   70 70 6C 65 2E 62 61 63 6B 75 70 64 08 00 00 00    pple.backupd....

                          0020   00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 00    ................

                          0030   00 00 00 00 00 00 00 00 00 00 00 00 1C             .............

                           

                           

                          i guess at this point i have that attribute on vmwarewm and vmdk files so i run

                           

                          vojko-drevs-imac:Windows XP Professional.vmwarevm vojko$ xattr -d com.apple.metadata:com_apple_backup_excludeItem Windows\ XP\ Professional.vmdk

                          vojko-drevs-imac:Windows XP Professional.vmwarevm vojko$ xattr -d com.apple.metadata:com_apple_backup_excludeItem Windows\ XP\ Professional.vmdk

                          No such xattr: com.apple.metadata:com_apple_backup_excludeItem

                           

                           

                          and

                           

                          vojko-drevs-imac:Virtual Machines.localized vojko$ xattr -d com.apple.metadata:com_apple_backup_excludeItem Windows\ XP\ Professional.vmwarevm/

                          vojko-drevs-imac:Virtual Machines.localized vojko$ xattr -d com.apple.metadata:com_apple_backup_excludeItem Windows\ XP\ Professional.vmwarevm/

                          No such xattr: com.apple.metadata:com_apple_backup_excludeItem

                           

                           

                          i run start backup now on time machine and only vmwarevn bundle gets backed up without vmdk file. Which is about 800kb as i said before, and other 9 gigs are missing.

                           

                           

                          PS: also tried with sudo ... no cake

                          • 10. Re: Enabling back time machine for vmware fusion images
                            vojko Novice

                            Ok i also tried moving vmdk file around and renaming it and it didn't work.

                             

                            Is it possible that xattr didn't remove all "don't backup" attributes in that file. Is it possible that one attribute might be somewhere else in the file like at position of 2G byte?

                            • 11. Re: Enabling back time machine for vmware fusion images
                              rcardona2k Champion

                              I removed the attributes before I started Time Machine and the first backup includes all of my VMDKs.  Normally I run with Time Machine off, about once a month I shutdown my VMs, remove the attributes and start Time Machine and it refreshes my VMDK backups.  I don't know how to get Time Machine to pick up files that were originally attributed not to be backed up.  I'm sure changing the filename or moving it would not be enough because the internal file ID does not change.

                              • 12. Re: Enabling back time machine for vmware fusion images
                                vojko Novice

                                I'll reinstall vmware 1.1.0 and try making another virtual machine and see how it goes with backups. I had that before and it worked i even restored one image because of the virus with no problem. I think there is a bug in xattr that is keeping me from removing that exclude item attribute. Hopefully this reinstall will work.

                                • 13. Re: Enabling back time machine for vmware fusion images
                                  vojko Novice

                                  No luck and still no backups. I have no idea why it would backup the bundle file but not the vmdk file in the bundle after i removed that exclude attribute on both.

                                  • 14. Re: Enabling back time machine for vmware fusion images
                                    rcardona2k Champion

                                    i'll try some tests on another machine that has Fusion and Time Machine but has not backup up any VMDKs and let you know what i find.

                                    1 2 3 Previous Next