Query vMotion and Storage vMotion events

Hello

I found the attached script on the site of Alan and it works very well in the listing of vmotion for a period of time selective event. I have been asked to do the same thing for Storage vMotion and would like to try this if possible in a single query.

Thank you

Take a look at get vMotion/svMotion history.

When you have events, it will be easy to calculate meters through a Measure-Object cmdlet.

Tags: VMware

Similar Questions

  • County of vMotion and Storage vMotion over the last 24 hours

    I am under the below a line to count the number of vMotion and Storage vMotion, which happened in the past 24 hours in the middle and it not give me the required result, but when I combine them in the script that I use to collect additional information, it's just returns 0 (zero) as the County.

    Rely on Storage vMotion and vMotion

    Get-VIEvent - MaxSamples ([int]: MaxValue)-start (Get-Date). AddDays(-1) |

    Where {$_.} GetType(). {Name - eq "TaskEvent" - and $_.Info.DescriptionId - eq "VirtualMachine.relocate" - or $_.Info.DescriptionId - eq "StorageResourceManager.applyRecommendation"} |

    Measure-object | Select-Object - ExpandProperty County

    Get-VIEvent - MaxSamples ([int]: MaxValue)-start (Get-Date). AddDays(-1) |

    Where {$_.} GetType(). {Name - eq "TaskEvent" - and $_.Info.DescriptionId - eq "VirtualMachine.migrate"} |

    Measure-object | Select-Object - ExpandProperty County

    Combined script

    Get-Cluster |

    {ForEach-Object

    $Cluster = $_

    $VMHost = $Cluster | Get-VMHost

    $CpuUsageMhz = $VMHost | Measure-object-property CpuUsageMhz-sum | Select-Object - ExpandProperty sum

    $CpuTotalMhz = $VMHost | Measure-object-property CpuTotalMhz-sum | Select-Object - ExpandProperty sum

    $MemoryUsageGB = $VMHost | Measure-object-property MemoryUsageGB-sum | Select-Object - ExpandProperty sum

    $MemoryTotalGB = $VMHost | Measure-object-property MemoryTotalGB-sum | Select-Object - ExpandProperty sum

    $Cluster | Select-Object - property @{Name = "ClusterName"; Expression = {$_.} Name}},

    @{Name = 'vSphere HA'; Expression = {$_.} HAEnabled}},

    @{Name = 'Analysis HA-Host'; Expression = {$_.} ExtensionData.Configuration.DasConfig.HostMonitoring}},

    @{Name = 'HA-Failover capacity'; Expression = {$_.} ExtensionData.Summary.CurrentFailoverLevel}},

    @{Name = 'HA-Admission Control'; Expression = {$_.} HAAdmissionControlEnabled}},

    @{Name = 'Configuration problem'; Expression = {[string]: join (",", ($_.))} ExtensionData.ConfigIssue | {{(Select-ExpandProperty FullFormattedMessage))}}.

    @{Name = 'vSphere DRS'; Expression = {$_.} DrsEnabled}},

    @{Name = "The DRS automation level"; Expression = {$_.} DrsAutomationLevel}},

    @{Name = "Use of the CPU (Mhz)"; Expression is {$CpuUsageMhz}},

    @{Name = "Cpu (Mhz) Total"; Expression is {$CpuTotalMhz}},

    @{Name = 'Cpu use (%) » ; {Expression = {[Math]: Round(100*$CpuUsageMhz/$CpuTotalMhz)}},

    @{Name = "use (GB) of memory"; Expression is {$MemoryUsageGB}},

    @{Name = "Total (GB) of memory"; Expression is {$MemoryTotalGB}},

    @{Name = 'use of memory (%) » ; {Expression = {[Math]: Round(100*$MemoryUsageGB/$MemoryTotalGB)}},

    @{Name = 'VMS NB'; Expression = {$_ |} Get - VM | Measure-object | {{Select-Object - ExpandProperty County}},

    @{Name = 'Virtual machines without VMXNET3 NB'; Expression = {$_ |} Get - VM | Get-NetworkAdapter | WHERE-object {$_.} Type - not "Vmxnet3"} | Measure-object | {{Select-Object - ExpandProperty County}},

    @{Name = 'VMotions NB'; Expression = {$_ |} Get-VIEvent - MaxSamples ([int]: MaxValue)-start (Get-Date). AddDays(-1) | Where {$_.} GetType(). {Name - eq "TaskEvent" - and $_.Info.DescriptionId - eq "VirtualMachine.migrate"} | Measure-object | {{Select-Object - ExpandProperty County}},

    @{Name = 'SvMotions NB'; Expression = {$_ |} Get-VIEvent - MaxSamples ([int]: MaxValue)-start (Get-Date). AddDays(-1) | Where {$_.} GetType(). {Name - eq "TaskEvent" - and $_.Info.DescriptionId - eq "VirtualMachine.relocate" - or $_.Info.DescriptionId - eq "StorageResourceManager.applyRecommendation"} | Measure-object | {{Select-Object - ExpandProperty County}}

    } |

    Export-Csv "C:\Script\Clusters.csv" - NoTypeInformation - UseCulture

    Could you please someone check the script above and let me know if there is something wrong

    Thank you!!

    But wait a minute, you mean that the "Num vMotions" and "Num of SvMotions" properties have a value of 0?

    This is normal, since you ask for events for the entity of the group, while you should do it for all the virtual machines in the cluster.

    Try the attached version.

  • Isolate the vMotion and storage traffic?

    We use ESXi 5.1 using two physical switches for management traffic and two physical switches for VM and storage vMotion traffic. We use a DVSwitch with VLANS separated for VMs (125), storage (126) and vMotion traffic (127). My question is really about the physical switch setting. I have installation of VLANs, 125, 126 and 127 on my main switch with each of them having a layer 3 interface. I think that only the network of the VM (vlan 125) needs a layer 3 interface. In other words, my VLAN storage and vMotion is not routable by removing the 3 layer interface.

    Does this sound correct?

    Another twist, I have a Juniper switch where all layer 3 interfaces are defined. It is connected to 4 switches in the rear of my IBM Bladecenter. Two of these switches are Cisco 1 GB switches that carry all traffic to the management through a vSwitch network. The other two switches are BNT 10 GB switches that carry traffic for Storage vMotion and VMs. Of course, it's a network connection, because it carries several VLANS.

    My only question now is should I eliminate interface layer 3 on my storage network located on one vlan separate

    Well, you need your storage system accessible on these IP addresses by the systems for the management of the other subnets or such? You already have all traffic from subnet inter between iSCSI and other networks? If this isn't the case, then there is no need to have routable iSCSI network.

    For the ESXi hosts themselves there is usually zero reason to have vmkernel iSCSI interfaces be routable since you already do management etc on another routable network (and responses of hosts would be sent there as well except if you define static routes custom).

  • Random virtual machines after vMotion and Storage vMotion network loss

    Hi all -

    I have a couple of tickets open with VMware and our supplier of SAN, EqualLogic, on this issue.  Since the configuration of our production and DMZ clusters we noticed that the virtual machines will sometimes drop network connectivity after a successful vMotion and Storage vMotion.  Sometimes, although much less frequently, virtual machines also spontaneously lose network overnight.  What happened only a few times.  The strange thing is that the other guests on the VM host are fine - they lose any network.  Actually, I can do no more than 3 computers virtual host to another, and 2 of 3 can switch correctly, so that we lose the network.  The work around?  Simply 'disconnect' from the virtual NETWORK card 'reconnect' and the virtual machine will start the return packets.  I can also switch the VM troubled return to the host State and it will find the network.  I can it reboot and re - win network.  I can re - install the virtual card completely, and she re - win network.

    VMware has seen a lot of mistakes of SAN in our log files in order to update us our SAN firmware to the latest version.  That seems to have fixed that but we still have the issue.  Here are some of the specifications - all environments are virtually identical except for memory:

    Of PowerEdge R810

    NICs Broadcom 5709

    EqualLogic SAN running 5.0.5 F/W

    We use frames.  ESXi is fully patched.  I haven't seen a boss or not, it is only some guest operating system that loses the network, but we are a Windows environment.

    When a virtual machine loses the network, we can not:

    • Ping to it
    • Ping it
    • Ping him at the virtual machines on the same host or vSwitch
    • Ping outside our network
    • resolve DNS, etc..

    I followed some KBs VMware without success, including:

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1003839
    http://KB.VMware.com/selfservice/microsites/search.do?cmd=displayKC & externalId = 1002811 (port security is not enabled)

    -All the VMware tools have been updated to the latest version correct and corresponds to the ESXi host
    -Connected to the service ESXi console, I cannot ping the VM problem by name of host or IP address, but I can ping do not affected by the issue of the OTHER virtual machines.  I can also pings the service console.
    -Connected to the troubled virtual machine itself, I cannot ping other virtual machines, I can't resolve host names, I cannot ping by IP.  The machine virtual CAN ping itself by IP, but not hostname.  I cannot ping other virtual computers on the same virtual switch or network by either IP or host name.  I can't ping the vSwitch network management.
    -All vSwitches are configured in the same way and the same.
    -Notify the switches is set to yes
    -There are a lot of available virtual ports
    -We tried the E1000 and VMXNET virtual cards with no difference.
    -All cards are configured to negotiate, but we tried to force individuals speeds as well as with no difference

    I appreciate your help.  I have problems getting anywhere on this issue with the sellers.

    wkucardinal wrote:

    Still having the issue...

    Sometimes, it might be useful to really check that all uplinks VMNIC for all VLAN does work them. Try this is to create a new portgroup on the vSwitch used by your virtual machines on the host of the first, put a test VM on the portgroup, then go into the NIC teaming policy from the new portgroup and select "Override switch command failover."

    Then down vmnic all except one in unused, then only a single VMNIC is active. Then set the portgroup VLAN to a production of VLAN and try to see if we could ping some expected from the different addresses. If it works, then move VMNIC work until unused and move up to another asset. Try again, and this for all the vmnic. If it works, then you have verified that the configuration of VLANS and other settings are correct on the physical switch in the face of this host ports.

    If several VLANs, repeat the process for all other productions VLAN. Then repeat on the other hosts.

    While that may take some time, occurs if everything is properly configured on the physical switches. When occurs a vMotion virtual machine gets a new "Port code" and is assigned to a new outgoing VMNIC. If there is an error of configuration on one or more physical ports that might seem random, but may still happen on VLAN x on y VMNIC. Given that Port ID policy you use indeed spread randomly VMs on the vmnic these problems may be difficult to diagnose. (Make a disconnection of the VM vNIC gives the virtual machine a new port-ID, which it will move to a new outgoing VMNIC, which might seem to solve the problem.)

  • What is the best way to inform your client of VCentere when a vmotion event has occurred?

    For example, suppose you want to get ntofied when a vmotion event has occurred on the

    VCenter. You need the info on what got VM move to the place where.

    But it makes no sense to keep voting history of VCenter events. So, I guess you

    use the alarm mechanism. If this is the case then you are just left with the alarm runninng

    a script that somehow informed the client of VC occurred a vmotion. Now the question is what

    How is the best way to inform the customer of VC?

    So the process is the VCenter client calls the VSphere SDK API via web services to create/set the alarm.

    The alarm call a script, the script calls something to warn the client of VC.

    The script uses sockets / Messages /? or is it and most easy way?  What did other people?

    Again, the alarm is once configured on the server vCenter Server and this can be done by using the Client vSphere or programmaticlaly using the vSphere API. The action of the alarm go can be anything and who is also stored and executed on the server vCenter Server. If you want the action to send an HTTP request, you can, as long as the 'scenario' can be run on the server vCenter Server. It's the size of the default actions that have been implemented with an alarm (alarm in vCenter system as event, SNMP trap, e-mail or run local script to vCenter Server)

    If you want to develop a thin client that watches for a change or a particular property, you'll want to take a look at the collector of property if you have not already in the vSphere Programming Guide - http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsdk_prog_guide.pdf in collaboration with collector property, you'll want to take advantage of "Views" which is what the vSphere Client uses to display the vSphere infrastructure inventory and updates only the customer when something changes or automatically when a view is modified (for example, cluster/host to view vm/model). You can still use the method of the alarm, but relying on the collector of property/views, will give you a solid client without having to query the system.

    I would recommend that you take a look at these two presentation by one of our engineers on the manifold of the property http://vimeo.com/16222275 and http://vimeo.com/16215337 alarms & events

  • Removable storage service, event ID: 115

    I am getting error during backup taken by ntbackup on windows 2003 server with sp2 patch below...

    I use IBM HH LTO 3 SCSI sequential by car.

    Event type: error
    Event source: Removable Storage Service
    Event category: no
    Event ID: 115

    I have the latest patch for OS and H/W confirmed. I have problem while taking backup of the media, while taking backup to disk, it works well.

    Hello

    Note that your computer is under domain, you must contact the technet forum, where we are the support technicians who are well equipped with knowledge on the issues of domain, do please visit the link provided below.
     
    http://social.technet.Microsoft.com/forums/en-us/winserverfiles/threads

  • Hosts and storage of VDC.

    Hello.

    I'm trying the vCloud API v1.0 for details of a VCC of the vCloud Director. But I am struggling to find a way to bind the VCC with the host (physical machine) and storage it is associated. Can you get it someone please let me know if you know a way to find the host and the storage associated with a VCC?

    Thank you!

    Hello

    To get the relationship using vCloud API 1.0

    1. api/v1.0/admin/extension/providervdc/id - contains info on the hosts, data warehouses. the provider VDC also contains a link to get the references of vdc.

    2. api/v1.0/admin/providervdc/id/vdcReferences - that gives all the VCC references supported by this provider vdc.

    I hope this helps.

    With the help of vCloud API 1.5, query service contains all this information.

    Kind regards

    Rajesh Kamal.

  • Backup and storage to iCloud

    Why make backups if you use iCloud storage?

    This should explain it further - iCloud: overview of backup and storage iCloud

  • Can I detect and handle an event already within a structure of the event?

    I have a VI that would do what I want, if I could detect and handle an event of second mouse click while I'm already handling a previous event (selection from popup menu).

    I hope that the picture is clear, but in words what I want is the following: I have first right-click on a chart and select a context menu item, which specifies a graphic manipulation of properties.  Often, this manipulation requires clicking on a second graph to get a reference (for example if I want to copy some of the properties of the first chart on the chart of the target).  It is, it means I'm trying to detect a second event already within a structure of the event.

    I think I could do with a state machine and some registers at offset, and if it's the easiest way, I'll do it.  I would be interested to know whether, if there is a way to detect and manage events 'nested' as I suggested.

    Thank you!

    Your code is not really that complicated.

    Yet, the problem is that confuse you it upward with the main state machine. I would use it in a small parallel loop that only manages events associated with the menu shortcuts. All this should be able to run in parallel in any event, even if the main loop updates the data in the chart at the same time, for example.

    I don't like the dialog box, it hampers the flow of work, but if you use it, use two button dialog so that the user can also cancel if necessary. Instead of the dialog box, you should just temporarily move the cursor on. I also do little to check before operating on the second graph of reason and give a time limit for the second operation.

    Here is a quick project to a more atomic shortcuts Manager. Modify if needed. There are probably bugs.

  • I can finf a log of deleted files and folder in Event Viewer

    can I finf a log of deleted files and folder in Event Viewer ARE ANY TOOL

    Hello rameshkumar_11240,

    Thanks for the reply.  For the question that you described above, please transfer this issue to the address provided below in Microsoft TechNet Forums.

    Microsoft TechNet forums

    http://social.technet.Microsoft.com/forums/en-us/itproxpsp/threads

  • find any newspaper of deleted files and folder in Event Viewer

    find any newspaper of deleted files and folder in Event Viewer OR any tool to find

    AFAIK there is no newspaper.  Do you need to recover deleted?

    If so, try a third party called Recuva application.

  • Stopped my Norton Ghost and Norton checked my computer and found that my Vista Premium do not have or plug and play services event log

    original title: journal of events in Vista Premium

    I had to reinstall Vista after a hard disk failure. My Norton Ghost stopped and Norton checked my computer and found that my Vista Premium do not have or plug and play services event log.
    Do you know how I can get them?

    The event log service will not start. I tried manually, start it and get this message.

    Windows could not start the service on the Local computer Windows event log.
    Error 998:Invalid access to memory location.

    I don't understand why it happened all of a sudden. Does anyone have an idea how I can get going again.

    Hello

    Method 1:

    Event Viewer services are - primary (Windows event log) it has no dependencies, but is dependent on the Scheduler of tasks and Windows event collector.

    Click on start and type Services) in the search box

    (b) right click on the list of programs services and selecting run as administrator

    (c) locate the services listed above and check if they are started.

    Method 2: How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

  • Error message: problem loading parameters and check the event log or ask the administrator

    My wallpaper, the desktop icons and most of my documents are gone.

    I have Vista Home Premium and a couple of days and I connected my desktop background was changed. Several desktop icons are missing, and a message came up saying there was a problem loading my settings and check the event log, or ask the administrator (me) for more details. All my "Favorites" were missing in the sidebar and my documents and recorded images folders are empty. Microsoft customer service tells me there is an error in my code for the identification of product (from the Windows Activation in systems and Maintenance) so I can't help out.

    Any thoughts? Thank you!

    Hello, G25

    It is likely that your user profile is damaged. I would advise to create a new user account and test if you get any errors. If everything works as expected under the new user account, you can start to recover your account profile by following the steps on the following link: difficulty of a user profile is corrupted

    David
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • What is the date of GA of Foglight for Enterprise Virtualization v. 7.0 and Storage Manager 3.0

    Hello

    I was wondering what should Foglight for Enterprise Virtualization v. 7.0 and Storage Manager 3.0 available for download

    Thank you

    Eli

    Foglight for virtualization 7.0 is now available on Supportlink here. Storage Management 3.0 is available here.

  • Intercept the email opening and closing Email event.

    Hi all
    I created an app that does something, for example showing an alert when an email is opened or when enamel is closed. I am able to show the alert when I receive a call or hang up (via PhoneListener), but the problem is that I am not able to catch open the mail and close the event. I have no idea how this is possible. Please tell me if any APIs exist for this or any other means, it can be done.

    Collate MessageListener and MessageEvent.

  • Cant't save and clear the event logs to a folder on the hard disk

    I have a new hp laptop under windows7. When I try to erase and save the event logs to a folder on the hard drive, I get a message saying that it cannot save the file to the network location despite the fact that I'm not saving to a network location.  I can record the events first and then to clear the logs.  But can not use the option "save and clear."  What could cause this problem?

    Hello

    1 when was the last time save and clear option has worked?
    2 have you made any changes to the computer before the show?

    Run the System File Checker and check if it helps.

    Follow the steps in this link: http://support.microsoft.com/kb/929833

Maybe you are looking for