Quantcast
Channel: VMware Communities: Message List
Viewing all 168190 articles
Browse latest View live

Script to look for a plug-in on a Windows vCenter

$
0
0

Hey gang, sorry that I haven't been around for a spell - taking care of med business.

 

Here's my question:

I'm tasked with configuring the ESXi Dump Collector to store the coredump in a specific folder on a centralized server.  However, the Dump Collector doesn't show up as a plug-in on vCenter.  It also isn't being found at its designated install area: C:\ProgramData\VMware\VMware ESXi Dump Collector\.  This is already getting into some wild first steps; like finding the vCenter install media and mounting it again so that the dump collector can be installed.  I have 28 vCenters under my care from one end of the country to the other.  Four (4) of those vCenters are VCSAs; which has a totally different process for configuring where the coredump drops.  I really don't wish to go in and out of 24 Windows-based vCenter Servers and perform all of this. However, things would look better if I could find a way to check all 24 by using a script.

 

Can someone help me with writing a script to check into all these vCenters and search for "C:\ProgramData\VMware\VMware ESXi Dump Collector\" and a provide a true/false response on an Export-CSV file?  It's been a long day and I know my brain is on its way to the check-out counter in about 5 hours.  Someone's brain must be working way better than mind.  It seems simple, but I can't figure it out at the moment.  Can anyone help?

 

Thanks in advance,

Miguel


CPU values not coming correctly

$
0
0

Hi All

 

Am using below script to capture CPU and Mem report for Last 2 weeks since last month there was no issues and am getting the report correctly but now am not getting the CPU value correctly

 

Only change what i have done is Updated the host from ESXi 5.5 U2 to Esxi 5.5 U3d

 

 

# VCenter Server Details
$server_address = "Vcenter1"

add-pssnapin vmware.vimautomation.core
Connect-VIserver -server $server_address

Write-host "Gathering Avg CPU & MEM utilization of ESX hosts for last 2 weeks"

$d = get-date -DisplayHint DateTime -Format "d-MMM-yy"
$host1 = Get-vmhost | sort
$utilization = @()

$todayMidnight = (Get-Date -Hour 0 -Minute 0 -Second 0).AddMinutes(-1)
$workingDays = "Monday","Tuesday","Wednesday","Thursday","Friday"
$dayStart = New-Object DateTime(10,04,17,0,00,0) # 00:00 AM
$dayEnd = New-Object DateTime(23,04,17,23,59,0) # 12:50 PM

Foreach ( $h in $host1)
{

$ESXhost = $h.name

# Calculate the Average CPU Usage of each ESX host

$A = Get-Stat -entity $h.name -stat cpu.usage.average -start (get-Date).adddays(-15) -finish (get-date).adddays(-1)

$report = $A | Where-Object {
$workingDays -contains $_.Timestamp.DayOfWeek -and
$_.Timestamp.TimeOfDay -ge $dayStart.TimeOfDay -and
$_.Timestamp.TimeOfDay -le $dayEnd.TimeOfDay }

$CPU1 = $report | Measure-Object -property value -average
$CPU1 = $CPU1.Average

# Calculate the Average MEM Usage of each ESX host

$B = Get-Stat -entity $h.name -stat mem.usage.average -start (get-Date).adddays(-15) -finish (get-date).adddays(-1)

$report1 = $B | Where-Object {
$workingDays -contains $_.Timestamp.DayOfWeek -and
$_.Timestamp.TimeOfDay -ge $dayStart.TimeOfDay -and
$_.Timestamp.TimeOfDay -le $dayEnd.TimeOfDay }

$MEM1 = $report1 | Measure-Object -property value -average
$MEM1 = $MEM1.Average

# Create a new object for output
    $objHostInfo = New-Object System.Object
    $objHostInfo | Add-Member -MemberType NoteProperty -Name AvgCPU -Value $CPU1
    $objHostInfo | Add-Member -MemberType NoteProperty -Name AvgMEM -Value $MEM1
    $objHostInfo | Add-Member -MemberType NoteProperty -Name HostIP -Value $ESXhost

$utilization += $objHostInfo

}

