Tag Archives: Vmware

AUTOMATE VCENTER SERVER APPLIANCE DEPLOYMENT

I wanted to automate vCenter server appliance – deploying the OVA and also configuring it. I searched online to look at some samples or some code snippets  but didn’t find anything. I pinged the communities and LucD said he doesn’t recall seeing any code either.

Here was my post – https://communities.vmware.com/thread/490649

So I took up the simple challenge and here is the script to automate vCenter server appliance.

The script also uses the latest PowerCli 5.8 Release 1 – the Get-ovfconfiguration is key to deploying your appliances and ensuring they come up ip’d.

The script comes with a config.xml where you input all the parameters and then execute the script. You can also extend this by programmatically generating the config.xml file and executing the script.

The read me for the file is here. You can get my script at my github repo!

Alternatively you have it below as well, but I highly recommend reading the entire info at my github.

Read More …

VMWARE SITE RECOVERY EXPRESS PATCH RELEASED

VMware released the OpenSSL vulnerability express patch for its Site Recovery Manager. This fixes the openssl vulnerability so yes this is a critical patch!

The KB for this is here.

MY FIRST PUBLISHED CODE – CREATE ROLES AND PRIVILEGES USING POWERCLI

This is my first script that I published ever as in EVER! Feel free to comment.

The script’s intention is to create a role with privileges of either set 1 or set 2. As in these sets are two different permission sets with Set 2 being a little more enhanced.

This is what this bit of code does – takes a predefined role and privileges and define it in the $privs1 array.

Once you have all you need – you just pass the parameter and call the script as .\scriptname.ps1 -vcenter vcentername -role-set number

Here the number can be 1 or 2 with 2 pointing to more privileges to the role. There is not much error checking but this is it for now, more in the future..:)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 param([string]$vcenter, [string]$roleset)
if((-not($vcenter)) -and (-not($roleset))){Throw "You must supply vcenter followed by the roleset you want to execute upon. Please input the roleset id as applicable. Valid Rolesets are 1 or 2"}
 
Add-PSSnapin VMware.* -erroraction silentlycontinue
 
$privs1 = @("Acknowledge Alarm","Create Alarm","Disable Alarm Action", "Modify Alarm", "Remove Alarm", "Set Alarm Status", "Create Datacenter", "Move Datacenter", "Remove Datacenter", "Rename Datacenter", "Allocate Space", "Configure Datastore", "Create Folder", "Delete Folder" , "Rename Folder", "Cancel Task", "Assign Network", "Modify Intervals", "Assign Virtual Machine to Resource Pool", "Create Resource Pool", "Migrate", "Modify Resource Pool", "Move Resource Pool", "Remove Resource Pool", "Rename Resource Pool", "View", "Add Virtual Machine", "Assign Resource pool", "Assign vApp", "Clone", "Export", "Import", "Move", "Rename", "Suspend", "Unregister", "vApp Application Configuration", "vApp Instance Configuration", "vApp Resource Configuration", "View OVF Environment", "Add Existing Disk", "Add New Disk", "Add or remove device", "Advanced", "Change CPU Count", "Change Resource", "Configure Managedby", "Display Connection Settings", "Extend Virtual Disk", "Host USB Device", "Memory", "Modify Device Settings", "Query Fault Tolerance Compatibility", "Query Unowned Files", "Raw device", "Reload from path", "Remove disk", "Rename", "Set Annotation", "Settings", "Swapfile placement", "Upgrade virtual Machine compatibility", "Guest Operation Modifications", "Guest Operation Program Execution", "Guest Operation queries", "Create from existing", "Create new", "Move", "Register", "Remove", "Unregister", "Create Snapshot","Remove Snapshot", "Rename Snapshot", "Revert to Snapshot", "Answer Question", "Configure CD Media", "Configure Floppy media", "Console interaction", "Create Screenshot", "Defragment all disks", "Device connection", "Disable fault tolerance", "Enable Fault Tolerance", "Record session on Virtual machine", "Replay session on virtual machine", "Reset", "Suspend", "test Failover", "Test restart secondary VM", "Turn off Fault Tolerance", "Turn On Fault tolerance", "VMware tools install", "Guest operation program execution", "Guest operation queries", "Allow disk access", "Allow read-only disk access", "Clone template", "Clone virtual machine", "Create template from virtual machine", "Customize", "Deploy template" , "Mark as Template", "Mark as virtual machine", "Modify customization specification", "Promote disks", "Read customization specifications")
 
