VMware Communities
pitogo
Contributor
Contributor

scheduling vmware auto protect or disable during certain window

I have a Mac Pro running 24x7 with Fusion and virtual workstation. Every day it keeps running Auto Protect at a certain time. I like the feature but can I disable it say from 9am-5pm? Or schedule when it when to run daily? It keeps trashing my HDD for 30 minutes everyday at the sametime and I even have the vmdk on another internal disk so my boot doesn't get flooded with IO. Just plain annoying the performance lag, 10GB of RAM so its not virtual memory crunching away.

13 Replies
continuum
Immortal
Immortal

Autoprotect is a snapshot timer - nothing else.

Why don't you take the snapshots yourself at a time selected by yourself ?

Like every day after work or so ...

IMHO "autoprotect" is the most stupid feature ever added




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
pitogo
Contributor
Contributor

because I'm lazy. I just read its a 24hour timer. What I need to do is start my VM at 3am and the timer should take care of the rest, hopefully that is it...

Reply
0 Kudos
admin
Immortal
Immortal

I just read its a 24hour timer. What I need to do is start my VM at 3am and the timer should take care of the rest, hopefully that is it...

It's a timer based on elapsed guest time, not elapsed host time, so might not be what you want. This is so that if you leave the virtual machine alone for a week (or a month or a year), you don't end up with a bunch of useless snapshots. If you do want to fiddle with Autoprotect, there's a setting in the .vmx file which controls the time to the next snapshot, rollingTier#.timeSincelast (units are seconds, change all of them as appropriate so that the interval minus the timeSincelast is the delay you want).

One thing to consider is to take a snapshot with /Library/Application Support/VMware Fusion/vmrun and your favorite periodic scheduler, e.g. cron (somebody's probably written a GUI frontend for cron, but I don't know off the top of my head). Doing it this way also has the advantage of not having to have a running guest at the time of the snapshot, resulting in a smaller snapshot size (since we don't have to save all of guest memory). On the downside, this method will not automatically clean up old periodic snapshots, which will eventually cause space and performance issues unless you take care of the extras.

Reply
0 Kudos
coordinated
Contributor
Contributor

Thanks for the helpful reply.

It's unfortunate that neither the AutoProtect GUI nor the Help notes ("Set Up Automatic Snapshots with AutoProtect") mention any of the useful and very precautionary advice in the KB article:

I'm having two problems with the AutoProtect snapshotting in Fusion 3.0.x:

  1. There's no obvious way in the GUI to change when it runs (and it's now running at 17:30ish - just when I'm trying to finish up before leaving work!)

  2. It's incredibly I/O-bound (CPU is fine), which locks up the host whilst it runs

It seems a shame to go back to doing snapshots myself (even though it's more tempting to get a "clean", and much smaller, snapshot of the Windows guest when it's shut-down) using 'vmrun' - but that was always a pain with VMware Workstation on Linux (eg. trapping errors reliably) and I don't want to waste too much time fiddling (if I wanted constant fiddling, I'd still be using Linux not a Mac :smileygrin: ) so will stick with AutoProtect for now.

Am I right in assuming that until there's a better option in the GUI to allow the user to choose the time they want their host to hang(!), that the procedure is:

  • stop the VM

  • do the appropriate sum to work out when the next daily AutoProtect snapshot should run, and update the 'rollingTier0.timeSincelast'
    values in the .vmx file

  • restart the VM

This thread was the most helpful advice on changing these I couldn't find any mentions in either the KB or the forums about changing those values; are they documented anywhere?

Thanks!

Reply
0 Kudos
coordinated
Contributor
Contributor

In case it's helpful to anyone, I re-scheduled my daily AutoProtect snapshot for 04:30 as follows:

alias vmrun='/Library/Application\ Support/VMware\ Fusion/vmrun'
VM="`vmrun list | tail -1`"
vmrun stop "$VM"
perl -i -pe 'my ($ss, $mm, $hh) = localtime; $now = $ss + 60*$mm + 3600*$hh; my $scheduled = 4*3600 + 30*60; my $delta = $now - $scheduled; s/^(rollingTier0.timeSincelast = )"(\d+)"$/$1"$delta"/' $VM
vmrun start "$VM"