$utilization | Export-csv  C:\Report-$d.csv

Re: powercli script to create datastore alarms

Re: How to enable hot plug on a Windows OS VM running vCenter 6.5 (not VCSA)

$
0
0

Worked great.  Just had to shut down the VM and bring it back up.

 

Thanks for your help!!

Re: Permissions problem with vSphere 6.5 - "Cluster does not contain any hosts"

$
0
0

Thanks,

 

So part of the problem is that we (by our own SSAE statement) can not expose the hosts (hosts = "Infrastructure Resource") to our OUs.

 

This seems like an arbitrary problem, but not exposing Infrastructure to consumers is one of the fundamental tenants of Private Cloud Computing. Basically, if I can't make this work without exposing the hosts, I can't qualify vSphere 6.5 for our environment!

 

From NIST Definition of Cloud Computing:

"The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, storage, or even individual application capabilities"

Re: vMotion Gets Auto Enabled at Random on Management Port Group - Is there a reason?

$
0
0

i have the same problem, but it's getting enabled on one particular host after the upgrade to 6.5, not the management network, and it's causing vmotions to fail.

Re: New vc in vdi environment

$
0
0

You need to remove the old vCenter/Composer servers & add the new ones by going to VMware Horizon Administrator

NOTE: "All pools and desktops managed via that old vCenter server must be deleted first or you will get a warning message and the vCenter server will not be removed."

 

> View Configuration > Servers > vCenter Servers > Edit > Edit vCenter Server  

 

For more info:

LINK: https://www.vmadmin.co.uk/resources/53-view/389-unable-to-remove-vcenter-server-from-view-administrator

 

Raul.

VMware VDI Administrator

http://ITCloudStream.com/

Re: vMotion Gets Auto Enabled at Random on Management Port Group - Is there a reason?

$
0
0

Are you using vmk10 or higher for vMotion traffic? Assuming your mgmt is vmk1?


Issue recognizing External Hard Disk: Seagate Expansion Desk 3TB (VMWARE Workstation)

$
0
0

Hi, i am using WorkStation 12 Pro - 12.5.5 build-5234757

I have Win10 OS

i just bought an external Hard Disk Seagate Expansion Desk 3TB USB 3.0

 

Until now i used this VM with other USB 3.0 devices (hard disk WD 1TB or storage keys) and was perfectly working

 

As soon as i attach my new Seagate HDD it is not recognized from the VM. Furthermore seems that the USB controller dump and neither other USB 3.0 Devices are anymore recognized. (if there is another USB 3.0 device it is not anymore working until i restart the VM)

 

Finally as soon as i attach the new Seagate HDD if i go to Windows - Manage Devices then i notice that this device/controller has stopped to work

picture.JPG

Re: CPU values not coming correctly

$
0
0

Do you have some more info on how the report is incorrect?
Perhaps show the results next to a screenshot of the Performance Advanced tab.

Re: CPU values not coming correctly

$
0
0

Cpu values are coming in single digit and previously it was in double digit and ranges from AVG of 40 to 50 %

 

 

AvgCPU

 

AvgMEM

 

ESX Host

 

1.20014

 

95.32108

 

host1

 

0.356528

 

51.42383

 

host2

 

1.388429

 

84.77133

 

host3

 

1.636207

 

84.71558

 

host4

 

2.497207

 

53.55142

 

host5

 

1.053056

 

91.16175

 

host6

 

1.235409

 

87.18933

 

host7

 

1.429672

 

81.40492

 

host8

 

1.930977

 

91.2515

 

host9

 

2.513631

 

90.65842

 

host10

 

1.641263

 

56.26758

 

host11

 

1.921866

 

75.768

 

host12

 

2.128366

 

63.44075

 

host13

 

1.969909

 

83.055

 

host14

 

1.410768

 

84.01692

 

host15

 

1.592169

 

87.81858

 

host16

 

0.045986

 

3.71

 

host17

 

1.587299

 

94.7795

 

host18

 

1.725955

 

84.86358

 

host19

 

2.775827

 

72.46992

 

host20

 

