When was vm created, how vm was created and who has created this vm ?

I wanted to know where it is possible, who has created virtual machine. When the virtual machine was created and how it was created.
The idea is very simple. As an input i will take a virtual machine, and the output should be an object with few properties. VM can be created in several ways, right ? So i need to search for different events. When vm is being created/deployed it will create an event for this fact. Those events are as follows:

VmBeingCreatedEvent – Vm is created manually. Right-click New-VM. When we do VM in this way, a second event joins VmRegisteredEvent. So To check for vms there were manually created, we have to browse for events and check if 2 types of events have occured.
VmBeingDeployedEvent – When vm was deployed from template it will make this type of event
VmRegisteredEvent – When vm was registered, for example, open datastore browser, right click on vmx – register.
VmClonedEvent – When vm was cloned.
Continue reading

Issues with vmmonitoring in HA clusters while using vsphere client 5.0.0 build 455964, vm monitoring with vmware tools down will not restart failed vm

I wanted to share with everybody this ‘news’.

While trying to create vm monitoring within HA cluster using vm monitoring only i went into some issues. VM monitoring was not working. I thought there is not that much to configure to have this working right ? Open cluster settings, go to vm monitoring section

Continue reading

get-vievent too slow ? :) BOOSTING get-vievent !

There was quite interesting question on communities today. I think it’s worth to share it with everybody what and how 😉
Right so, let’s say you want to get some events from entities using get-vievent:

DESCRIPTION
Retrieves information about the events on a vSphere server. An event is any action in the vCenter Server system or ESX host. The cmdlet collects events that correspo
ned by the cmdlet parameters. Filters are additive and the Entity. Start, and Finish parameters filter the events both by the entity and the timestamp properties. To
om the default one, use the -Server parameter.

Continue reading

Change vnic type from / to e1000, Flexible, Vmxnet, EnhancedVmxnet, and Vmxnet3, and Unknown with Set-NetworkAdapter. UPDATED!

What if you noticed that your vms are running on wrong network card type ? Let’s say you want e1000 instead of vmxnet3 for some reason.There is a great cmdlet set-networkadapter. This will help us out in that kind of situation(Thx Rafael!).
Right, so what set-networkadapter can do for us ? (by this time you should read the get-help set-networkadapter -full). So now, like you already know 😉 it can do a lot for us! But what i want from it right now, is to help me with changing the adapter type. I want to change it from vmxnet 3 to e1000, would be cool if i will not need to shutdown vm too 😉 Unfortunately it will not be so cool at all !!! VM has to be powered off to make this change properly. Please do not do this while vm is up and running.
Continue reading