Bye Bye to free Blog. Say hello to my new website

Dear friends and Blog Readers,

I have started my new website http://www.vstellar.com.

All new posts will now be published to my new website. This blog will be running up for a few days until I am confirmed that migration of all posts/links/media items were smooth and nothing is broken in my new website.

If you love to read my blogs and are following this, then a humble request to all of you is to follow my new website so that you are notified whenever I post new contents.

If you come across anything broken in my new site then feel free to let me know about that so that I can fix it.

Thanks for all your support as always.

Yours Sincerely

Manish Jha aka Alex Hunt

 

Advertisements
Posted in Vmware | Leave a comment

VMware Fling- View Pool Manager

Today I was going through the VMware Flings website and came across one cool fling which I think can be very handy for VM Admins working on VDI.

View Pool Manager is a Fling that allows VMware View administrators to easily manage users across desktop pools and security groups.

Maintaining desktop pools in large VDI environment is one of the biggest challenges for a VMware View administrators. Commonly each desktop pool has Active Directory security groups with the number of users a given desktop pool will support.

As employees leave/join the organization, security groups require maintenance to ensure the number of users in each group correctly match the amount of desktops available. VMware View Pool Manager allows VMware View administrators to easily manage users across desktop pools and security groups for large deployments.

This tool allow administrators to bind an Active Directory connection and specify:

  • How many users there should exist per group (based on VMware View pool size)
  • Floating or Persistent deployment
  • Source Security Groups (all users to be distributed to pools)
  • Destination Security Groups (All groups the users may be assigned to)

This tool help VMware View administrators to save hours of work adding, removing and maintaining user’s, desktop pools and security groups while ensuring each security group does not hold more users than the amount of desktops pool assigned to a given VMware View desktop pool.

view-pool-manager

System Requirements

The View Pool Manager requires .NET Framework 4.0. The .NET 3.5 SP1 installation might require Internet connectivity to download more files. Verify that you are a member of the Administrators group on the domain.

The View Pool Manager fling was build by Andre Leibovici. You can follow him on twitter @andreleibovici

You can download this tool from Here

Posted in Vmware, VMware Flings | Leave a comment

vSphere 5 Memory Management and Monitoring diagram

The VMware vSphere 5 Memory Management and Monitoring diagram provides VM Admins a comprehensive look into the ESXi memory management mechanisms and reclamation methods.

dia

Graphic Thanks to VMware.com

You can download the above diagram from Here

Posted in Vmware | Leave a comment

vCenter Server 6.0 Availability Guide

vCenter Server is instead the most critical part of any virtual infrastructure environment. High availability of vCenter server has become very crucial as there are many features which doesn’t work or partially work when your vCenter server is not available. When vCenter server is not designed for availability it can lead to a single point of failure.

There are many changes (related to vCenter Server and its components) done with the release of vCenter Server 6 and thus careful consideration has to be made in the design of its architecture.

Multiple solutions can be used for achieving high availability for vCenter Server. Many of these options can be combined to provide different levels of availability. vSphere HA, FT, vCenter Watchdog services and in guest clustering solutions can be combined depending on customer requirements for availability.

vCenter server 6.0 availability guide can be downloaded from VMware Techresources Library

Some of the topics covered in this book are:

  • Availability Considerations for vCenter Server 6.0.
  • vCenter Server High-Availability Solutions and Configurations.
  • High Availability for the Platform Services Controller.
  • Recovery Options.

So guys if you are looking for deploying vCenter Server 6.0 or already deployed in your environment, then this is a must see document.

Posted in vCenter Server, Vmware | Leave a comment

Whats New in vSphere 6.0- vNUMA Enhancements

Before going into this post about vNUMA lets recall what NUMA is how it works. NUMA can be explained as follows:

Non-Uniform Memory Access (NUMA) is a computer memory design used in multiprocessing, where the memory access time depends on the memory location relative to a processor. Under NUMA, a processor can access its own local memory faster than non-local memory, that is, memory local to another processor or memory shared between processors.

In modern day physical server with two or more sockets (physical cpu) memory is distributed in a way that one slot (generally 8) of memory is local to one cpu and other slot of memory is local to the other cpu. A socket (cpu), its local memory and the bus connecting the two components is called a NUMA node. Both sockets are connected to the other sockets’ and thus allowing remote access of memory.

numa1

It is not mandatory that an additional socket in a system means it is NUMA supported. Two or more sockets can be connected to memory with no distinction between local and remote. This type of architecture where one or more sockets connected to the same RAM is called UMA (uniform memory access) system. Check your server specifications for whether or not your server supports NUMA.

For more information on NUMA I would recommend reading this wonderful blog by Frannk

vNUMA was introduced in vSphere version 5.0 to improve the performance of the CPU scheduling by exposing the underlying NUMA architecture of physical server to the VM. vNUMA is automatically enabled on a VM if it has more than 8 vCPU. You can also explicitly enable vNUMA on your VM even if you have less than 8 vCPU.

vNUMA is designed for modern OS’s that are NUMA aware and can make intelligent page management decisions based on locality. Prior to vSphere 6.0, vNUMA was not aware of how memory allocation works when a memory is hot added to a VM.

With the release of vSphere 6.0, there are also improvement in NUMA in terms of memory. Memory hot-add is now vNUMA aware. To explain this lets have a look on below example:

Note: This post was originally posted on http://plain-virt.blogspot.in/ by Wee Kiong Tan.

Let’s start with what happen in prior with vSphere 6 when a VM is hot-added with memory. We will take an example where a VM is configured with 3 GB of memory.

numa2

Graphics Thanks to http://plain-virt.blogspot.in/

As visible in above picture the VM memory is uniformly distributed on their physical counterpart i.e. the physical cpu present in the Esxi host because vNUMA is enabled on the VM.

Now suppose this VM have Hot-Add feature enabled and additional 3 GB of memory is hot added to this VM. Memory will now be allocated by placing to the first NUMA node follow by the next if enough memory is not available to schedule the threads on previous nodes.

numa3

Graphics Thanks to http://plain-virt.blogspot.in/

As you can see that after adding the additional memory, the memory allocation on physical component is no longer uniform.

In vSphere 6.0 VMware has addressed this issue and made memory Hot-Add more friendly to NUMA.

numa4

Graphics Thanks to http://plain-virt.blogspot.in/

You can see in the above picture now the memory distribution is even across the physical NUMA nodes.

Posted in Memory_management, Vmware | Leave a comment

VMware Project Fargo- A Technique for Rapid Cloning of Running VMS

