SRE, VMware Virtualization, vSphere, vCD, ESX, Configuration Management, Microsoft AD, Security, Networking, and about anything else..
Thursday, December 15, 2011
PowerCLI command to enumerate VM’s mac address inside of vCenter
ForEach ($VirtualMachine in $VM) {
# Get the virtual machine
$VMsView = Get-View -ViewType VirtualMachine -Property Name,Guest.Net -Filter @{"Name"="$VirtualMachine$"}
if ($VMsView) {
$VMsView | `
ForEach-Object {
$VMview = $_
$VMView.Guest.Net | `
Select-Object -property @{N="VM";E={$VMView.Name}},
MacAddress,
IpAddress,
Connected
}
}
}
Trying to find a machine on a HP VirtConnect blade by Mac address
->show interconnect enc0:*
Displays interconnect modules in all bays of a specific enclosure
->show interconnect-mac-table enc0:1
Displays the module MAC table for the module in bay 1 of enclosure enc0
The resulting output seems to be far too much info, with no way to sort through it. I just had putty output to a .txt file and then searched it for the mac address in question.
d15 00:50:56:3B:0D:2B Learned 4 -- --
d5 00:0C:29:73:6C:11 Learned 5 -- --
(lag) 00:50:56:3B:07:91 Learned 4 26
d7 00:50:56:8D:00:00 Learned 4 -- --
The ‘d’ number on the left tells you which blade the VM lives on.
Tuesday, November 29, 2011
Something I learned today about vMotion & Cisco switches
http://www.vmadmin.info/2011/04/vmotion-unicast-flood-esxi.html
Sunday, November 20, 2011
Web browser’s default auto detect proxy server feature chooses proxy server I don’t want to use.
1) you want to use a proxy server for certain websites, but not for others.
2) you don’t want to use a proxy server, you want to go directly out the internet and bypass, but machines auto detect one.
3) a mixture of the above.
The cure is wpad.dat, if you can control DHCP options, then this is a great choice. Add the following options to your scope options.
option wpad-url code 252 = text;
option wpad-url “http://webserver.com/wpad.dat”;
The wpad.dat example file below basically says, go directly to a website, unless it is in domainyouwant2useproxy4.com, then use a specified proxy
Contents of wpad.dat file below:
function FindProxyForURL(url, host)
{
if (isPlainHostName(host))
return "DIRECT";
else if (shExpMatch(host, "*.domainyouwant2useproxy4.com"))
return "PROXY proxy.domain.com:8888";
else if (shExpMatch(host, "*"))
return "DIRECT";
}
Thursday, November 17, 2011
HP blade chassis I/O Configuration – I/O Communication - I/O Mismatch Error
Thursday, November 3, 2011
VLANs on HP BL490G7 blades using Flex-10 not working with vSphere 5 / ESXi 5
The issue appears to stem from an Emulex driver & firmware version.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2007397
The Solution is that HP has updated their advisory with firmware fixes to get this working
Support Flex-10 or Flex Fabric Adapters on VMware ESXi 5.0 in a Virtual Connect Environment
Monday, October 31, 2011
Determine which ESXi Host has a .vmdk file locked
vmkfstools –D /vmfs/volumes/<UUID>/<VMDIR>/<LOCKEDFILE.xxx>I was able to get output that had this in it:Hostname vmkernel: 17:00:38:46.977 cpu1:1033)Lock [type 10c00001 offset 13058048 v 20, hb offset 3499520 Hostname vmkernel: gen 532, mode 1, owner 45feb537-9c52009b-e812- 00137266e200 mtime 1174669462]Therefore the offending Mac address is :00:13:72:66:E2:00
I opened my vSphere client and found the offending nic in my Configuration/Network Adapters by traversing each suspect host.
After rebooting that host, the file lock is gone.
Credit to this article from VMW http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051