RSS

Category Archives: vmware

vROPS: resetting admin password and quirks

Recently we found out that we had to reset the admin password due to it being locked and, I think, expired. VMware does have a KB on how to this can be done:

https://kb.vmware.com/s/article/2078313

However, what it fails to mention is that an additional step may be necessary

https://kb.vmware.com/s/article/2131633

Now, if you just reset the admin password, it will allow you to logon via SSH as admin to the appliance. However, if you try to logon as admin to the admin GUI interface, you may encounter incorrect user name/password error. This is corrected by performing the stops in the 2nd KB article.

 

 

Advertisements
 
Leave a comment

Posted by on December 15, 2017 in Operations, vmware

 

Tags: , , ,

vROPS: Configuring auto-mount NFS in appliance

Recently, we need to use a feature in vROPS 6.2+ to dump alerts into a folder.  One of the outbound settings in vROPS is “Log File Plugin”. When you configure it, you tell vROPS to create a text file for each alert in an output folder in the appliance. The recommendation from VMware is that this output folder should be an mounted volume pointing to an external source so that you don’t eat up all the disk space in the appliance. Read the rest of this entry »

 
Leave a comment

Posted by on December 15, 2017 in vmware

 

Tags: , , , ,

PowerCLI: Script to reboot each ESXi hosts

I realized that having done this for a few year, I never really nailed down a script to do this properly. It is very common as a vSphere admin to have to reboot your ESXi hosts after a configuration change or for patching.

Below is a first draft, not pretty code-wise but its a working operational script. I hope to improve on it over time. The basic flow of the script is as follows:

  • You establish a connection to the vCenter server first before running the script
  • You submit an input file which is list of ESXi host names
  • The script reads the list and does the following for each host
    • Sets the host in maintenance mode and counts down to 30 minutes. If the hosts does not get into maintenance mode by then the script terminates and you need to figure out why.
    • If the host goes into maintenance mode, it then force reboots the hosts and waits for 30 minutes again. Again if the host doesn’t come up by 30 minutes, the script terminates and you need to fix the host issue.
    • Lastly, once the host is back online, it sets the host to connected state and works on the next host in the loop.

Read the rest of this entry »

 
Leave a comment

Posted by on November 5, 2017 in powershell, vmware

 

Tags: , ,

NSX: A rookie lesson in packet tracing

Recently we encountered an interesting issue. A particular VM in the cloud be a unpingable sometimes. When the network guy tried to ping this VM from the cloud border routers, there would be no reply from one of the router. Yet on the other router there is no issue. So we had to figure out what happened to the ping packets in the cloud. Read the rest of this entry »

 
Leave a comment

Posted by on November 5, 2017 in Cloud, vmware

 

Tags: , , , , , , ,

vRA network allocation bug with more than 1 networks

Recently the team found a bug in vRA 7.1 and 7.2.

  1. You have  a reservation in vRA with 2 networks (e.g. NW1 and NW2), each assigned to a network profile (e.g. NW-Profile1 and NW-Profile2).
  2. vRA assigns NW1 to the VM
  3. vRA attempts to allocate an IP from the NW-Profile1, but its exhausted
  4. vRA next allocates IP from NW-Profile2 and is successful
  5. vRA does not update the initial network assignment to NW2
  6. The VM is provisioned to the wrong network

You only see this issue if the first network is exhausted. Case was raised to VMware and waiting for their investigation.

 
Leave a comment

Posted by on October 12, 2017 in Cloud, vmware

 

Tags: ,

Cross vCenter NSX failover and failback

So what does NSX cross vCenter failover look like in a real world scenario?

In this setup, we have 2 NSX managers across two sites, with Site A hosting the primary and DR Site hosting the secondary NSX manager. Simulating a DR scenario, the primary NSX manager, all 3 controllers and all the universal DLR control-VMs are shutdown in Site A

Read the rest of this entry »

 
Leave a comment

Posted by on May 21, 2017 in Cloud, vmware

 

Tags: , , ,

PowerCLI: Listing VMs from a bunch of vCenters

I need to grab all the VMs in a list of vCenters, but for each line of VM, I need to know which cluster and ESXi host they sit in. The original script was this;

Get-content .\vc.txt |
% {$vc=$_ ; connect-viserver $vc ; Get-VM |
Select Name, Vmhost, @{Name="Cluster";
Expression={ ((get-vmhost $_.vmhost).parent)}}, Folder,
@{Name="vCenter"; Expression= {$vc}} |
export-csv .\$vc.txt -NoTypeInformation ;
disconnect-viserver $vc –force –confirm:$false }

Even thought the code was straight forward with just a single get-VM execution, it was very slow. The reason was the Cluster field code block, which executes get-vmhost to get the cluster name for each VM, took time to execute.

@{Name="Cluster"; Expression={ ((get-vmhost $_.vmhost).parent)}}

A faster one-line calls each cluster first, then calls each VM in turn.

Get-content .\vc.txt |
% {$vc=$_ ; connect-viserver $vc ; Get-Cluster |
% { $clus=$_.name; Get-VM -Location $Clus |
% { "$($_.name)`t$($_.id)`t$($_.folder)`t$($_.vmhost)`t$Clus`t$vc" |
out-file .\$vc.txt -append }} ;
disconnect-viserver $vc –force –confirm:$false }
 
Leave a comment

Posted by on May 19, 2017 in powershell, vmware

 

Tags: , , ,