Monday, February 27, 2012

List the portgroups for the VM's

As part of a makeshift DR solution, one of my requirements is to have a list of vm's that shows which networkcard is in which portgroup. Powershell to the rescue!

Get-VM | Get-NetworkAdapter | Select-Object @{N="VM";E={$_.Parent.Name}},@{N="NIC";E={$_.Name}},@{N="Network";E={$_.NetworkName}}| Export-Csv vms_in_networks.csv


Hey presto, you have a list that shows which nic goes where.

Friday, January 13, 2012

Middle mouse button emulation

My new Dell XPS laptop is a sweet machine, but the Synaptics drivers didn't have the ability to emulate a middle mouse button functionality by clicking the left and right button on the touchpad.

However, if you add a new key to the registry, then you get that functionality. Copy the following into a .reg file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Synaptics\SynTP\TouchPadPS2]
"HasBothButtonFeature"=dword:00000001

Log off and back on, and you should have the middle mouse button functionality again. I really don't get why Synaptics keep removing/hiding this feature (My HP work laptop had the same issue fixed it there too).

Tuesday, November 29, 2011

Citrix Xenapp Best Practices

A while ago I talked about Citrix Xenapp on VMWare, but now I came across best practices, both from VMWare as well as Citrix. So without further ado:


http://www.vmware.com/files/pdf/solutions/vmware-citrix-xenapp-best-practices-EN.pdf

http://support.citrix.com/article/CTX129761

Both of them say about the same I said in my first post, with some more details.

Friday, November 25, 2011

Invalid configuration for device ’0′ when enabling a NIC in vSphere

Suddenly a VM was unreachable on all interfaces. Upon investigation, I saw that none of the NIC's were set to connected:







When I tried to enable them again I got Invalid configuration for device ’0′:




Some googling led to a simple solution, which is to restart the management agents:

service mgmt-vmware restart

and

service vmware-vpxa restart

Good to know. Thanks go to the cupfighters for investigating it deeper and leading me to the answer.

Tuesday, November 22, 2011

Disable Symantec AV via scripting

A small script to quickly disable Symantec Antivirus 11 (Symantec Endpoint Protection) for those moments that it needs to be disabled quickly:

Open up an administrative commandprompt and type the following commands:

sc config "Symantec AntiVirus" start= disabled
sc config ccEvtMgr start= disabled
sc config SmcService start= disabled

net stop "Symantec AntiVirus"
net stop ccEvtMgr

taskkill /IM smc.exe /F

Symantec Antivirus is now completely disabled

Thursday, November 17, 2011

NFS advanced settings for ESX/ESXi

Netapp has this wonderful Best Practices document available online, which is well worth the read. It used to include the CLI commands but this has been transferred to a new document.

As part of the best practices of an ESX/ESXi installation , you need to change some settings for NFS. I keep forgetting which ones they are, so this a reminder to myself (and anyone that reads this blog ;-) )

The easiest thing to do, is to start up the Remote Tech Support (SSH) service in the security profile, SSH to the host, and copy/paste this into the SSH window:


/usr/sbin/esxcfg-advcfg -s 30 /Net/TcpipHeapSize 
/usr/sbin/esxcfg-advcfg -s 120 /Net/TcpipHeapMax 
/usr/sbin/esxcfg-advcfg -s 10 /NFS/HeartbeatMaxFailures 
/usr/sbin/esxcfg-advcfg -s 12 /NFS/HeartbeatFrequency 
/usr/sbin/esxcfg-advcfg -s 5 /NFS/HeartbeatTimeout 
/usr/sbin/esxcfg-advcfg -s 64 /NFS/MaxVolumes


Note that the last setting says MaxVolumes: 64. The default is set to 8, which means that the maximum number of NFS volumes is 8 by default. Setting the maximum to 64 works for ESX 4.x, but used to be 32 for ESX 3.x. ESX 5.x can even go to 128.

 If you want to follow what VMWare says instead of the Netapp Best Practices, you can set the TCPIP Heap Size to 32 in ESX4/5(see here).

Update for 5.1:

/usr/sbin/esxcfg-advcfg -s 32 /Net/TcpipHeapSize
/usr/sbin/esxcfg-advcfg -s 128 /Net/TcpipHeapMax
/usr/sbin/esxcfg-advcfg -s 10 /NFS/HeartbeatMaxFailures
/usr/sbin/esxcfg-advcfg -s 12 /NFS/HeartbeatFrequency
/usr/sbin/esxcfg-advcfg -s 5 /NFS/HeartbeatTimeout
/usr/sbin/esxcfg-advcfg -s 256 /NFS/MaxVolumes

Wednesday, October 5, 2011

Which NTP server has been configured (and used) for Windows 2008R2

Quick one to remember:

Which NTP server has been configured:
w32tm /query /configuration

Which NTP server is actually being used for the last poll:
w32tm /query /status