Thursday 10 February 2011

VMware DRS Priority rules

I had this issue recently and want to know how VMware DRS prioritise rules. If it considering all setting in Guest VM setup? Probably yes but not in setup below, or I might be wrong.

My setup consists of two ESXi 4.1 server, one vCenter and about 10 VMs.
One particular VM1 has requirements for Security USB dongle which attached to ESX01 and connected via pass-through to VM1 (No vMotion support enabled).

My cluster DRS settings as follows:
Automation level: Manual
DRS Groups Manager:
Virtual machines DRS Groups:
USB – VM1 included in this group

Host DRS Groups:
USB-ESX01 – ESX01 is included into this group

Name: VM1 on ESX01
Type: Run VMs on Hosts
DRS Group members: USB and USB-ESX01

Virtual Machine Options: Enabled individual virtual machine automation levels.
Automation level for VM1 set to Fully Automated
Others VMs set to default and inherited settings from DRS cluster, meaning Manual Level.

All other DRS settings set to defaults.

I move all VMs to ESX01. In the evening VM1 starts generate 100% CPU load. DRS move VM1 from ESX1 to ESX2 and then move it back a minute later (Probably realizing there was a rule to keep VM1 on ESX01). Obviously USB device was connected without vMotion enabled and was disconnected.

After described above scenario my understanding VMware DRS moved VM1 without taking into consideration:
1.       USB attached to VM1 with no vMotion support
2.       Rule “Run VMs on Hosts” hasn’t been considered before DRS move VM1 to another host. However Rule was read after vMotion happens but USB device was disconnected and required manually reconnected.

And BTW “VMware vSphere 4.1 HA and DRS Technical Deepdive” book by Duncan Epping and Frank Denneman ordered and should arrive by end of Feb. Hopefully I can find my answer there.

Sunday 6 February 2011

Creating/importing multiple user accounts on Windows servers. Domains or standalone servers.

Part of my day to day job is to manage and deploy cloud infrastructures. One of the probably simple tasks and time consuming is to adding new user accounts into new domains and standalone servers. When we talking about 5 -10 accounts it is easy, but when it comes to 50 and more and creating these on multiple standalone servers it become an issues which I wanted to resolve and make it as simple and possible. I don’t claim to be scripting expert or MS Excel guru. But I made it for myself and it works so I decide to share it with wider auditorium.
Resolution to this problem is incorporates into to one excel spread sheet where you put your details for new users and on another sheet you have readymade code which you simply copy and paste into batch file and run on your servers. It utilizing standard Windows commands and doesn’t required any special software to be installed on the servers.
Used commands:
AD: dsadd user
Local users: “net user” and “net localgroup”
Download file from here:

Please download and try it for yourself, if you find it useful please leave me your comment, or If you made additions and find a way to make it more easy with more features please share it.