2008-11-30

Israeli VMUG will take place on Wednesday Dec. 3rd

On the schedule:

- VMware
- Virtual Desktop Technical Deep Dive
- EMC Recover Point
- Product announcements and upcoming technologies (from VMworld 2008)


It should be a good morning ...

So what to do with 60 or so servers that are falling out their warranty period


I wanted share with you a bit of what is happening with a process on how we can save money with virtualization.

About 3 years ago or more, Virtualization was not the mainstream for most companies, personally, my current employer did not really get into it until about 18 months ago. So... we are doing our yearly review on what hardware warranty will end and at the moment it looks like that I will have over 60 physical servers that will need to be replaced or have a maintenance contract applied to them for the next year.

A bit of Math:

Average server (1QC/2GB RAM/2x73GB 15,000 SAS HD) - US$3,500
A maintenance contract (next business day [NBD]) for a year for the above mentioned 60 servers - $450 per server

So these are the options as I see them...

  1. Replace all Physical servers with new ones - US$210,000
  2. Renew Maintenance contracts for all servers - US$27,000 (per year)
  3. Migrate the machines to Virtual machines:
    2xESX Hosts - US$10,000
    2xESX Enterprise Licenses - US$17,000
    1 TB Central Storage - $3,000

So I guess you can see where I am going with this.. :)

No one in management is going to sign off on option 1.
I think you can see why option 3 is better than option 2. The cost of option 2 over 3 years - US$81,000. Option 2 - $US30,000 (including maintenance and support on VMware software for the period of 3 years).

Now the only thing I need to convince the brass about is that all these servers should not be migrated "as-is" to Virtual Machines, but re-installed to a new OS just as they would do if it would be migrated to new hardware. I really and truly do not want to drag over Windows NT 4.0 and Windows 2000 Server Operating Systems and continue to support them..

But that is a whole different ballgame, and for another post....

2008-11-22

Clearing the connection list of your VI client

That small drop-down list on the IP Address/Name fiels can get a bit cluttered after you start working with a large amount of servers and start a lot of testing. So how do I clear the list you may ask?

HKEY_CURRENT_USER\Software\VMware\VMware Infrastructure Client\Preferences

Remove the entries you want from the list and hey presto!!!

Thanks for the info Duncan

2008-11-16

Changing Custom Notes on Virtual Machines

I wanted to do a bit of housekeeping for all the VM's floating around.

I got to the state that there are machines that I do not know who they belong to, when they were installed and who is the responsible party in case the **** hits the fan.

That is where the VI toolkit comes to the rescue !!

What I did was added to addiditonal fields for each machine.

1. Owner
2. Date installed

This was pretty each to do both

Create the field

Get-cluster <Clustername>| get-vm | New-CustomField -name Owner
Get-cluster <Clustername>| get-vm | New-CustomField -name "Date installed"


Now to populate the field you would use

get-vm <VM Name>| Set-CustomField -name Owner -value "Whatever you want"

Now say you don't know which property it is you would like to update, well that you can get from running this command:

PS C:\Program Files\VMware\Infrastructure\VIToolkitForWindows> get-vm <VM Name>| Get-View


Capability           : VMware.Vim.VirtualMachineCapability
Config               : VMware.Vim.VirtualMachineConfigInfo
Layout               : VMware.Vim.VirtualMachineFileLayout
EnvironmentBrowser   : VMware.Vim.ManagedObjectReference
ResourcePool         : VMware.Vim.ManagedObjectReference
ResourceConfig       : VMware.Vim.ResourceConfigSpec
Runtime              : VMware.Vim.VirtualMachineRuntimeInfo
Guest                : VMware.Vim.GuestInfo
Summary              : VMware.Vim.VirtualMachineSummary
Datastore            : {VMware.Vim.ManagedObjectReference}
Network              : {VMware.Vim.ManagedObjectReference}
Snapshot             :
GuestHeartbeatStatus : green
Parent               : VMware.Vim.ManagedObjectReference
CustomValue          : {10}
OverallStatus        : green
ConfigStatus         : green
ConfigIssue          : {}
EffectiveRole        : {-1}
Permission           : {}
Name                 : <VM Name>
DisabledMethod       : {Destroy_Task, UnregisterVM, RevertToCurrentSnapshot_Task, RemoveAllSnapshots_Task...}
RecentTask           : {}
DeclaredAlarmState   : {alarm-15.vm-3208, alarm-4.vm-3208, alarm-5.vm-3208}
TriggeredAlarmState  : {}
Value                : {10}
AvailableField       : {Date Installed, Owner}
MoRef                : VMware.Vim.ManagedObjectReference
Client               : VMware.Vim.VimClient