Today I was going through a blog and found one very interesting blogpost which I am going to share with you.

At VMworld 2014 VMware announced a very interesting new project called Project Fargo. This is another name for the Project VMFork.

What is this Project Fargo ?

Fargo/VMFork is a platform currently in technology preview which enables a rapid cloning of running VMs.

It lets you quickly spin up linked clones from a VM that’s already running instead of using disk images. Rather than having a master image stored on a virtual hard disk , the base desktop is an actual running VM. When you need to give a user that same desktop, you can just clone that VM instead of booting up a whole other one. The aim of Fargo is to provides a fast, scalable differential clone of a running VM.

fargo1

The key benefits of using this method is that it is instantaneous and can be done from a running VM,  so a new VM spawned would typically take less than 1 second and is in the same running state from where it is cloned. Also since only changed blocks are written in new VM so this solution will take up dramatically less disk space.

While there are many potential use cases for Fargo, it was presented with virtual desktop in mind where providing an instant clone of running non-persistent desktop would avoid the boot storms to the storage subsystem. The forking process would be highly useful in scaling up a set of virtual machines quickly to meet increasing traffic on a website or in some other compute-intensive, high -demand scenario.

Kit Colbert, CTO of end user computing at VMware, said from the VMworld stage that Project Fargo will enable production of virtual desktops 30 times faster than current rates.

Here are the excerpts from the session presented by Kim:

While we have solved the real-time application delivery problem, we still need to address the issue of desktop delivery.  The reality is that today the delivery of virtual desktops is time consuming.  From cloning to powering on and OS boot to customization, the end-to-end process can take many minutes before the virtual desktop is ready to accept user logins.  This problem compounds itself when trying to deliver hundreds or thousands of desktops at one time.  We need a better solution.

The cloned VM is identical in every way to the original and initially shares all memory and disk with it as well.  Project Fargo is very cool for two reasons: first, it gets you a new running VM in under a second.  Second, it’s a very lightweight VM because it shares all memory and disk with the original.  (To be clear, both the memory and disk are “copy on write” so if new VMs modify bits of their memory or disk, a separate copy is made for that VM.  We thus preserve security and isolation between VMs.)

The Project Fargo feature will become likely become available in vSphere 6.0 (scheduled for 2015). It will be also possible to use Fargo features using a vCenter API. Early benchmarks show that 120 sessions can be handled on a 2 socket/8 core host with 30% less CPU consumption than same number of RDSH session.

When the VM has been provisioned applications are assigned to this VDI workstation using the solution CloudVolumes, VMware claims a 30 x faster VDI provisioning. The combination of Project Fargo + CloudVolumes is internally called Project Meteor.

Project Meteor is focused on delivering these desktops to any device with an HTML5-based browser. View Composer is being replaced by Project Fargo to increase provisioning upto 30x.

Duncan Epping has written an excellent blog on Project Fargo.

Rob Beekmans has also written a blog on Fargo and Meteor which is worth reading.

Posted in Vmware | Leave a comment

Does disabling Inter-VM TPS affect your environment

Before starting with this post I would like to recall what is TPS and what it does in a virtualized environment.

Transparent page sharing is a method by which redundant copies of pages are eliminated. This helps to free memory that a virtual machine would otherwise be using. Because of the way TPS works with hardware-assisted memory virtualization systems like Intel EPT Hardware Assist and AMD RVI Hardware Assist, esxtop may show zero or few shared pages in these systems. Page sharing will show up in esxtop only when host memory is overcommitted.

The below diagram will show you an overview of what TPS is doing

TPS

Earlier TPS was enabled by default to save memory space by sharing the same memory block between the VM’s running the similar type of applications. In VDI environment where most of the VM are running with same OS and contains similar applications, TPS was saving a hell lot of space and making the memory management technique more efficient.

But sometimes back a research brought the darker side of using the TPS technique where it is demonstrated that TPS is a serious security threat. The research indicated that TPS can be abused to gain unauthorized access to data under certain highly controlled conditions.

Even though VMware believes information being disclosed in real world conditions is unrealistic, out of an abundance of caution upcoming ESXi Update releases will no longer enable TPS between Virtual Machines by default.

Starting with update releases in December, 2014, default setting for TPS will be Disabled and will continued to be disabled for all future versions of vSphere.

VMware has mentioned and addressed this issue in their KB Article 2080735. I would recommend to have a look into that. Also the KB article 2091682 “Additional Transparent Page Sharing management capabilities in ESXi 5.5, 5.1, and 5.0 patches in Q4, 2014” has explained how to overcome this issue for existing version of vSphere.

Now the question is “How disabling Inter-VM TPS impact your environment?”

If your environment is not using the concept of “Large Pages” and using the default 4kb page size then TPS will be handy to save some memory blocks for you especially when the environment consists of VM’s with same type of OS and running similar application for e.g. VDI.

But if your environment which consists of modern processors with MMU support (Intel EPT/AMD RVI Hardware Assist) then your ESXi host is leveraging the use of Large Pages (2MB) and by default there won’t be huge impact as TPS is not effective there (because the chances of 2 pages to be exactly similar will be very less). Also TPS is not called until host comes under memory pressure and pages are broken down to 4KB.

This is explained very well in VMware KB 1021095

Additionally modern operating systems like Windows 2008/2012 or Linux are leveraging security feature called Address Space Layout Randomization (ASLR), which is preventing TPS to be effective, especially in ZERO’ing when large pages are used.

TPS will be very advantageous in following 2 scenarios:

  • If you are having VDI deployments especially with floating (not dedicated) desktops into your environment and when the Esxi hosts are under memory pressure.
  • Also if you have older operating systems prior to Windows Server 2008, then your operating systems will be using small pages 4KB by default and hence they will be benefited from TPS a lot.
  • Also if you have disabled  the use of the large pages by using advance value Mem.AllocGuestLargePage 0, then in this case you should be benefiting from TPS even in case of “modern” operating systems.

If you want to check how much you are utilizing TPS then check performance tab in your vSphere client (on cluster or host level, but can be done on VM level too). In memory view look for SHARED and ZERO metrics.

SHARED is all memory which is saved with TPS and ZERO is memory with zeroed blocks collapsed into one. If you subtract ZERO from SHARED you will get an actual estimate of your savings from deduplication in general.

Note: Unfortunately there is now way to check how much savings you have from Inter-VM TPS

What to do if you dont want to wait for patches for disabling TPS?