$Privs2 = $Privs1 + "Create", "Delete", "Power OFF", "Power ON"
 
Connect-VIServer -Server $vcenter > $Null
if(!(get-virole -Name "Customer Privileges" -erroraction 'silentlycontinue'))
{
if($roleset -eq "1")
{New-virole -Name "Customer Privileges" -Privilege $Privs1
Write-host "Role created with set 1 privileges"}
if($roleset -eq "2")
{New-virole -Name "Customer Privileges" -Privilege $Privs1
Write-host "Role created with set 2 privileges"}
}
else
{ write-host "Role already exists"
}

 

RECAP OF AVAILABLE NETWORK ADAPTERS

Wanted to refresh our memories with some basics of VMware with the available network adapters for a vm.

Below is a extract from VMware itself!

Available Network Adapters

Only those network adapters that are appropriate for the virtual machine you are creating are available configuration options in the Choose Networks window.

  • Vlance: This is an emulated version of the AMD 79C970 PCnet32- LANCE NIC, and it is an older 10 Mbps NIC with drivers available in most 32-bit guest operating systems except Windows Vista and later. A virtual machine configured with this network adapter can use its network immediately.
  • VMXNET: The VMXNET virtual network adapter has no physical counterpart. VMXNET is optimized for performance in a virtual machine. Because operating system vendors do not provide built-in drivers for this card, you must install VMware Tools to have a driver for the VMXNET network adapter available.
  • Flexible: The Flexible network adapter identifies itself as a Vlance adapter when a virtual machine boots, but initializes itself and functions as either a Vlance or a VMXNET adapter, depending on which driver initializes it. With VMware Tools installed, the VMXNET driver changes the Vlance adapter to the higher performance VMXNET adapter.
  • E1000: An emulated version of the Intel 82545EM Gigabit Ethernet NIC. A driver for this NIC is not included with all guest operating systems. Typically Linux versions 2.4.19 and later, Windows XP Professional x64 Edition and later, and Windows Server 2003 (32-bit) and later include the E1000 driver.

    Note: E1000 does not support jumbo frames prior to ESXi/ESX 4.1.

  • E1000e: This feature emulates a newer model of Intel Gigabit NIC (number 82574) in the virtual hardware. This is known as the “e1000e” vNIC. e1000e is available only on hardware version 8 (and newer) virtual machines in vSphere 5. It is the default vNIC for Windows 8 and newer (Windows) guest operating systems. For Linux guests, e1000e is not available from the UI (e1000, flexible vmxnet, enhanced vmxnet, and vmxnet3 are available for Linux).
  • VMXNET 2 (Enhanced): The VMXNET 2 adapter is based on the VMXNET adapter but provides some high-performance features commonly used on modern networks, such as jumbo frames and hardware offloads. This virtual network adapter is available only for some guest operating systems on ESXi/ESX 3.5 and later.

    VMXNET 2 is supported only for a limited set of guest operating systems:

    • 32- and 64-bit versions of Microsoft Windows 2003 (Enterprise, Datacenter, and Standard Editions).

      Note: You can use enhanced VMXNET adapters with other versions of the Microsoft Windows 2003 operating system, but a workaround is required to enable the option in the VMware Infrastructure (VI) Client or vSphere Client.

    • 32-bit version of Microsoft Windows XP Professional
    • 32- and 64-bit versions of Red Hat Enterprise Linux 5.0
    • 32- and 64-bit versions of SUSE Linux Enterprise Server 10
    • 64-bit versions of Red Hat Enterprise Linux 4.0
    • 64-bit versions of Ubuntu Linux

    In ESX 3.5 Update 4 or higher, these guest operating systems are also supported:

    • Microsoft Windows Server 2003, Standard Edition (32-bit)
    • Microsoft Windows Server 2003, Standard Edition (64-bit)
    • Microsoft Windows Server 2003, Web Edition
    • Microsoft Windows Small Business Server 2003

    Note: Jumbo frames are not supported in the Solaris Guest OS for VMXNET 2.

  • VMXNET 3: The VMXNET 3 adapter is the next generation of a paravirtualized NIC designed for performance, and is not related to VMXNET or VMXNET 2. It offers all the features available in VMXNET 2, and adds several new features like multiqueue support (also known as Receive Side Scaling in Windows), IPv6 offloads, and MSI/MSI-X interrupt delivery.

    VMXNET 3 is supported only for virtual machines version 7 and later, with a limited set of guest operating systems:

    • 32- and 64-bit versions of Microsoft Windows 7, XP, 2003, 2003 R2, 2008, 2008 R2, and Server 2012
    • 32- and 64-bit versions of Red Hat Enterprise Linux 5.0 and later
    • 32- and 64-bit versions of SUSE Linux Enterprise Server 10 and later
    • 32- and 64-bit versions of Asianux 3 and later
    • 32- and 64-bit versions of Debian 4
    • 32- and 64-bit versions of Ubuntu 7.04 and later
    • 32- and 64-bit versions of Sun Solaris 10 and later

    Notes:

    • In ESXi/ESX 4.1 and earlier releases, jumbo frames are not supported in the Solaris Guest OS for VMXNET 2 and VMXNET 3. The feature is supported starting with ESXi 5.0 for VMXNET 3 only.
    • Fault Tolerance is not supported on a virtual machine configured with a VMXNET 3 vNIC in vSphere 4.0, but is fully supported on vSphere 4.1.
    • Windows Server 2012 is supported with e1000, e1000e, and VMXNET 3 on ESXi 5.0 Update 1 or higher.