AvailableField       : {Date Installed, Owner} is what you are looking for. These are the fields that you are looking to update.

Thanks to LucD for pointing me in the right direction here and here.

My next step will be to create a script that will run daily, and update any VM that has not been populated with the date installed field - with the current date. Maybe even go as far as to send a reminder email to the Cluster Admin to update the owner in the correct field.

Will Let you know how it turns out.


2008-11-14

ESX3i - Console Commands

Well we all know that OFFICIALLY VMware does not support any kind command that are running locally on the host of ESX3i. Of course there is a way to enable SSH to an ESX3i box But the question is how to run these commands?? Well you can do a lot.. vim-cmd is the command you are looking for: Few examples: vim-cmd hostsvc/datastore/listsummary - will give you a list of all the datastores on the host (local and remote)
(vim.Datastore.Summary) [ (vim.Datastore.Summary) { dynamicType = <unset>, datastore = 'vim.Datastore:490ebeb2-4c2bfcc6-0a2e-0011258e8214', name = "Local-esx3-lab", url = "/vmfs/volumes/490ebeb2-4c2bfcc6-0a2e-0011258e8214", capacity = 31138512896, freeSpace = 30683430912, accessible = true, multipleHostAccess = <unset>, type = "VMFS", }, (vim.Datastore.Summary) { dynamicType = <unset>, datastore = 'vim.Datastore:lab-of1:/mnt/storage/nfs/ESX', name = "lab-of1", url = "/vmfs/volumes/9fb378d1-bf803d06", capacity = 315019616256, freeSpace = 307618623488, accessible = true, multipleHostAccess = <unset>, type = "NFS", } ]
vim-cmd hostsvc/datastore/nascreate - Will add a new NFS share vim-cmd hostsvc/net/info - will give you a list of all the network settings on the host
(vim.host.PortGroup) { dynamicType = <unset>, key = "key-vim.host.PortGroup-LAB Only-Network", vswitch = <vim.host.VirtualSwitch:key-vim.host.VirtualSwitch-vSwitch1>, computedPolicy = (vim.host.NetworkPolicy) { dynamicType = <unset>, security = (vim.host.NetworkPolicy.SecurityPolicy) { dynamicType = <unset>, allowPromiscuous = false, macChanges = true, forgedTransmits = true, }, nicTeaming = (vim.host.NetworkPolicy.NicTeamingPolicy) { dynamicType = <unset>, policy = "loadbalance_srcid", reversePolicy = true, notifySwitches = true, rollingOrder = false, failureCriteria = (vim.host.NetworkPolicy.NicFailureCriteria) { dynamicType = <unset>, checkSpeed = "minimum", speed = 10, checkDuplex = false, fullDuplex = false, checkErrorPercent = false, percentage = 0, checkBeacon = false, }, nicOrder = (vim.host.NetworkPolicy.NicOrderPolicy) { dynamicType = <unset>, activeNic = (string) [ "vmnic1" ], }, }, offloadPolicy = (vim.host.NetOffloadCapabilities) { dynamicType = <unset>, csumOffload = true, tcpSegmentation = true, zeroCopyXmit = true, }, shapingPolicy = (vim.host.NetworkPolicy.TrafficShapingPolicy) { dynamicType = <unset>, enabled = false, averageBandwidth = <unset>, peakBandwidth = <unset>, burstSize = <unset>, }, }, spec = (vim.host.PortGroup.Specification) { dynamicType = <unset>, name = "LAB Only-Network", vlanId = 0, vswitchName = "vSwitch1", policy = (vim.host.NetworkPolicy) { dynamicType = <unset>, security = (vim.host.NetworkPolicy.SecurityPolicy) null, nicTeaming = (vim.host.NetworkPolicy.NicTeamingPolicy) null, offloadPolicy = (vim.host.NetOffloadCapabilities) null, shapingPolicy = (vim.host.NetworkPolicy.TrafficShapingPolicy) null, }, }, } ], pnic = (vim.host.PhysicalNic) [ (vim.host.PhysicalNic) { dynamicType = <unset>, key = "key-vim.host.PhysicalNic-vmnic1", device = "vmnic1", pci = "06:00.0", driver = "tg3", linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) null, validLinkSpecification = (vim.host.PhysicalNic.LinkSpeedDuplex) [ (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 10, duplex = false, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 10, duplex = true, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 100, duplex = false, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 100, duplex = true, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 1000, duplex = false, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 1000, duplex = true, } ], spec = (vim.host.PhysicalNic.Specification) { dynamicType = <unset>, ip = (vim.host.IpConfig) { dynamicType = <unset>, dhcp = false, ipAddress = "", subnetMask = "", }, linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) null, }, wakeOnLanSupported = true, mac = "00:11:25:8e:82:15", }, (vim.host.PhysicalNic) { dynamicType = <unset>, key = "key-vim.host.PhysicalNic-vmnic0", device = "vmnic0", pci = "05:00.0", driver = "tg3", linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 100, duplex = true, }, validLinkSpecification = (vim.host.PhysicalNic.LinkSpeedDuplex) [ (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 10, duplex = false, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 10, duplex = true, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 100, duplex = false, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 100, duplex = true, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 1000, duplex = false, }, (vim.host.PhysicalNic.LinkSpeedDuplex) { dynamicType = <unset>, speedMb = 1000, duplex = true, } ], spec = (vim.host.PhysicalNic.Specification) { dynamicType = <unset>, ip = (vim.host.IpConfig) { dynamicType = <unset>, dhcp = false, ipAddress = "", subnetMask = "", }, linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) null, }, wakeOnLanSupported = true, mac = "00:11:25:8e:82:14", } ], vnic = (vim.host.VirtualNic) [ (vim.host.VirtualNic) { dynamicType = <unset>, device = "vmk0", key = "key-vim.host.VirtualNic-vmk0", portgroup = "Management Network", spec = (vim.host.VirtualNic.Specification) { dynamicType = <unset>, ip = (vim.host.IpConfig) { dynamicType = <unset>, dhcp = true, ipAddress = "xx.xx.xx.xx", subnetMask = "255.255.254.0", }, mac = "00:11:25:8e:82:14", }, port = <vim.host.PortGroup.Port:key-vim.host.PortGroup.Port-16777220>, } ], dnsConfig = (vim.host.DnsConfig) { dynamicType = <unset>, dhcp = false, virtualNicDevice = <unset>, hostName = "esx3-lab", domainName = "xxx.xxx.com", address = (string) [ "xx.xx.xx.xx", "xx.xx.xx.xx" ], searchDomain = (string) [ "xx.xx.com" ], }, ipRouteConfig = (vim.host.IpRouteConfig) { dynamicType = <unset>, defaultGateway = "xx.xx.xx.xx", gatewayDevice = <unset>, }, consoleIpRouteConfig = (vim.host.IpRouteConfig) { dynamicType = <unset>, defaultGateway = <unset>, gatewayDevice = <unset>, }, }
In Short there is a whole world out there on an ESX3i "console" - you just have to go and find it...

2008-11-12

VIRTUALIZATION08 in Israel - Nov. 12 2008 - Part II

Personally I thjink it was mostly a waste of time. Nothing new was said - most of the talk was about VDI (not that I have anything against it) but there was no OOMPH!! in it.

Hope the next Israeli VMUG will be better


2008-11-11

ESX3i - Console Commands

Well we all know that OFFICIALLY VMware does not support any kind command that are running locally on the host of ESX3i. Of course there is a way to enable SSH to an ESX3i box

But the question is how to run these commands??

Well you can do a lot..

vim-cmd is the command you are looking for:

Few examples:
vim-cmd hostsvc/datastore/listsummary  - will give you a list of all the datastores on the host (local and remote)

(vim.Datastore.Summary) [
   (vim.Datastore.Summary) {
      dynamicType = <unset>,
      datastore = 'vim.Datastore:490ebeb2-4c2bfcc6-0a2e-0011258e8214',
      name = "Local-esx3-lab",
      url = "/vmfs/volumes/490ebeb2-4c2bfcc6-0a2e-0011258e8214",
      capacity = 31138512896,
      freeSpace = 30683430912,
      accessible = true,
      multipleHostAccess = <unset>,
      type = "VMFS",
   },
   (vim.Datastore.Summary) {
      dynamicType = <unset>,
      datastore = 'vim.Datastore:lab-of1:/mnt/storage/nfs/ESX',
      name = "lab-of1",
      url = "/vmfs/volumes/9fb378d1-bf803d06",
      capacity = 315019616256,
      freeSpace = 307618623488,
      accessible = true,
      multipleHostAccess = <unset>,
      type = "NFS",
   }
]
vim-cmd hostsvc/datastore/nascreate - Will add a new NFS share

vim-cmd hostsvc/net/info - will give you a list of all the network settings on the host

     (vim.host.PortGroup) {
         dynamicType = <unset>,
         key = "key-vim.host.PortGroup-LAB Only-Network",
         vswitch = <vim.host.VirtualSwitch:key-vim.host.VirtualSwitch-vSwitch1>,
         computedPolicy = (vim.host.NetworkPolicy) {
            dynamicType = <unset>,
            security = (vim.host.NetworkPolicy.SecurityPolicy) {
               dynamicType = <unset>,
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
            },
            nicTeaming = (vim.host.NetworkPolicy.NicTeamingPolicy) {
               dynamicType = <unset>,
               policy = "loadbalance_srcid",
               reversePolicy = true,
               notifySwitches = true,
               rollingOrder = false,
               failureCriteria = (vim.host.NetworkPolicy.NicFailureCriteria) {
                  dynamicType = <unset>,
                  checkSpeed = "minimum",
                  speed = 10,
                  checkDuplex = false,
                  fullDuplex = false,
                  checkErrorPercent = false,
                  percentage = 0,
                  checkBeacon = false,
               },
               nicOrder = (vim.host.NetworkPolicy.NicOrderPolicy) {
                  dynamicType = <unset>,
                  activeNic = (string) [
                     "vmnic1"
                  ],
               },
            },
            offloadPolicy = (vim.host.NetOffloadCapabilities) {
               dynamicType = <unset>,
               csumOffload = true,
               tcpSegmentation = true,
               zeroCopyXmit = true,
            },
            shapingPolicy = (vim.host.NetworkPolicy.TrafficShapingPolicy) {
               dynamicType = <unset>,
               enabled = false,
               averageBandwidth = <unset>,
               peakBandwidth = <unset>,
               burstSize = <unset>,
            },
         },
         spec = (vim.host.PortGroup.Specification) {
            dynamicType = <unset>,
            name = "LAB Only-Network",
            vlanId = 0,
            vswitchName = "vSwitch1",
            policy = (vim.host.NetworkPolicy) {
               dynamicType = <unset>,
               security = (vim.host.NetworkPolicy.SecurityPolicy) null,
               nicTeaming = (vim.host.NetworkPolicy.NicTeamingPolicy) null,
               offloadPolicy = (vim.host.NetOffloadCapabilities) null,
               shapingPolicy = (vim.host.NetworkPolicy.TrafficShapingPolicy) null,
            },
         },
      }
   ],
   pnic = (vim.host.PhysicalNic) [
      (vim.host.PhysicalNic) {
         dynamicType = <unset>,
         key = "key-vim.host.PhysicalNic-vmnic1",
         device = "vmnic1",
         pci = "06:00.0",
         driver = "tg3",
         linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) null,
         validLinkSpecification = (vim.host.PhysicalNic.LinkSpeedDuplex) [
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 10,
               duplex = false,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 10,
               duplex = true,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 100,
               duplex = false,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 100,
               duplex = true,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 1000,
               duplex = false,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 1000,
               duplex = true,
            }
         ],
         spec = (vim.host.PhysicalNic.Specification) {
            dynamicType = <unset>,
            ip = (vim.host.IpConfig) {
               dynamicType = <unset>,
               dhcp = false,
               ipAddress = "",
               subnetMask = "",
            },
            linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) null,
         },
         wakeOnLanSupported = true,
         mac = "00:11:25:8e:82:15",
      },
      (vim.host.PhysicalNic) {
         dynamicType = <unset>,
         key = "key-vim.host.PhysicalNic-vmnic0",
         device = "vmnic0",
         pci = "05:00.0",
         driver = "tg3",
         linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) {
            dynamicType = <unset>,
            speedMb = 100,
            duplex = true,
         },
         validLinkSpecification = (vim.host.PhysicalNic.LinkSpeedDuplex) [
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 10,
               duplex = false,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 10,
               duplex = true,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 100,
               duplex = false,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 100,
               duplex = true,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 1000,
               duplex = false,
            },
            (vim.host.PhysicalNic.LinkSpeedDuplex) {
               dynamicType = <unset>,
               speedMb = 1000,
               duplex = true,
            }
         ],
         spec = (vim.host.PhysicalNic.Specification) {
            dynamicType = <unset>,
            ip = (vim.host.IpConfig) {
               dynamicType = <unset>,
               dhcp = false,
               ipAddress = "",
               subnetMask = "",
            },
            linkSpeed = (vim.host.PhysicalNic.LinkSpeedDuplex) null,
         },
         wakeOnLanSupported = true,
         mac = "00:11:25:8e:82:14",
      }
   ],
   vnic = (vim.host.VirtualNic) [
      (vim.host.VirtualNic) {
         dynamicType = <unset>,
         device = "vmk0",
         key = "key-vim.host.VirtualNic-vmk0",
         portgroup = "Management Network",
         spec = (vim.host.VirtualNic.Specification) {
            dynamicType = <unset>,
            ip = (vim.host.IpConfig) {
               dynamicType = <unset>,
               dhcp = true,
               ipAddress = "xx.xx.xx.xx",
               subnetMask = "255.255.254.0",
            },
            mac = "00:11:25:8e:82:14",
         },
         port = <vim.host.PortGroup.Port:key-vim.host.PortGroup.Port-16777220>,
      }
   ],
   dnsConfig = (vim.host.DnsConfig) {
      dynamicType = <unset>,
      dhcp = false,
      virtualNicDevice = <unset>,
      hostName = "esx3-lab",
      domainName = "xxx.xxx.com",
      address = (string) [
         "xx.xx.xx.xx",
         "xx.xx.xx.xx"
      ],
      searchDomain = (string) [
         "xx.xx.com"
      ],
   },
   ipRouteConfig = (vim.host.IpRouteConfig) {
      dynamicType = <unset>,
      defaultGateway = "xx.xx.xx.xx",
      gatewayDevice = <unset>,
   },
   consoleIpRouteConfig = (vim.host.IpRouteConfig) {
      dynamicType = <unset>,
      defaultGateway = <unset>,
      gatewayDevice = <unset>,
   },
}

In Short there is a whole world out there on an ESX3i "console" - you just have to go and find it...

And now for something funny

So every now and again you come across something that makes you laugh - today was one of those days.

It seems that someone in VMware has a good sense of humor. I found this line in a log file of one of my VM's today.

11 16:07:40.032: vmx| VMX has left the building: 0.