2.150527

 

69.31542

 

host21

 

2.15692

 

77.13483

 

host22

 

how to delete vm that is not showing up in vcac

$
0
0

how do I delete a vm that is not showing up in vcac but was provision in vcac? probably a failed provision process but the vm is online in vcenter

Re: How to route all audio from guest to host

$
0
0

It doesn't seem to work like that on my system. I use a USB headset (Logitech G930) on the host, which works just fine but the host system doesn't seem to see any audio coming from the guest machine, even it's definitely playing. If I tell the guest machine to connect the USB headset to itself (using Removeable Devices, disconnecting it from the host), I am able to hear the audio just fine from the guest, but then I obviously don't hear the audio from the host.

 

UPDATE:

I found this article:

Sound is not working in Windows virtual machine (1003425) | VMware KB

 

...which instructed me on some updates to the .vmx file. I made those changes and rebooted and the audio is now working as expected!

Re: Script to look for a plug-in on a Windows vCenter

$
0
0

Perhaps try something like this.

It assumes you are connected to all the vCenters

 

$global:DefaultVIServers|%{

    $connected=$folderPresent=$false

    $os=''

    $hostName=$_.ServiceUri.Host

    if(Test-Connection-ComputerName$hostName-BufferSize16-Count1-ErrorActionSilentlyContinue-Quiet)

    {

        $connected=$true

        $os=Get-WmiObject-ComputerName$hostName-ClassWin32_OperatingSystem-ErrorActionSilentlyContinue

        if($os){

            $folderFound=Test-Path-PathTypeContainer-Path"\\$($hostName)\c$\ProgramData\VMware\VMware ESXi Dump Collector"

        }

    }

    [ordered]@{

        HostName =$hostName

        Connected =$connected

        OS =if($os){$os.Caption}else{'VCSA?'}

        FolderPresent =$folderFound

    }

}

How vmware mob is implemented?

$
0
0

I need to redesign our existing perl code, currently we look for objects like VM and Hosts using the name then make vix call to get the object reference this approach is slow in some environments.

We need to redesign this approach to make things faster so I am looking for some helpful info. I noticed that mob accesses the objects using moref_id so may be if we do that it will make thinsg faster. But when I went to implement it I realized that I need to make same vix api call to find moref_id so it will be slow again so I was wondering how mob is implemented. Do they use any cache for name and moref_id? Any information in this area will be very helpful?


Re: CPU values not coming correctly

$
0
0

Try adding  -Instance '' on the Get-Stat cmdlet.
if you have multi-core CPU's on the ESXi nodes, you will get incorrect results.

Spin Count Exceeded

$
0
0

We have installed ESXi 6,5 and we haved recurrent errors with crush purple screen in differents virtual machines with WINDOWS OS and the same error log message:

 

SPIN COUNT EXCEEDED - POSSIBLE DEADLOCK

 

We upgrade BIOS and drivers, and we apply the last patch from ESXi 6.5. We review the posts and all configurations.

 

Any new about this problem? Any sugestioned configuration?

 

Regards,

Re: vCenter Appliance SSH help

$
0
0

This is not a problem or in error. when you reach the command prompt: vc-bake:~ #

root@10.2.5.165's password:

Last login: Fri Apr 21 12:53:14 UTC 2017 from fdr2vg035p.flowers.foods on pts/0

Last login: Fri Apr 21 13:03:53 2017 from fdr2vg035p.flowers.foods

vc-bake:~ #

you are at the Linux command prompt. From here you can do anything you can with a traditional full Linux server OS. Try:

cat /etc/hosts

date

cat /etc/sysconfig/networking/devices/ifcfg-eth0

Each will return information specific to your installation.

Fusion 8.5 problems with custom NAT settings with Port Forwarding: NAT adapter not working and network settings pane grayed out

$
0
0

I'm trying to set up NAT networking in my VMware Fusion 8.5.6 Pro environment using a hard-coded IP address in the DHCP settings along with port forwarding in the NAT configuration settings.  In general, I am attempting to follow the process described at https://medium.com/@tuweizhong/how-to-setup-port-forward-at-vmware-fusion-8-for-os-x-742ad6ca1344 which seemed to provide the best documentation on how to set this up.

 