DATA CORRUPTION IN WINDOWS 2012 VM USING E1000e NICS

So vmware has put up a KB article about possible data corruption that can happen in a Windows 2012 VM that has the E1000e network adapters are used.

VMware says that data corruption may occur when copying data over the network and/or could occur after a network file copy event.

The issue is still under investigation but be advised, use VMXNET3 or the E1000 network adapters  instead of the E1000e adaopter when deploying Windows 2012 vm.

KB Article.

RE-REGISTER SRM vCENTER SERVER EXTENSION

Long story short – our vcenter server crapped out for some reason. I won’t go into those details because it seemed like a trivial issue however this vcenter was also associated with the SRM server.

After the vcenter server was back up – the fix was a clean re-install 🙂  – the SRM service went offline and failed to come back up. The event logs were not specific but the fix for that was running through the ODBC connection setup again. This certainly seems like a known bug to me.

However I was confused about how to re-register the vCenter server extension for SRM. I tried to reinstall the extension but it would not show in the plugins drop down. Typically, if the vcenter server is still the same server – and in this case it was since I reinstalled it – the SRM plugin should show up in the drop down however it did not. The fix was easier than ever.

When the SRM installation is complete, ensure that vCenter Server is registered in the extension.xml configuration file.
 
To ensure that vCenter Server is registered in the extension.xml file:
  1. Browse to the SRM configuration folder at C:\Program Files\VMware\VMware Site Recovery Manager\config.
  2. If the vCenter Server address is incorrect, update the correct address using the command: 

    srm-config -cmd updateext -cfg ../config/vmware-dr.xml -extcfg ../config/extension.xml

Hope this helps. The vmware KB article is here.

Feel free to comment or correct me 🙂