Although VMware believes that the reported possible information disclosure in TPS can only be abused in very limited configuration scenarios, VMware advices customers who are sufficiently concerned about this possibility to proactively disable TPS on their ESXi hosts. Customers do not have to wait for the either the Patch or the Update releases to do this.

For environments using ESXi 5.x, perform the following steps:

  1. Login to ESXi or vCenter Server using the vSphere Client.
  2. Select the relevant ESXi host.
  3. In the Configuration tab, click Advanced Settings under the software section.
  4. In the Advanced Settings window, click Mem.
  5. Look for Mem.ShareScanGHz and set the value to 0.
  6. Click OK.

Perform one of the following to make the TPS changes effective immediately:

  • Migrate all the virtual machines to other host in cluster and back to original host.
  • Shutdown and power-on the virtual machines.

What if you want to continue using TPS after the Patch/Update?

A couple of new Advanced Configuration options are introduced by the Patch and is explained in KB2091682

  • Mem.ShareForceSalting: This is a host-level configuration option. This is what disables/enables TPS on an ESXi host. If this is set to “0”, it means that TPS is STILL enabled on the host. If set to “1”, it means that TPS has been disabled on the Host, and salting is required in order for TPS to work on any VM located on that host.
  • sched.mem.pshare.salt: This value enables customers to selectively enable page sharing between/among specific VMs. When ShareForceSalting is set to “1” on an ESXi host, the only way for two or more VMs to share a page is for both their salt and the content of the page to be same. The salt is the value specified by customers for this per-VM Advanced Configuration option. This value must be identical on all the VMs that you intend to enable page sharing for.
  1. Log in to ESXi or vCenter with the VI-Client.
  2. Select the ESXi relevant host.
  3. In the Configuration tab, click Advanced Settings under the software section.
  4. In the Advanced Settings window, click Mem.
  5. Look for ‘Mem.ShareForceSalting’ and set the value to 1.
  6. Click OK.
  7. Power off the VM, which you want to set salt value.
  8. Right click on VM, click on Edit settings.
  9. Select options menu, click on General under Advanced section
  10. Click on Configuration Parameter
  11. Click on Add Row, new row will be added.
  12. On left hand side add text ‘sched.mem.pshare.salt’ and on the right hand side specify the unique string.
  13. Power on the VM so that salting can take effect.
  14. Repeat steps 7 to 13 to set the salt value for individual VMs.
  15. Same salting values can be specified to achieve the page sharing across VMs.

IF ShareForceSalting is set to “1” and the sched.mem.pshare.salt is not set on a VM, the VM’s vc.uuid will be substituted for the salt value instead. Because the vc.uuid is unique to a VM, that VM will only be able to share page with itself – effectively, no sharing for this VM.

For those who wants to dive more deeper into this I would recommend reading this  whitepaper: https://eprint.iacr.org/2014/435.pdf

Posted in Memory_management, Vmware | 3 Comments

How Snapshots work in VMware

What is a Snapshot

We have heard this term time and again during our journey with working on VMware and many of us are aware of what it is. Still I am including the formal definition of snapshot as below:

Disk Snapshot in VMware refers to a copy of the virtual machine disk file at a certain point in time. It preserves the disk file system and system memory of your virtual machine by enabling you to revert to the snapshot in case something goes wrong.

Snapshots are very helpful in the cases when you are planning to upgrade or patch your mission critical applications and servers.

When a snapshot is taken on a VM then a new disk file by the name *–delta.vmdk is created in the same folder where VM disks are residing (Unless and until you are not using WorkingDir parameter)

All the write operations are freeze on the original vmdk disk present in your VM and the new write operations will be performed on the newly created delta disk. The original vmdk file becomes read only. When a snapshot is taken on a VM certain new files are created in the VM directory. Let’s have a look on those and understand the purpose of those files.

Files associated with snapshot

*–delta.vmdk file: This is the differential file which created snapshot is taken on a VM. It is also known as the redo-log file. A delta file will be created for each snapshot that you create for a VM. An extra delta helper file will also be created to hold any disk changes when a snapshot is being deleted or reverted. These files are automatically deleted when the snapshot is deleted or reverted in snapshot manager.

*.vmsd file: This file is used to store metadata and information about snapshots. This file is in text format and will contain information such as the snapshot display name, unique identifier (UID), disk file name, etc. The size of this file is 0 byte initially until you create first snapshot of a VM. From that point it will populate the file and continue to update it whenever new snapshots are taken.

*.vmsn file: This is the snapshot state file, which stores the exact running state of a virtual machine at the time you take that snapshot. This file will either be small or large depending on if you select to preserve the VM’s memory as part of the snapshot. If you do choose to preserve the VM’s memory, then this file will be a few megabytes larger than the maximum RAM memory allocated to the VM.

A .vmsn file will be created for each snapshot taken on the VM and are automatically deleted when the snapshot is removed.

If you want to look deeper into how snapshot works actually I would recommend reading this wonderful blog post:

http://www.cubicrace.com/2012/02/how-do-virtual-machine-snapshots-work.html

Understanding Snapshot rate of growth and disk space utilization

Many of times I have seen people asking questions (in different group/communities) related to what will be the size of the snapshot delta disk when snapshot is taken and how delta disk grows. By looking into the discussion I have seen sometimes very misleading information given by the users. So let’s understand how delta disk behaves actually.

The size of a snapshot file can never exceed the size of the original disk file. Any time a disk block is changed it is written in the delta file and is updated as changes are made. If every single disk block is changed in your VM after a snapshot is taken, then your snapshot would be of the same size as your original disk file.

There’s some additional overhead disk space that contains information used to manage the snapshots. The maximum overhead disk space varies; it’s based on the Virtual Machine Files System (VMFS) block size. Please refer to the below table:

Block size  Maximum VMDK size  Maximum overhead
 1 MB  256 GB  2 GB
 2 MB  512 GB  4 GB
 4 MB  1024 GB  8 GB
 8 MB  2048 GB  16 GB

The required overhead disk space can cause snapshot creation to fail if a VM’s virtual disk is close the maximum VMDK size for a VMFS volume. To understand this consider the below scenario:

A VM’s virtual disk  size is 512 GB on a VMFS volume with a 2 MB block size.In this case the maximum snapshot size would be 516 GB (512 GB + 4 GB), which would exceed the 512 GB maximum VMDK size for the VMFS volume and cause the snapshot creation to fail.

So as a best practice if you are planning to use snapshots, you should always create VMs with a virtual disk size that’s smaller than the maximum VMDK size by the amount of the maximum overhead (e.g., 512 GB – 4GB = 508 GB).