I first tried creating a new, custom network configuration (which showed up as vmnet3), but I abandoned that and just tried getting the existing vmnet8 NAT adapter to work.

 

I first edited (via sudo nano) my vmnet8 dhcpd.conf file (located in /Library/Preferences/VMware Fusion/vmnet8) to add a fixed IP address.  I made sure the address was outside the reserved IP range within the "DO NOT CHANGE" section of the dhcpd.conf file.

 

# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8.
#
# This file was automatically generated by the VMware configuration program.
# See Instructions below if you want to modify it.
#
# We set domain-name-servers to make some DHCP clients happy
# (dhclient as configured in SuSE, TurboLinux, etc.).
# We also supply a domain name to make pump (Red Hat 6.x) happy.
#




###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####
# Modification Instructions: This section of the configuration file contains
# information generated by the configuration program. Do not modify this
# section.
# You are free to modify everything else. Also, this section must start
# on a new line
# This file will get backed up with a different name in the same directory
# if this section is edited and you try to configure DHCP again.


# Written at: 04/26/2017 11:39:58
allow unknown-clients;
default-lease-time 1800;                # default is 30 minutes
max-lease-time 7200;                    # default is 2 hours


subnet 192.168.110.0 netmask 255.255.255.0 {
  range 192.168.110.128 192.168.110.254;  option broadcast-address 192.168.110.255;  option domain-name-servers 192.168.110.2;  option domain-name localdomain;  default-lease-time 1800;                # default is 30 minutes  max-lease-time 7200;                    # default is 2 hours  option netbios-name-servers 192.168.110.2;  option routers 192.168.110.2;
}
host vmnet8 {  hardware ethernet 00:50:56:C0:00:08;  fixed-address 192.168.110.1;  option domain-name-servers 0.0.0.0;  option domain-name "";  option routers 0.0.0.0;
}
####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######
host R9NoBIM {
hardware ethernet 00:50:56:3E:44:20;
fixed-address 192.168.110.50;
}

 