NETAPP vs VMWARE FLOW CONTROL DILEMMA

vQuicky

> Performance improves were seen on environments with ESXi 5.1/NetApp/10G switches having

Flow control disabled

> VMware recommends leaving flow control enabled while NetApp best practice recommends disabling it if using 10G switches.

> VMware recommends investigating pause frames and if too many were found – indicates at an underlying problem.

flowcontrol

 

inDepth

We had recently seen some random datastore drops and issues in our virtualized environment which had a backend Netapp storage. Upon investigation and some deep-dive it was found that flow control was enabled on the entire stack.

This is another article
worth looking – talks about NetApp sending too many pause frames.

Read More …

VMWARE RELEASES vCENTER 5.1 UPDATE 1a THAT FIXES UPDATE 1 ISSUES AS WELL.

For those who kept close watch on 5.1 Update 1 – you are aware of the failed domain login attempts to the vsphere client or the web client which will basically lock you out of your own vmware environment. What vmware had to say about the issue,

This issue can occur if the specified vCenter Server login domain user account is associated with a large number of domain groups and multiple domains are configured as SSO identity sources. The precise number of groups at which this issue can occur varies due to the nature of Active Directory internals. However, it is more likely to occur once domain-group membership for an account exceeds 19.

So if you have an SSO configured for multiple domain identity sources or if you have vcenter domain user accounts associated with large number of groups – updating to 5.1 Update 1 will break things for you!

If you already updated to vCenter 5.1 Update 1 – then the fix is you simply update vCenter to 5.1 Update 1a. The KB article is here.

The article explaining what went wrong is here. The issue was identified to have caused because of the way Active directory domain trusts work.

vCenter 5.1 Update 1 has been replaced with vCenter 5.1 Update 1a for you to download and install.

Lets hope 1a won’t break anything else 🙂

Please do comment if you feel like!

 

 

 

vCenter 5.1 DRS BUG – MULTIPLE MIGRATIONS FOR A VM

vQuicky –

> DRS has a bug that shows multiple vmotions or svmotions for a single vm

> The bug reports operation not allowed in current state.

> The DRS operation, however succeeds.

> The bug is harmless and can be ignored according to vmware.

inDepth  – 

So, in the latest KB articles come up a DRS bug in 5.1 where you will see multiple vmotions or svmotions for a single vm. The alerts end up throwing an error saying – “The operation is not allowed in the current state.”

The kicker is that the vmotion or svmotion that was being performed completes without any issue.

You will also see some logs in the vpxd log file as follows –

 

[07208 error ‘drmLogger’ opID=task-internal-1-2cbc1369-5e-72-b5] [DrmExecute::ExecuteVMotion] VM FW.host.local (/vpx/vm/#2/) is already in VMotion, so not executing another vmotion
> 2013-01-16T15:55:32.018+01:00 [07208 info ‘Default’ opID=task-internal-1-2cbc1369-5e-72-b5] [VpxLRO] — ERROR task-13275 — vm-2 — Drm.ExecuteVMotionLRO: vim.fault.InvalidState:

> –> Result:
> –> (vim.fault.InvalidState) {
> –> dynamicType = <unset>,
> –> faultCause = (vmodl.MethodFault) null,
> –> msg = “”,
> –> }
> –> Args:
> –>

 

The vmware kb article says that this is a bug that can be safely ignored. Apparently they are working on a fix but watch out for your monitoring systems ringing the alarm bells 🙂

You can find the kb article here.

VMware will soon allow Openstack hosting!

20121015-112104.jpg

At OpenStack summit in SanDiego and news from the VMware booth is that VMware ESXi will soon support spinning up OpenStack instances on VMware.

So does that mean the compute node will manage ESXi? Or does it mean ESXi will manage the compute nodes?
It surely is exciting. VMware already bought Nycera which is virtualization for networking and PAAS with Cloudfoundry.

I suspect it will be more than just this!

More as we know it 🙂