Pages

Thursday, February 1, 2018

PowerCLI - attach baseline

$vms = get-content c:\PS\MK\A1Category.txt
Get-Baseline -Name "VMware Tools Upgrade to Match Host (Predefined)" | Attach-Baseline -Entity $vms
Get-Baseline -Name "VM Hardware Upgrade to Match Host (Predefined)" | Attach-Baseline -Entity $vms

Sunday, January 7, 2018

FCoE

FCoE

QLA - 
Host Connectivity
  • On QLogic CNAs, set the Link Down Timeout to 60 seconds (the default is 30 seconds) in the Advanced HBA Parameters. This is necessary to ensure proper recovery or failover if a link fails or becomes unresponsive.

    Switch Configuration

    fka-adv-period

    VFC down due to FIP keepalive misses

    The VFC goes down due to FIP keepalive misses.
    Possible Cause
    When FIP keepalives (FKA) are missed for a period of approximately 22 seconds, this means that approximately three FKAs are not continuously received from the host. Missed FKAs can occur for many reasons, including congestion or link issues.
    FKA timeout : 2.5 * FKA_adv_period.
    The FKA_adv_period is exchanged and agreed upon with the host as in the FIP advertisement when responding to a solicitation.
    Observe the output from the following commands to confirm FKA misses:
    •  show platform software fcoe_mgr info interface vfc <id>
    •  show platform software fcoe_mgr event-history errors
    •  show platform software fcoe_mgr event-history lock
    •  show platform software fcoe_mgr event-history msgs
    •  show platform fwm info pif ethernet <bound-ethernet-interface-id>
    Solution
    Sometimes when congestion is relieved, the VFC comes back up. If the symptom persists, then additional analysis is required. The possible considerations are:
    • The host stopped sending the FKA.
    • The switch dropped the FKA that was received.

Thursday, December 21, 2017

PowerCLI - VM Resource Configuration

READ CURRENT SETTING

Get-VM -name NSX-FBSD-01 | Get-VMResourceConfiguration | Format-Table -Property VM, CpuReservationMhz

CHANGE SETTING

Get-VM -name NSX-FBSD-01 | Get-VMResourceConfiguration | Set-VMResourceConfiguration -CpuReservationMhz 2000 | Format-Table -Property VM, CpuReservationMhz

Tuesday, November 28, 2017

Associate UTAG with VM on Secondary NSX Managers.

Here is the API call you can use on the Primary NSX Manager to assign tags to VMs (which could also be running on the secondary):

POST /api/2.0/services/securitytags/tag/{tag-id}/vm?action=attach

The request body will depend on the Unique ID selection criteria. If you are using instance UUID use:

<securityTagAssignment>
  <tagParameter>
    <key>instance_uuid</key>
    <value>a702c039-fb86-4c5f-b8f4-1c2d80299c97</value>
  </tagParameter>
</securityTagAssignment>

You can determine the appropriate security tag-id using:


GET /api/2.0/services/securitytags/tag

Thursday, November 9, 2017

ESXi host script - list all VM files and check lock status

VM=DLR
VMX=`esxcli vm process list | grep -A 6 $VM | grep "Config" | cut -c 17-300`

egrep "\.vmdk|\.vswp|\.vmx|\.vmxf|\.log" $VMX | cut -d "\"" -f 2 > /tmp/files.txt

for cf in `cat /tmp/files.txt`; do
    echo "the next config file is $cf"
    vmfsfilelockinfo -p $cf -v 192.168.4.100 -u administrator@uw.cz
done



Jeste je potreba doladit cesty k souborum, ktere jsou relativni a ne absolutni.

Saturday, November 4, 2017

Windows vCenter 5.5/6.0 upgrade/migration to VCSA 6.5

VMware clearly announced that windows based vCenter server is deprecated and future versions will be released only as a virtual appliance known as vCenter Server Appliance (VCSA). I have helped one of my customers with upgrade / migration of their vCenter 5.5 to 6.5 and I have documented few points which can be useful for others.

Before migration following points should be validated
  • All ESXi hosts managed by old vCenter must be at least 5.5 because ESXi 5.1 is not supported by vCenter 6.5 
  • All external solutions previously integrated with vCenter must be compatible with vCenter 6.5 
Migration process
  1. If you want migrate VMware Update Manager (VUM) configuration you must run migration assistant on VUM windows server. We have experienced some issues with VUM migration therefore we have decided to unregister VUM (VUM extension name = com.vmware.vcIntegrity) and continue with vCenter migration without VUM data migration. 
  2. Unregister all external vCenter extensions like (SRM, vSphere Replication, Backup Softwares, Storage Extensions, etc.) which must be registered later back to new vCenter (VCSA)
  3. Run Upgrade/Migration assistant on Windows where vCenter service is running
  4. Run Upgrade/Migration wizard on administrator workstation and follow upgrade wizard
  5. If vCenter is joined into Active Directory, Migration Wizard ask you for AD account which is used to join new VCSA 6.5 host into AD. AD account is entered without domain so account DOMAIN\USER must be entered only as USER.
Stages of data migration from source to target vCenter (approx. 35 minutes)
  • 41% - Exporting VMware vCenter Server data - this is the most time consuming part of data migration and progress bar is the whole time in 41% 
  • 42% - vCenter Orchestrator data 
  • 50% - vCenter Authentication Framework
  • 50% - Shutting down source machine 
  • 75% - Applying Active Directory configuration
  • ??
Setup target vCenter Server and services
  • 2% - Starting vCenter Authentication Framework
  • 5% - Starting VMware Identity Management Service
  • 17% - Starting VMware Component Manager 
  • 20% - Starting License Manager
  • 25% - Starting VMware ervice Control Agent
  • 28% - Starting VMware API Endpoint
  • 31% - ???
  • 45% - Starting VMware Postgres - takes a long time
  • ??% - Starting Web Client
  • 62% - Starting vCenter Server
  • 65% - Starting Content Library Service
  • 68% - Starting ESX Agent Service
  • 77% - Starting VMware Update Manager
  • 80% - Starting vCenter High Availability
  • 85% - Starting VSAN 
  • 97% - Starting Vmware performance Charts
  • 100% - ???
Importing copied data to target vCenter Server
  • 14% - Importing Vmware vCenter Inventory Service data
  • ??
  • 50% - Import vSphere Web Client data
  • ??
After migration
  • If you upgraded from vCenter 5.5 you do not have vCenter 6.5 license therefore you have to upgrade your 5.5 license to 6.x on my.vmware.com license portal
Conclusion



We have migrated just vCenter inventory without Events and Performance data. Source vCenter inventory had approx. 1700 virtual machines and around 65 ESXi hosts and the whole migration took 70 minutes. It is not bad if you ask me.

Friday, October 27, 2017

vCenter TCP/UDP ports




ServicePortNotes
vCenter Server 443• Listens for connections from the vSphere Web Client
• Monitors data transfer from SDK clients
Platform Services Controller (PSC)389, 636• LDAP port number for the Directory Services for the vCenter Server and PSC
• Single Sign-On LDAPS
DNS53• Resolves on-prem Identity Source and PSC from VMC
Active Directory / OpenLDAP389, 636, 3268, 3269• Identity Source used for HLM 
• Configured in VMC vSphere Client
ESXi902, 903• Host access to other hosts for migration and provisioning 
• Status update (heartbeat) connection from ESXi to vCenter Server
• Remote console traffic generated by user access to virtual machines on a specific host
• Required for cold migration