Note: Reference of the above wonderful example is taken from Eric Siebert post on searchvmware.techtarget.com

Initially the size of Snapshot files is small (16 MB), but will grow as writes are made to the VM’s disk files. Snapshots grow in 16 MB increments to help reduce SCSI reservation conflicts. When requests are made to change a block on the original disk, it is instead changed in the delta file. If the previously changed disk block in a delta file is changed again, it will not increase the size of the delta file because it simply updates the existing block in the delta file.

The rate of growth of a snapshot will be determined by how much disk write activity occurs on your server. Servers that have disk-write intensive applications, such as SQL and Exchange, will see snapshot files grow rapidly. On the other hand, servers with mostly static content and fewer disk writes, such as Web and application servers, will grow at a much slower rate.

When we create multiple snapshots, new delta files are created and the previous delta files become read-only. With multiple snapshots, each delta file can potentially grow as large as the original disk file.

Posted in Snapshots, Storage, Vmware | Leave a comment

AirWatch HOL Released!

Good news for those people who wants to try their hands learning vCloud AirWatch.

VMware has released the AirWatch Hands-On-Labs yesterday.  These labs can be accessed by going to AirWatch HOL.

The AirWatch labs are designed to give you an introduction to AirWatch and Mobile Device Management (MDM). You can find more information about AirWatch by visiting their website at https://www.air-watch.com.

The AirWatch HOL is broken up into three modules that can be done together or independently.  Module 1 can be skipped by those who are currently using AirWatch and want to see how easy it is to integrate it with your corporate infrastructure then you can go to Module 2 “Advanced MDM Using the AirWatch Cloud Connector” directly.

Module 3 is designed to introduce you to the single device/multiple user concept which has many uses cases including schools, hospitals and more.

airwatch-hol

More information about this can be found on VMware Blogs

Posted in Vmware | Leave a comment

vCloud Air Disaster Recovery Product Walkthrough

VMware vCloud® Air™ is a secure, dedicated hybrid cloud platform built on the VMware vSphere® foundation. It supports existing workloads and third-party applications, as well as new application development.

VMware has made available the product walkthrough of vCloud Air Disaster Recovery.

Following topics are covered in this video series:

1: DRaaS End to End Overview

2: Configure vSphere Replication for vCloud Air DRaaS

3: Connect vSphere Replication to vCloud Air

4: Configure a VM for Replication

5: Test Failover

6: Planned Failover

7: Failback

8: Advanced Concepts

Posted in Vmware | Leave a comment

Managing Auto Deploy using GUI

Auto deploy is used for PXE booting/installation of Esxi over the network. Unfortunately Auto Deploy can be configured only through command line (PowerCLI) and most of the VMware Admins are not very comfortable with command line initially.

To help solve this problem there is a fling available from VMware called Auto Deploy GUI which can help you in configuring/deploying Esxi servers easily.

The Auto Deploy GUI is a vSphere plug-in for the VMware vSphere Auto Deploy component. The GUI plug-in allows a user to easily manage the setup and deployment requirements in a stateless environment managed by Auto Deploy. Some of the features provided through the GUI include the ability to add/remove Depots, list/create/modify Image Profiles, list VIB details, create/modify rules to map hosts to Image Profiles, check compliance of hosts against these rules and remediate hosts.

autodeploy

Instructions for using Auto Deploy GUI

  1. Download the Auto Deploy GUI Plugin zip file, extract it and double-click the AutodeployGUI5xTP_build number.exe file.
  2. Follow the prompts in the wizard to complete the installation.

For detailed instructions on how to use Auto Deploy GUI  please download the below guide:

VMwareAutoDeployGUIPracticalGuide.pdf

The scope of this document is to demonstrate how to configure and use the Auto Deploy
GUI to manage stateless ESXi environments.

This fling can be downloaded from Here

Posted in Vmware, VMware Flings | Leave a comment

VM Resource and Availability Service

Today I was checking the VMware flings site and found one very cool fling which I think is worth sharing as it can help you analysing your environment and help you designing in such a way that resources are highly available to you in case of any disaster.

This Fling enables you to perform a what-if analysis for host failures on your infrastructure. You can simulate failure of one or more hosts from a cluster (in vSphere) and identify how many:

  • VMs would be safely restarted on different hosts
  • VMs would fail to be restarted on different hosts
  • VMs would experience performance degradation after restarted on a different host

With this information, you can better plan the placement and configuration of your infrastructure to reduce downtime of your VMs/Services in case of host failures.

vRasScreenshot

Instructions for using this fling

  1. Open hasimulator.vmware.com to access the web service.
  2. Click on “Simulate Now” to accept the EULA terms, upload the DRM dump file and start the simulation process.
  3. Click on the help icon (at the top right corner) for a detailed description on how to use this service.

This fling can be downloaded from Here

Posted in Vmware, VMware Flings | Leave a comment

Exporting Horizon View Events Database

The VMware View Events Database is used to record all the events that happen in a View environment. The database contains all the information but at times it can be difficult to extract those information for troubleshooting or analysis.

This is a fling from VMware called “Horizon View Events Database Export” which allows administrators to easily apply very detailed filtering to the data and export it to a .CSV file.

You can filter on time range, event severity, event source, session type usernames and event types. The application allows for extremely granular export of data. The exported columns can also be customized and the application will export data from both the live and the historical tables in the View Events Database.

This utility can be downloaded from VMware site at

https://labs.vmware.com/flings/horizon-view-events-database-export-utility

Posted in Vmware, VMware Flings | Leave a comment

VMware Fault Definitions

Today I was going through Vmware Resource Management Guide and found the below information and thought of sharing it across. The below information points to the faults which can occur in an environment and the reason why this fault has happened.

Having knowledge of common faults that can occur in an environment can help us to understand the issue and starting the troubleshooting.

Virtual Machine is Pinned

This fault occurs when DRS cannot move a virtual machine because DRS is disabled on it. That is, the virtual machine is “pinned” on its registered host.

Virtual Machine not Compatible with any Host

This fault occurs when DRS cannot find a host that can run the virtual machine.

This might occur, for example, if no host can satisfy the virtual machine’s CPU or memory resource needs or if no host currently has network or storage access needed by the virtual machine.

VM/VM DRS Rule Violated when Moving to another Host

This fault occurs when more than one virtual machines running on the same host and share affinity rules with each other cannot be moved to another host.

