Hello, I'm trying to look at the replication history (using vSphere Replication) to calculate bandwidth requirements. Currently the "Protected" and "Recovery" sites are side-by-side. Once the bandwidth requirements are determined, the link ordered and installed, the "Recovery" Site (Hosts, SAN) will be moved to the permanent location in another state.
1. How can I control event tracking per VM so that I can capture 48 hours of delta information? When I have an RPO of 15 minutes, it only keeps a few hours visible (Home> Inventory>VMs and Templates - <VMNAME>-Tasks&Events tab.
Delta completed (345729500 bytes transferred). | info | 8/27/2012 9:03:59 AM | vTESTVM | System | |
Delta started by VR Scheduler. | info | 8/27/2012 9:00:59 AM | vTESTVM | VR Scheduler |
NOTE: The number of events listed can be adjusted by opening the VI Client and going to menu Edit>Client Settings, going to the Lists tab and changing the page size to 1000.
2. Is there a CLI method to export this Event information for each VM being replicated?
3. Is there a way to query this directly from the SQL Server?
4. Is this captured in a log I can export?
Thanks!
Hi,
1. I don't believe this is possible.
2. This can be done with PowerCLI (get-vievent cmdlet). There are plenty of examples on the communities / internet
3. Possible, but not recommended.
4. I don't know.
Michael.
Thank you for your response.
I looked for PowerCLI commands to export the events, but could not seem to find the ones that would export the number of bytes replicated with its timestamp.
Do you have a specific example in mind?
Something like this:
$events = get-vm "vTESTVM" | get-vievent -start ((get-date).addhours(-48)) -finish (get-date) | where{$_.fullFormattedMessage -like "*bytes*"}}
Didn't test it, but should work.
Michael.
Thank you, that example was terrific. I modified it so that I could get a longer history (the default 100 results showed me less than 12 hours of data). If I was better at parsing, I would be able to extract just the timestamp and number of bytes to make it really easy.
get-vm vGreatplains | get-vievent -start ((get-date).addhours(-96)) -finish (get-date) -maxsample 1000 | where {$_.fullFormattedMessage -like '*Delta Completed*'} | select CreatedTime, FullFormattedMessage | export-csv c:\temp\vGreatplains_29-Aug-12_deltacompletions.csv