My VM name is R9NoBIM.  Per the instructions on the first URL above, I set the host to the name of my VM.  (Is this what it should be?  I also tried using vmnet8 as the host here, thinking that this section would override the "DO NOT MODIFY" section above, but that didn't work, either.)

 

I quit, then restarted Fusion.

 

I then edited my nat.conf file to add the port, 8001 (http) that I wished to have forwarded, using the IP address I designated in the dhcpd.conf file above:

 

# VMware NAT configuration file


[host]


# NAT gateway address
ip = 192.168.110.2
netmask = 255.255.255.0


# VMnet device if not specified on command line
device = vmnet8


# Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)
activeFTP = 1


# Allows the source to have any OUI.  Turn this on if you change the OUI
# in the MAC address of your virtual machines.
allowAnyOUI = 1


# Controls if (TCP) connections should be reset when the adapter they are
# bound to goes down
resetConnectionOnLinkDown = 1


# Controls if (TCP) connection should be reset when guest packet's destination
# is NAT's IP address
resetConnectionOnDestLocalHost = 1


# Controls if enable nat ipv6
natIp6Enable = 0


# Controls if enable nat ipv6
natIp6Prefix = fd15:4ba5:5a2b:1008::/64


[tcp]


# Value of timeout in TCP TIME_WAIT state, in seconds
timeWaitTimeout = 30


[udp]


# Timeout in seconds. Dynamically-created UDP mappings will purged if
# idle for this duration of time 0 = no timeout, default = 60; real
# value might be up to 100% longer
timeout = 60


[netbios]
# Timeout for NBNS queries.
nbnsTimeout = 2


# Number of retries for each NBNS query.
nbnsRetries = 3


# Timeout for NBDS queries.
nbdsTimeout = 3


[incomingtcp]


# Use these with care - anyone can enter into your VM through these...
# The format and example are as follows:
#<external port number> = <VM's IP address>:<VM's port number>
#8080 = 172.16.3.128:80
8001 = 192.168.110.50:8001


[incomingudp]


# UDP port forwarding example
#6000 = 172.16.3.0:6001

 

After this I stopped, then restarted my networking by running the following commands in Terminal:

 

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start

 

I confirmed that the networking file within the /Library/Preferences/VMware\ Fusion directory reflected the NAT entry:

 

VERSION=1,0
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH 946E9174153882B15F5D274344959525D511212F
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 192.168.37.0
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH F171831A724DDD8020D6584939B78429F35D4E1D
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 192.168.110.0
answer VNET_8_NAT yes
answer VNET_8_VIRTUAL_ADAPTER yes
add_nat_portfwd 8 tcp 8001 192.168.110.50 8001
add_bridge_mapping en0 2

 

I've tried various configurations, using different adapters, etc., but I came back to the simplest approach of modifying the vmnet8, default NAT adapter.  After making my first attempt, and ever since then, the Networking settings for both the general Fusion Preferences > Networking, as well as the Network Settings pane for my VM are all grayed out, not allowing me to change them.  I've seen this posted elsewhere (as in  Network Settings options greyed out in Fusion Pro 7.1.0 ), but I haven't been able to get the ability to change the settings via the GUI to be restored, even after following a variety of tips that seemed to work for others.

 

Here is the general Fusion Network Settings pane. Even though I've unlocked the settings at the bottom, the settings pane remains grayed out:

Fusion Network Settings.png

 

Here is the Network Settings pane for my specific VM, also completely grayed out an uneducable:

 

VM Network Settings locked.png

 

I am able to change the network adapter via the Virtual Machine > Network Adapter menu, but when I select NAT, the VM client (Windows 2012) just reports that the Media State of the adapter is "Media disconnected".

 

VM Network Settings Menu.png

 

I found a post that recommended checking the vnetlib log for errors.  Here is the section at the end of the log that gets written after restarting the vmware networking:

 

##multiple lines consisting of the following two lines##
Apr 26 11:37:03 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured
Apr 26 11:37:04 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured
Apr 26 11:37:04 VNL_EnableNetworkAdapter - Successfully enabled hostonly adapter on vnet: vmnet1
Apr 26 11:37:04 VNL_StartService - Started "DHCP" service for vnet: vmnet1
Apr 26 11:37:04 VNLNetCfgLookupNATPortFwd - List of NAT forwarded ports is empty
Apr 26 11:37:04 VNLNATReadPortForward - Failed to read TCP port forward config info.
Apr 26 11:37:04 VNL_StartService - Started "NAT" service for vnet: vmnet8
Apr 26 11:37:04 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured
Apr 26 11:37:04 VNL_EnableNetworkAdInternet Software Consortium DHCP Server 2.0
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.


Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html


Configured subnet: 192.168.110.0
Setting vmnet-dhcp IP address: 192.168.110.254
Opened: `J,Qˇ
Recving on     VNet/vmnet8/192.168.110.0
Sending on     VNet/vmnet8/192.168.110.0
apter - Successfully enabled hostonly adapter on vnet: vmnet8
Apr 26 11:37:04 VNL_StartService - Started "DHCP" service for vnet: vmnet8
Apr 26 11:37:04 VNL_Unload - Vnetlib unloaded.

 

The Bridged networking adapter works without any problem.  But in the setup I'm needing to establish I need to use NAT with an IP address that doesn't change, so I can rely on my port forwarding rules to work.

 

Any help on this would be greatly appreciated!

Re: vRA Agent Status Down - how to monitor..

$
0
0

If anyone's interested, I  logged a call.. You can get the proxy agent(s) status from :

 

 

There is no direct public access API for this.

 

If you want to monitor the proxy agent status you can try reaching this URL (you will have to use the service account for VRA that you use on your iaas node).

 

https://iaas_node.vmware.local/repository/data/ManagementModelEntities.svc/Agent

 

Then you have a field.

 

<d:AgentAlive m:type="Edm.Boolean">false</d:AgentAlive>

 

False = DOWN

True = UP

Viewing all 168190 articles
Browse latest View live




Latest Images