This might occur because not all the virtual machines can vMotion off the current host. For example, one of the virtual machines in the group is DRS-disabled.

Host Incompatible with Virtual Machine

This fault occurs when DRS considers migrating a virtual machine to a host, but finds that the host is incompatible with the given virtual machine.

This might occur because the target host does not have access to the network or storage connection needed by the virtual machine. Another reason this fault occurs is if the target host has a CPU that differs sufficiently from the current host so that using vMotion amongst the hosts is not supported.

To avoid this, create clusters such that all hosts are configured consistently and vMotion is compatible amongst the hosts.

Another reason the host is incompatible with the virtual machine is that there is a required VM/Host DRS rule in place that instructs DRS to never place this virtual machine on this host.

Host has Virtual Machine that Violates VM/VM DRS Rules

This fault occurs when the virtual machine, when powered on or moved by starting vMotion, would violate a VM/VM DRS rule.

The virtual machine can still be manually powered on or moved with vMotion, but vCenter Server cannot automatically do so.

Host has Insufficient Capacity for Virtual Machine

This fault occurs when the host does not have enough CPU or memory capacity for running the virtual machine.

Host in Incorrect State

This fault occurs when the host is entering maintenance or standby state when needed for DRS action to occur.

To address this fault, cancel the request for the host to enter standby or maintenance mode.

Host has Insufficient Number of Physical CPUs for Virtual Machine

This fault occurs when the host hardware does not enough physical CPUs (hyperthreads) to support the number of virtual CPUs in the virtual machine.

Host has Insufficient Capacity for Each Virtual Machine CPU

This fault occurs when the host does not have enough CPU capacity for running the virtual machine.

The Virtual Machine is in vMotion

This fault occurs when DRS cannot move a virtual machine because it is already in vMotion state.

No Active Host in Cluster

This fault occurs when the cluster in which the virtual machine is being moved does not contain any hosts that are connected and in a non-maintenance state.

This can occur, for example, if all the hosts are disconnected or in maintenance mode.

Insufficient Resources

This fault occurs when an attempted operation conflicts with a resource configuration policy.

This fault may occur, for example, if a power-on operation reserves more memory than is allocated to a resource pool.

Retry the operation after adjusting the resources to allow more memory.

Insufficient Resources to Satisfy Configured Failover Level for HA

This fault occurs when the HA configuration of CPU or memory resources reserved for failover is violated or cannot be met by the DRS operation under consideration.

This fault is reported when:

  • The host is requested to enter maintenance or standby mode.
  • The Virtual machine violates failover when it attempts to power on.

No Compatible Hard Affinity Host

No host is available for the virtual machine that satisfies its mandatory VM/Host DRS affinity or anti-affinity rules.

No Compatible Soft Affinity Host

No host is available for the virtual machine that satisfied its preferred VM/Host DRS affinity or anti-affinity rules.

Soft Rule Violation Correction Disallowed

DRS migration threshold is set at mandatory-only.

This does not allow the generation of DRS actions to correct non-mandatory VM/Host DRS affinity rules.

Posted in Vmware | Leave a comment

VMware launched VCP 6.0 training & certification

Finally VMware has announced the most awaited training and certification for VMware vSphere 6.0.

vSphere 6 Beta is out in market a while ago and many VMware admins have already dirtied their hands by playing around it. Now its time to get an official training and get certified on the same.

The updated certifications not only provides increased flexibility and career growth opportunities but also help in increasing credibility with employers, colleagues and clients. These revisions in certification path give you more options when choosing certification levels and technology areas.

VMware Certification Roadmap

Cert_Roadmap_2015Q1_v5_final_WEB

VMware vSphere 6: Install, Configure, Manage

This course is known as VMware’s one of the most popular certification course features hands-on intensive training that focuses on installing, configuring and managing VMware vSphere 6 that include VMware ESXi™ 6 and VMware vCenter Server™ 6.

All the essential information related to vSphere 6.0 certification is available at MyLearn Page

VMware-vSphere-Install-Configure-Manage

There are 3 distinct ways to attain a vSphere 6.0 training/certification and you can choose the one among the 3 that best suits your need.

So hurry up and register yourself for a web based training or instructor led classroom training.

Posted in Vmware | 1 Comment

VCP6-DCV Certification Now Available

Good news for all VMware Admins. Most awaited VCP6-DCV certification has been announced by VMware today.

This certification that validates your ability to deploy, configure, administer and scale a vSphere 6 virtualized data center, including administering and troubleshooting virtualization technologies.

Check out the requirements for new candidates and migration paths for current VCP on  MYlearn Website, where you can also find the complete objectives for each exam related to this certification:

Posted in Vmware | Leave a comment

PowerOn guest o.s in VMware Workstation using command

If you are running a lot of guest o.s in VMware Workstation and tired of going across tabs to power on these VM’s then there is a simpler way to do this. We can achieve this by using an application called vmrun which is part of VMware Workstation.

You can find this application in the directory where your VMware Workstation is installed.

For E.g: G:\Program Files (x86)\VMware\VMware Workstation

vmrun

How to use this utility

Go To CMD and browse to the path where vmrun.exe is placed and use the below command:

G:\Program Files (x86)\VMware\VMware Workstation>vmrun.exe start “C:\Lab VM’s\DC\DC.vmx”

Note you have to give path to your guest os vmx file in order to start it

vmrun2

You can even create a batch file if you want to power on your guest o.s with windows startup.

You can download the latest version of VMware workstation from Here

Hope this is informational to you. Share it on social media if you find it useful. Happy learning !!!

Posted in Vmware | Leave a comment

RVTools v3.7 Released

Good new for the folks who are big fan of RV Tools and use this tool quite a lot in their production environment.

RVTools is a windows based application designed to use for VMware admins and it lists information about VMs, CPU, Memory, Disks, Partitions, Network, Floppy drives, CD drives, Snapshots, VMware tools, Resource pools. It also displays stats of Clusters, ESX hosts, HBAs, Nics, Switches, Ports, Distributed Switches, Distributed Ports, Service consoles, VM Kernels, Datastores, Multipath info and health checks.

RVTools can be used to disconnect the cd-rom/floppy drives from the virtual machines and even update the VMware Tools installed inside each virtual machine to the latest version.

rvtool

The new features/enhancements that are included in v 3.7 are :

  • VI SDK reference changed from 5.0 to 5.5
  • Extended the timeout value from 10 to 20 minutes for really big environments
  • New field VM Folder on vCPU, vMemory, vDisk, vPartition, vNetwork, vFloppy, vCD, vSnapshot and vTools tabpages
  • On vDisk tabpage new Storage IO Allocation Information
  • On vHost tabpage new fields: service tag (serial #) and OEM specific string
  • On vNic tabpage new field: Name of (distributed) virtual switch
  • On vMultipath tabpage added multipath info for path 5, 6, 7 and 8
  • On vHealth tabpage new health check: Multipath operational state
  • On vHealth tabpage new health check: Virtual machine consolidation needed check
  • On vInfo tabpage new fields: boot options, firmware and Scheduled Hardware Upgrade Info
  • On statusbar last refresh date time stamp
  • On vhealth tabpage: Search datastore errors are now visible as health messages
  • You can now export the csv files separately from the command line interface (just like the xls export)
  • You can now set a auto refresh data interval in the preferences dialog box
  • All datetime columns are now formatted as yyyy/mm/dd hh:mm:ss
  • The export dir / filenames now have a formated datetime stamp yyyy-mm-dd_hh:mm:ss
  • Bug fix: on dvPort tabpage not all networks are displayed
  • Overall improved debug information

This tools is developed by Rob de Veij and can be downloaded from Rob’s Homepage

A million thanks to Rob for developing such a good tool and making the life of all VMware admins easy.

Posted in Vmware | 1 Comment

Migrating Windows VC with MSSQL to VCSA with Postgres DB

Earlier it was not possible to migrate windows based vCenter Server installation with MS-SQL database to vCenter Server Appliance with embedded Postgres DB. But now it is possible to achieve this using a fling called VCS to VCSA Converter. 

Here is a diagram to visualize this process.

vcs-to-vcsa-converter-appliance-diagram

This fling is available on VMware Flings.

Summary

The VCS to VCVA Converter Appliance allows customers to migrate from Windows vCenter Server with an External Microsoft SQL Server Database to the vCenter Server Appliance with an embedded vPostgres database. The Fling migrates the vCenter database, roles, permissions, privileges, certificates and inventory service. The target appliance will run at the same IP address as the source vCenter.

vcs to vcsa

System Requirements

  • vCenter Server running on Windows – vSphere 5.5 or greater
  • The Windows vCenter Server and the vCenter Server Appliance should be running the same version (e.g. vCenter Server Windows 5.5u1 to VCSA 5.5u1)
  • The vCenter Server Appliance should be deployed with at least the same number of CPUs and at least the same amount of memory as the Windows vCenter Server host
  • vCenter Components (Inventory Service, vSphere Web Client and VMware Single Sign On) must be running on the same host as the vCenter Server
  • External Microsoft SQL Server 2008R2 or later for the vCenter Database (VCDB)
  • vSphere Web Client Plugins connected registered with an Active Directory user
  • VMware Single Sign On User/Groups are currently not migrated (require re-registration)
  • Migration Appliance must be able to communicate with the Windows vCenter Server Database and its database as well as the new vCenter Server Appliance. The following ports are used for this communication and should be open on the vCenter Windows server and on the VCSA:
  • Ports: 22 (ssh), 443 (https), 445 (SMB)

Limitations:

  • Microsoft SQL Server and vCenter Server must be on separate hosts
  • Microsoft SQL Express Database is not supported in version 0.9
  • VMware Single Sign On Users and Groups are not migrated in version 0.9
  • Windows Local Users and Groups are not migrated in version 0.9
  • vCenter Alarm action scripts are not migrated in version 0.9
  • The migration will require some downtime for the vCenter Server
  • Linked Mode configuration is not migrated. Multiple vCenters must be migrated separately
  • Any VMware or 3rd party vSphere Web Client plug-ins (e.g. VUM, NSX) that are running on the same host as the vCenter Server will not be migrated

You can watch the below video to walkthrough the process

Posted in Vmware | Leave a comment

Explore and play with vSphere 6.0

VMware-vSphere6

vSphere 6.0 GA has been released by VMware some days back. After reading what’s new in vSphere 6.0 I am all excited to give it a shot like all other VM admins. So here are the download links and related informations to start with.

Release Notes:

Before diving into downloading and start installing I encourage to look for the release notes. The link to the release notes is vSphere 6.0 Release Notes

What’s New in vSphere 6.0

Several posts have been written by our fellow VM admins on this topic and I too wrote a brief post on this. However you can access the official documents from below link:

http://www.vmware.com/files/pdf/vsphere/VMware-vSphere-Platform-Whats-New.pdf

Upgrade Considerations:

If you are planning for upgrading to vSphere 6.0 from previous versions instead of new installation then I would strongly recommend to go through the upgrade recommendations by VMware.

vSphere 6.0 Upgrade Information

Now we are good to jump into download section. Click on vSphere 6.0 Download Links and login to My VMware with your registered user account and request for new trial to start downloading.

Training Videos and Documentation Center

For links to Training videos and Documentation Center you can read my post vSphere 6.0 Training Videos and Docs

Hit like and share this info on social media if the above information is helpful for you. Happy Learning !!!!!

Posted in Vmware | Leave a comment

vSphere 6.0- Training Videos and Documents

vSphere 6.0 GA is out now in market and I know we VM admins are very excited to get our hands dirty into implementation and learning.

So here I am sharing some useful links which help us all in getting started with learning vSphere 6.0

Video Links:

Documents Links:

https://www.vmware.com/support/pubs/vsphere-esxi-vcenter-server-6-pubs.html

Posted in Vmware | 3 Comments

VMware vSphere 6.0 — What’s New?

vSphere 6.0 public beta has been released several months ago and in 2014 VMworld conference some of the new features have been announced. Due to NDA all the features were not disclosed. 

Multi-CPU Fault Tolerance

FT is going to support VM’s with 4 vCPUs and 64GB of RAM. A new feature called fast checkpointing uses a  mechanism to keep primary and secondary VMs in sync. The Record/Replay technology that was previously used is replaced by  Fast checkpointing in vSphere 6.0

 vMotion Enhancements
Earlier upto vSphere 5.5, vMotion was limited to the vCenter/Datacenter boundary but now in vSphere 6.0 vMotion can migrate Virtual Machines across vCenters, virtual switches and routed networks.

Virtual Datacenters
vSphere 6.0 goes one step further than resource Pools. A Virtual Datacenter aggregates CPU, Memory, Storage and Network resources.

vCenter Server Appliance (VCSA)

The VCSA has also been beefed up. With 5.1 you could manage 100 hosts and 3000 powered on VMs. vSphere 6 now allows 1000 hosts and 10,000 powered on VMs. Still Oracle is the only external database supported.

 vSphere Client

VMware has decided to keep on the VI Client for one more release, vSphere 6.0. After that they say it will definitely be gone. Although the Web Client continues to progress and speed up, customer feedback has been that they would like to continue to use the familiar older client for now. No new functionality is being added to the C# Client so although it will be supported, it is only able to manage an ever decreasing subset of vSphere functionality.

Content Library

A way to centrally store VM templates, vApps, ISO images and scripts. The function is similar to the Content Library of vCAC. Content Library’s are replicated over vCenter Server instances. The advantage is a central managed repository preventing for instance severalcopies of  templates of the same guest OS.

Posted in Vmware | 1 Comment

2014 in review

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 35,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 13 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Vmware | Leave a comment

Happy New Year 2015

Wish all my friends and their families a very Happy New Year 2015. Last year was amazing and time has flown by so quickly. I am glad that I met some wonderful guys in this journey.

I have received a lot of love and care from you guys who visit this blog and gain/exchange some knowledge. Continue your passion of learning something new everyday and keep challenging yourself every time. This year will again be fully loaded with lot of posts to share the knowledge which I acquire.

This year I will be concentrating more towards some advance level things in VMware vSphere as I am preparing for advance level exams now and learning some pretty good stuff. However you guys can write me anytime if you want a detailed post on any topic in vSphere.

Also I have planned to learn other VMware products such as Horizon View, Log Insight and vRealize Operations Manager. Currently learning Cisco UCS and Nexus also and will share some posts on these technologies soon. Stay tuned for latest updates.

128

Posted in Vmware | Leave a comment

A general system error occurred: internal error: vim.fault.InvalidLogin

A general system error occurred: internal error: vim.fault.InvalidLogin

When trying to reconnect a vCenter Managed ESXi Host, you receive the following message

A general system error occurred: internal error: vim.fault.InvalidLogin

There’s an easy fix to this issue.

Note: The following fix is not valid if you have enabled lockdown mode for your Esxi server.

  • Connect directly to the ESXi server with the vSphere Client,
  • Under Configuration Tab find and pick Security Profile.
  • Select Properties
  • Select VMware VirtualCenter Agent
  • Button Options
  • Press Stop
  • Start a Session to your vCenter Server with the vSphere Client
  • Try Reconnecting Host.

vCenter Server doesn’t find VirtualCenter Agent running on Esxi and deploys a new agent to server when it is reconnected in vCenter.

Posted in Vmware | Leave a comment

Connections and Ports in Esxi 5.x

Posted in Vmware | Leave a comment

Common system management issues in VMware Infrastructure

1003926
Troubleshooting the VMware VirtualCenter Server service when it does not start or fails
1003895
Stopping, starting, or restarting the VirtualCenter Server service
1003928
Troubleshooting the database data source used by VirtualCenter Server
1003971
Determining if a port is in use
1003979
Investigating the health of a VirtualCenter database server
1003996
Investigating Active Directory when it causes the VirtualCenter Server to stop or fail to start
1003684
Overview of migration compatibility error messages
1003718
Troubleshooting VMotion CPU feature requirement error messages
1004070
Diagnosing why VirtualCenter is not sending email alerts
1003486
Testing network connectivity with the Ping command
1003409
Diagnosing an ESX Server that is Disconnected or Not Responding in VirtualCenter
1003480
Changing an ESX Server’s connection status in VirtualCenter
1003486
Testing network connectivity with the Ping command
1003487
Testing port connectivity with the Telnet command
1003494
Verifying that the Management Service is running on an ESX host
1003495
Verifying that the VirtualCenter Agent Service is running on an ESX host
1003490
Restarting the Management agents on an ESX Server
1003496
Checking for resource starvation of the ESX Server service console
1004002
Diagnosing slow deployment of templates or clones from VirtualCenter
1004028
Troubleshooting slow template deployment on a single template
1003496
Checking for resource starvation of the ESX Server service console
1004089
Configuring the speed and duplex of an ESX Server host network adapter
1004050
Troubleshooting template deployment or cloning when it fails
1005593
Determining the correct version of sysprep to use
1005594
Ensuring VirtualCenter Server is the only VMware product installed on host
1005870
Ensuring the guest operating system type is set correctly
1003870
Diagnosing the Virtual Infrastructure Client when it fails to connect to an ESX host
1003486
Testing network connectivity with the Ping command
1003494
Verifying that the Management Service is running on an ESX host
1003487
Testing port connectivity with the Telnet command
1003887
Troubleshooting permissions errors when connecting to an ESX Server host with the Virtual Infrastructure client
1003869
Diagnosing the Virtual Infrastructure Client when it fails to connect to VirtualCenter
1003486
Testing network connectivity with the Ping command
1003895
Stopping, starting, or restarting the VirtualCenter Server service
1003487
Testing port connectivity with the Telnet command
1003561
Troubleshooting the VMware ESX Server Management Service when it will not start
1003631
Restarting the ESX Server Management service
1003564
Investigating disk space on an ESX host
1003634
Troubleshooting the firewall policy on an ESX Server
1003496
Checking for resource starvation of the ESX Server service console
1003807
Unable to connect to an ESX Server host using Secure Shell (SSH)
1003486
Testing network connectivity with the Ping command
1003906
Verifying that the Secure Shell Daemon is running on an ESX Server host
8375637
Enabling Root SSH Logins on ESX Server 3
1003808
Configuring the ESX Server host firewall for SSH
1003487
Testing port connectivity with the Telnet command
1003691
Diagnosing a VMware High Availability cluster configuration failure
1003692
Verifying a feature is licensed
1003735
Identifying issues with and setting up name resolution on ESX Server
1003713
Configuring name resolution for VMware VirtualCenter
1003486
Testing network connectivity with the Ping command
1003714
Verifying and reinstalling the correct version of VMware VirtualCenter Server agent
1003734
Diagnosing VMware VMotion failure at 10%
1002662
Unable to set VMkernel gateway as there are no VMkernel interfaces on the same network
1003728
Testing VMkernel network connectivity with the vmkping command
1003486
Testing network connectivity with the Ping command
1003735
Identifying issues with and setting up name resolution on ESX Server
1003736
Verifying time synchronization across environment
1003791
VMware VMotion fails if target host does not meet reservation requirements
1003496
Checking for resource starvation of the ESX Server service console
1003780
Troubleshooting migration compatibility error: Device is a connected device with a remote backing
1003839
Troubleshooting Virtual Machine loses network connection after VMware Vmotion
1003486
Testing network connectivity with the Ping command
1002811
Port security on the physical switch causes a loss of network connectivity
1003792
Diagnosing VMware VMotion failure at 90-95%
1003490
Restarting the Management agents on an ESX Server
1003736
Verifying time synchronization across environment
1003791
VMware VMotion fails if target host does not meet reservation requirements
1003496
Checking for resource starvation of the ESX Server service console
1003659
Identifying shared storage issues with ESX 3.x

Common Fault issues in VMware Infrastructure

1007819
Dealing with an unresponsive virtual machine
1007802
Confirming a virtual machine is unresponsive
1007805
Locating a virtual machine log files on an ESX host
1000674
Can’t stop or kill virtual machine
1004344
Identifying causes of not being able to power cycle ESX Server virtual machines
1007808
Ensuring a virtual machine is not inaccessible due to a VMware VirtualCenter issue
1007813
Troubleshooting a virtual machine that has become unresponsive because of an ESX host
1007814
Troubleshooting a virtual machine that is unresponsive because of configuration issues
1007818
Dealing with unresponsive guest OS issues
1007808
Ensuring a virtual machine is not inaccessible due to a VMware VirtualCenter issue
1003895
Stopping, starting, or restarting the VirtualCenter Server service
1002687
Virtual machine stops responding in a Power On state in VirtualCenter
7114568
Cannot Power on Virtual Machines, “Not enough licenses installed to perform operation” Error Message
1004592
Vmware VirtualCenter console displays handshake error.
1007813
Troubleshooting a virtual machine that has become unresponsive because of an ESX host
1003751
Verifying that ESX virtual machine storage is accessible
1004144
ESX Server virtual machines stop responding due to shared storage connectivity issues
1003755
Verifying sufficient free disk space for an ESX virtual machine
1003564
Investigating disk space on an ESX host
1003659
Identifying shared storage issues with ESX 3.x
1006791
Server stops responding and shows errors on a purple screen
10051
Virtual machine does not power on because of missing or locked files
1003690
Ensuring your hardware is functioning correctly
1004005
[Internal] Third Party System Management agents in the Service Console
1007814
Troubleshooting a virtual machine that is unresponsive because of configuration issues
1005734
Troubleshooting a virtual machine that stops responding or fails when the CD-ROM entry is ATAPI
1001637
Virtual machine does not power on and there is high CPU reservation
1002025
Virtual machine stops responding during backup
1002836
Why snapshot removal can stop a virtual machine virtual machine for long time
1003164
Guest stops responding after connecting a USB CD-ROM
1007818
Dealing with unresponsive guest OS issues
1004007
Investigating operating system disk space
1007577
Do not use guest OS performance tools to monitor virtual machine performance
1007866
Using Windows Event Viewer to identify the cause of an unresponsive or failed virtual machine
1004764
Unable to shutdown Windows using Shutdown Guest option

Common Network issues in VMware Infrastructure

1003675
Network adapter does not appear in the Virtual Infrastructure Client
1003685
ESX Server host network adapter compatibility
1003686
Verifying the integrity of the physical network adapter
1003893
Troubleshooting a virtual machine that has no network connectivity
1003786
Verifying virtual network adapter is present and connected to the virtual machine
1003899
Verifying the networking within the guest operating system
1000797
IPSec within a Windows virtual machine
1004883
Network cable of a virtual machine appears unplugged
1003969
NIC team failover, failback, or VMotion results in loss of network connectivity
1003685
ESX Server host network adapter compatibility
1004087
Network performance issues
1004088
NIC teaming in ESX Server
1004099
Configuring promiscuous mode on a virtual switch or portgroup
1001805
Choosing a Network Adapter for Your Virtual Machine
1004109
ESX Server host or virtual machines have intermittent or no network connectivity
1003916
Verifying ESX Server hardware (System, Storage, and I/O) devices are supported
1003724
Verifying a network link
1003825
Configuring a VLAN on a portgroup
1001938
ESX Server Requirements for Link Aggregation
1004089
Configuring the speed and duplex of an ESX Server host network adapter
1003796
Verifying ESX Server host networking configuration on the service console
1002811
Port security on the physical switch causes a loss of network connectivity
1003804
Spanning tree protocol (STP) in an ESX Server environment
1003686
Verifying the integrity of the physical network adapter
1003806
Configuring VLANs in an ESX Server environment
1004127
Sample configuration of external switch VLAN tagging (EST Mode) and ESX Server
1004074
Sample configuration of virtual switch VLAN tagging (VST Mode) and ESX Server
1004252
Sample configuration of Virtual Guest VLAN Tagging (VGT Mode) on ESX server
Posted in Vmware | 1 Comment

Tracking VM Creation and Deletion events using PowerCLI

Below script is used to find the users who created or deleted the VM in the past 7 days.

Note: If you want to know the count for longer period then change the value of AddDays.

For VM creation

Get-VIEvent -MaxSamples ([int]::MaxValue) -Start (Get-Date).AddDays(-30) |

where {$_.Gettype().Name -eq “VmCreatedEvent” -or $_.Gettype().Name -eq “VmBeingClonedEvent” -or $_.Gettype().Name -eq “VmBeingDeployedEvent”} |

%{“{0} created by {1}” -f $_.VM.Name,$_.UserName}

 For VM Deletion

Get-VIEvent -MaxSamples ([int]::MaxValue) -Start (Get-Date).AddDays(-7) | where {$_.Gettype().Name -eq “VmRemovedEvent”} |  %{“{0} created by {1}” -f $_.VM.Name,$_.UserName}

Posted in PowerShell Scripts, Vmware | Leave a comment

vMotion Count using PowerCLI

Below script can help you to get the count of all vMotion events that has happened in the past 24 hrs.

If you want to calculate the count for longer period then change the number AddDays.

Get-VIEvent -Entity (Get-VM -Location $_) -MaxSamples ([int]::MaxValue) -Start (Get-Date).AddDays(-1) |
Where { $_.GetType().Name -eq “TaskEvent” -and $_.Info.DescriptionId -eq “VirtualMachine.migrate”} |
Measure-Object | Select-Object -ExpandProperty Count

Posted in PowerShell Scripts, Vmware | Leave a comment

Tracking SvMotion events with the help of PowerCLI

The Storage vMotion events can be tracked using the below script. You can use this script to the get the count of Storage vMotion events in the past 24 hrs.

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 Count 

Posted in PowerShell Scripts, Vmware | Leave a comment