Substitute for the '4' and '30' if you want to change the time - and substitute the name of the running VM if you have more than one client (and it doesn't show up last in 'vmrun list').

Note that this doesn't address the weekly/daily snapshots - I'll fix them if/when they become a problem...

HTH,

Steve

Reply
0 Kudos
dhansel
Contributor
Contributor

I'm sorry, but this whole snapshot mess is unacceptable. I am shocked that this "community" has not elevated this more strongly. Am I missing something here?

Several of my colleagues including my boss have been hit with this auto snapshot situation at critcal times (including presentations) where it effectively locks up our MacBooks. This is a ticking bomb from a professional standpoint. Can you imagine presenting something to executive staff that you've been sweating over for days, only to have your system lock up for several minutes? WTF!?

It appears that some of my colleagues are threatening to move over to Parallels if this problem alone is absent on that software.

Bottom line,

Snapshots have to be schedulable and interuptable!

Tell me there's a easy way and I just don't know it yet...

Doug

WoodyZ
Immortal
Immortal

I can't add much more then what already been said in the thread other then to tell you that obvious you and your colleagues including your boss should just turn off AutoProtect and not use that feature if how it functions isn't acceptable as it's just that simple of a solution.

Reply
0 Kudos
continuum
Immortal
Immortal

If I needed scheduled snapshots I would run them with full personal control via a taskplaner and vmrun commands.

Sorry - I am no Mac user - don't know how to schedule tasks in MAC OS




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
WoodyZ
Immortal
Immortal

One could script vmrun and then either use cron or launchd to run on schedule. While cron still works nonetheless launchd is Apples recommended method.

I've used both although launchd will probably easier if you've never used cron before so if you want to use launchd then you may want to have a look at Lingon which is a graphical user interface for creating and editing launchd configuration files as this may be easier to use then crontab.

The following is from an example I posted a couple of years ago that used an AppleScript app however is still applicable...

To use crontab to schedule a cron job in a Terminal (/Applications/Utilities/Terminal), as an example, type the following...

Terminal.png

Reply
0 Kudos
dhansel
Contributor
Contributor

I think the correct response from someone at VMWARE would be "yes, we hear you and feel your pain... we are working to address this!"

Still waiting for that...

-


Woody, thanks for your replies..

Of course, anyone who knows Windoze knows that these snapshots are vital to protect oneself, so shutting them off is not really a good option. So, we're back to scheduling... Sadly, I am no guru when it comes to the mac and the sudo command although I have run some things successfully before. I am unable to get the crontab command to open vim so I can't even get the first part of the command to work... oh well? Thanks for trying!

Reply
0 Kudos
WoodyZ
Immortal
Immortal

I think the correct response from someone at VMWARE would be "yes, we hear you and feel your pain... we are working to address this!" Still waiting for that...

This is not the first time this issue has been raised and as a matter of fact from it introduction I slammed the feature for not having a user interactive scheduler built in and throughout the various threads on this issue VMware has noted that users want a user interactive scheduler built in and of course VMware policy is not to comment on nonexistent features, time lines, etc. So VMware has noted it and they do they need to note it every time someone brings it up.

Not trying to be insensitive and there are always some feature of every software package the someone doesn't like and it should be brought to the manufactures attention and then until things change one just has to not use that feature and it really is just that simple. VMware traditionally has always moved extremely slowly to resolve certain issues and as a case in point for over 3 years there has been a issue with hoe Fusion handles the Boot Camp partition when it BSD name changes and only not 3 years later in its latest beta have they started to resolve this issue. It to VMware over 5 years to have HGFS work well so don't hold your breath waiting for VMware to put a user interactive scheduler built in to AutoProtect.

Of course, anyone who knows Windoze knows that these snapshots are vital to protect oneself, so shutting them off is not really a good option.

I have to disagree with that as far as snapshots via AutoProtect however using Snapshots certainly has it advantages and a place an a time to use them or if using regularly by always working off of a Snapshot Disk then having good management habits when using in this manner.

That said in over 5 years I have never lost mission critical user data in a Virtual Machine because it is constantly backed up to RAID and or Optical Media and or USB Flash Drives and have always been able to quickly recover from a full backup copy of a Virtual Machine without having to depend on Snapshots although I do use the Snapshot feature but not all the time.

So, we're back to scheduling... Sadly, I am no guru when it comes to the mac and the sudo command although I have run some things successfully before. I am unable to get the crontab command to open vim so I can't even get the first part of the command to work... oh well? Thanks for trying!

I have no problem using the command provided written exactly as is and if crontab isn't working for you the use launchd as this is the Apple preferred method and Lingon is a graphical user interface for creating and editing launchd configuration files and this may be easier to use then crontab anyway.

Reply
0 Kudos
pitogo
Contributor
Contributor

I gave up on fusion and moved my virtual desktop to ESX.

Reply
0 Kudos
continuum
Immortal
Immortal

ESX has autoprotect too - but here it is not available via the GUI - for good reasons 😉


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos