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...