GROUPING OF NICS ESX

I need to understand the collection of NETWORK adapters so I can understand the flow of traffic and models and failover.

Bare with me if I ask very simple questions...

The scenario I have in mind is a blade server, but I guess that the question applies to any server. So for simplicity, lets use servers in a rack mount...

Suppose a half rack with 2 network cards that are associated with one of the 3 grouping mechanisms used in ESX. With the consolidation of NETWORK cards, there's never a physical NETWORK card that is inactive, correct? According to oither, two interface cards physical network in the team will have traffic passes through them - IE the load balancing/sharing. Isn't it?

vmware forum.jpg

Based on hashed IP NIC teaming will most likely a simple VM with a unique vNIC to use two physical network cards (depending on the workflow). And although based on the port and on MAC do not allow a virtual machine to use two physical network adapters, it will very probably an ESXi host with multiple virtual machines to use two physical network adapters. Therefore, any type of grouping of NETWORK cards is used, it is very likely that the physical NIC in the team will be forwardign traffic - perhaps at different levels, but nevertheless, both will be active.

Yes, both the natachasery in the team can be active according to the flow of traffic and the grouping policy. Even if a single virtual machine cannot use several uplinks if it is configured with at least 2 cards policy network based on the Port and MAC. With IP-political Hash, it is possible for an adapter single virtual machine to use multiple uplinks if the destination addresses are different. Addition to these is LBT (as Andre mentioned), it will monitor uplinks and if one of the uplink is saturated (greater than 75% by default), it will move the virtual machine to another uplink traffic.

Apart from the docs shared by others, I suggest you to watch pt.3 of "Great VSwitch debate"... I found it very useful for me.

http://kensvirtualreality.WordPress.com/2009/04/05/the-great-vswitch-debate%E2%80%93part-3/

Tags: VMware

Similar Questions

  • Grouping of NICs - active standby

    Hi guys

    I have a couple of servers that have only 2 natachasery... since I must manage management, Vmotion, VM traffic,... .more these 2 I thought I'd use the grouping of NETWORK cards to switch physical level in accordance with article

    http://blog.scottlowe.org/2006/12/04/ESX-Server-NIC-teaming-and-VLAN-Trunking/

    My question

    1. the article on the consolidation of NETWORK cards and road based on intellectual property has always applies to ESXi 4.1?

    2. If I have set up this grouping of NICs (1) two vmnic will be active both in right vswitch policies? There is not any assets or liabilities since both will transmit data.

    Thank you very much

    ESX and ESXi share the same basic functions.

    Default grouping is active/active on different porgroup or vNIC or vmkernel interfaces and is active/passive on a single virtual interface.

    For more information, see:

    http://www.VMware.com/files/PDF/virtual_networking_concepts.PDF

    André

  • Copy the files/etc/passwd and/etc/Group from your ESX Server to the machine that you want to use as map server

    I'm trying to set up an NFS share on my windows server so that I can do vMotion.  I have 2 ESX servers that will access the storage location so that I can vMotion the content on an ESX Server to the other ESX Server.  I came across many discussion forums who say I need to "copy the files/etc/passwd and/etc/Group for your ESX Server to the machine that you want to use as map server"... How can I copy these files onto my ESX Server?

    I am VERY VERY new to VMware and will need step by step instructions on how to do it.

    Thanks in advance!

    Hello

    Try this http://vmetc.com/2008/02/19/create-a-nfs-share-for-vm-iso-files-with-windows-2003-server-r2/ and this

    http://ITKnowledgeExchange.TechTarget.com/it-consultant/Configuring-NFS-in-Windows/

    To copy the files everywhere I would use WINSCP which based a gui app secure copy, which should make it easy to copy the file into the Windows box

    Concerning

  • Grouping of NICs in the guest operating system

    We have 4 ESX servers each containing cards of 4 GB for the production traffic. These are combined to form a 4 GB pipe to the Cisco switch. Our guest VM is rc2 for windows 2008 and my problem is that I need to know if its possible to team within the virtual machine NIC windows 2008.

    We have 4 NIC physical that teamed up to form 4 GB pipe to cisco switch 2008 physical windows with the same configuration of network servers

    If I copy a file of 5 GB from one physical server to another physical server, it takes about 70 seconds (which is great). If I copy the file of one of the physical servers to one of my VM servers it takes longer than 3 minutes (not good).

    If I copy the same file between 2 servers on the same ESX host it takes also more than 3 minutes (not good)

    If my theory is right, then I think the bottleneck is the fact that my VM servers only have one NIC 1 Gb so ideally, I wish I could make team a pair of network adapters in a virtual machine and repeat the test.

    Any information on how to network within the guest virtual machine team interface cards would be appreciated.

    Thank you

    VM NIC teaming is useless in most of the cases, in particular that. 3 minutes is equivalent to 27 MB/s, which is only 25 to 30% speed to 1 GB.

    Run a pure network Guide, in your case system disk can be a bottleneck.

    ---

    MCSA, MCTS, VCP, VMware vExpert 2009

    http://blog.vadmin.ru

  • vmk0 behind a together group of NIC

    I have a temporary need to do this, the network adapters are configured as an LACP trunk on the procurve and the vSwitch has NIC Teaming the value:

    Load Balancing-road based on IP Hash

    State of the failover detection-Link network only

    Notify the switches-Yes

    Restoration-Yes

    But shortly after that I loose connectivity and ILO will need to connect to the consoel where I notice the setting management of NICs is bound to a single network adapter which I assume may not work as the procurve switch has all the configuration of ports in an LACP trunk?

    Any ideas?

    Thank you

    Hello

    LACP is supported only (so far) on the implementation of the distributed switch from Cisco (Nexus 1000 V). http://VMware.com/files/PDF/technology/cisco_vmware_virtualizing_the_datacenter.PDF

    So better is to simply configure trunking VLAN on natachasery all connected and to install across all load balancing the natachasery. If you have enough natachasery, consider booking two natachasery and connect them to a group of ports separate vSwitch or dvSwitch for traffic management and VMotion and put them in a team of recovery.

    Hope that helps.

    Best regards, Ronald.

    If you enjoy my reviews, consider awarding points for a Correct or useful response. Thank you!

  • Grouping of NICs in a virtual machine

    Someone has set up a virtual machine with the network as fact on a team

    physical server?

    Post edited by: RDellimmagine to remove foreign XML

    Is not necessary, cause you have joining the vSwitch level.

    I think it's possible, you need software for the team (under Linux, you can use glue, but in Windows utilities?)

    André

    * If you found this device or any other answer useful please consider awarding points for correct or helpful answers

  • EtherChannel in ESX 4 issue.

    We have configured our with Etherchannels Cisco 4948 switches, and then I can't ping my host vSphere virtual machine... Any suggestions?

    Our config

    S3 (config) #int port-channel 1

    S3(Config-if) #description for network cards

    S3(Config-if) #int gi0/23

    S3(Config-if) mode #channel-group 1 on

    S3(Config-if) #int gi0/24

    S3(Config-if) mode #channel-group 1 on

    Which mode you have the vSwitch under the tab grouping of NIC load balancing?

    http://beyondvm.com/Tutorial-802-3ad-port-configuration-with-ESX/

    ---

    If you have found any of my reviews useful please consider giving points to 'Correct' or 'useful '. Thank you!!!

    www.beyondvm.com

  • How the Virtual Machine port group communication?

    How the Virtual Machine port group communication?

    Port group is virtual aggregation of ports on vSwitch. A vSwitch can have multiple Port groups which separate the different network traffic. Port groups communicate with vSwitch, and we have physical network maps on vSwitch which establish communication with the external network. We can configure security, NIC teaming, traffic shapping nework political and at the level of the port groups. Once the port group is created, we can assign to vNIC

    How to establish communication?

    Public network > Switch L3 Core > ESXi physical adapter > vSwitch > groups > virtual NIC > Virtual Machine

    Virtual machine connect to the physical map using vNIC coming on Port groups. This is how it works.

  • Privileges user in multiple groups

    Hi all

    I'm having a problem about the privileges on a farm at my place of work. The problem is this: my user belongs to a group (authenticated against an Active Directory domain) which plays the role of administrator of the entire farm. However, on a specific folder, another group (which I also belong, same AD domain) is configured with the user of the Virtual Machine role.

    The result is that the level of privilege that I have on the record is not that of an administrator, but as a simple user (so the lowest level possible).

    Is there a way to change this behavior, perhaps with a configuration setting? It is not possible to have my user name removed for the second group, I have to find another way.

    Please help me solve this problem.

    Best regards

    Alberto M.

    I found this information about vCenter 4.1...

    Several permission settings

    If multiple group permissions are set on the same object and the user belongs to two or more of these groups, two situations are possible:

    • If no permission is set for the user on this object, the user is assigned to the set of privileges assigned to the groups of this object.
    • If a permission is set for the user on this object, the user's consent takes precedence over all permissions group.

    I just tested against vCenter 5.1 and get the expected behavior as above...

    Daniel is an AD account in the group Admins of ESX in AD assigned to the Administrator role in vCenter.  Daniel is also assigned to the ESX unalterable group.  If I create a new folder in "folder1" vCenter and assign ESX Read-Only read-only permissions on this file, the account of daniel has access read-only as expected.  The permissions set on the child object folder1 override inherited permissions.

    The above permissions by leaving in place where daniel is a member of an administrator (legacy) and read-only group (child object) on Folder1, but with more specific permissions on the child object taking precedence.  If I add in the permissions of the user as administrator on Folder1 daniel, daniel now has permissions of administrator on this issue.  The user has set the permissions on the object takes precedence over all permissions group.

  • Question about the Admins of ESXi group

    I've been playing with the integration of ads today.

    I created a group of Admins ESX

    Added to some users

    Host added to AD

    Then I connected the Client vSphere directly to the host and the authentication of works fine, but

    When I click on users and anything associated to ESX Admins groups

    If I click on all groups that resides on the host and no mention of ESX Admins

    So, I'm checking in AD and watch from the directors of ESX being members of nothing.

    Any suggestions on where to find the Admins of ESX group so that I can set it to no access

    You will be able to select this group when you assign permissions to objects.

    André

  • NIC Teaming recommended

    Hi all

    I would like to enable the consolidation of NETWORK cards in my ESXi 5.0 environment. Below is given my details to set up the laboratory.

    3 ESXi 5.0 servers

    ESXi all have 4 NIC cards

    Requirement: -.

    Grouping of NETWORK adapters for virtual machines (VM running in their own VIRTUAL local area network)

    I want to activate the grouping of NIC for VM in vSwitch1 and VM will be in the VLAN. I provide 2 NIC to the VM, 1 NETWORK card will be given to the Management Console, 1 NETWORK card will be for vMotion.

    Please find below the attached screenshot.

    NIC Teaming.JPG

    Please suggest your views on this topic How to proceed on this matter.

    No need to modify the policy at all. Since my first post:

    -Configure the VLAN 100 management network and set active =, = vmnic1 vmnic0 paused on the port group

    -Add a port group vMotion with VLAN 101 and set vmnic0 = standby, vmnic1 = active on the port group

    With this configuration, you would have two vSwitches with two uplinks from each. The first for management/vMotion configured as described above and the vSwitch for the networking of virtual machines with two NICs paid on assets.

    André

  • ESX Cluster load - wise host...

    Hi all

    I have 2 groups with the ESX hosts.

    Now I need to get the report for each configuration of cluster and cluster has HOSTs.configuration... I want the report as report cluster resource and the cluster HOST... same

    as below

    NOMCLUSTER |  Total space (MB) | Available CPU (Mhz). Total of the CPU (Mhz).   Total physical memory (MB) |   Memroy available (MB)

    ____________________________________________________________________________________________________________


    Thks for LUKE providing report below. , I received this report of our vmware blogs, its rreport even this only for CLUSTERS

    I hope you understand my problem.

    appreciate your help

    Thank you

    ALDOVMWARE

    # Virtual Center Server
    $VCServerName = 'my servername. "
    $creds = get-Credential
    # Some variables
    $portvc = "443".
    $VC = connect-VIServer-Server $VCServerName - Credential $creds - ErrorAction Stop - port $portvc
    $report = @)
    $clusterName = "MonitoringTestCluster".
    $report = foreach (Get-cluster-name $clusterName $cluster) {}
    $esx = $cluster | Get-VMHost
    # $ds = get-Datastore - VMHost $esx | where {$_.} Type - eq "VMFS" - and $_. Extensiondata.Summary.MultipleHostAccess}
    New-object PSObject-property @ {}
    VCname = $cluster. Uid.Split(':@') [1]
    DCname = (Get-Data Center-Cluster $cluster). Name
    NOMCLUSTER = $cluster. Name
    'Number of guests' is $esx. County
    'Total of processors' = ($esx: measure - InputObject {$_.}) Extensiondata.Summary.Hardware.NumCpuPkgs} - sum). Sum
    'Total core' = ($esx: measure - InputObject {$_.}) Extensiondata.Summary.Hardware.NumCpuCores} - sum). Sum
    'Ability to failover current CPU' is $cluster. Extensiondata.Summary.AdmissionControlInfo.CurrentCpuFailoverResourcesPercent
    'Ability to failover of current memory' is $cluster. Extensiondata.Summary.AdmissionControlInfo.CurrentMemoryFailoverResourcesPercent
    "Configured failover ability" = $cluster. Extensiondata.ConfigurationEx.DasConfig.FailoverLevel
    "The level of automation of migration" = $cluster. Extensiondata.ConfigurationEx.DrsConfig.DefaultVmBehavior
    'Recommendations of DRS' = & {$result = $cluster. Extensiondata.Recommendation | %{$_. Reason ;} If ($result) {[string]::Join(',',$result)}}}
    'DRS flaws' = & {$result = $cluster. Extensiondata.drsFault | %{$_. Reason ;} If ($result) {[string]::Join(',',$result)}}}
    'Migration threshold' is $cluster. Extensiondata.ConfigurationEx.DrsConfig.VmotionRate
    'hosts target loading standard deviation' = "NA".
    "Host current care gap" = "NA".
    'Total physical memory (MB)' = ($esx |) Measure-Object-MemoryTotalMB property-sum). Sum
    'Configured MB memory' = ($esx |) Measure-Object-MemoryUsageMB property-sum). Sum
    'Available Memroy (MB)' = ($esx |) Measure-object - InputObject {$_.} MemoryTotalMB - $_. MemoryUsageMB} - sum). Sum
    'Total CPU (Mhz)' = ($esx |) Measure-Object-CpuTotalMhz property-sum). Sum
    'Configured CPU (Mhz)' = ($esx |) Measure-Object-CpuUsageMhz property-sum). Sum
    'Available CPU (Mhz)' = ($esx |) Measure-object - InputObject {$_.} CpuTotalMhz - $_. CpuUsageMhz} - sum). Sum
    'Total of free space (MB)' = ($ds | where {$_.}) Type - eq "VMFS"} | Measure-Object-CapacityMB property-sum). Sum
    'Configured (MB) disk space' = ($ds |) Measure-object - InputObject {$_.} CapacityMB - $_. FreeSpaceMB} - sum). Sum
    'Disk space available (MB)' = ($ds |) Measure-Object-FreeSpaceMB property-sum). Sum
    }
    }
    $report | Export-Csv "Q:\Cluster-Report.csv" - NoTypeInformation - UseCulture

    Try this, it's the closest you can get.

    You cannot combine different objects (files) in a CSV file.

    # Virtual Center Server
    $VCServerName = "my servername" $creds = Get-Credential # Some variables
    $portvc="443" $VC = Connect-VIServer -server $VCServerName -Credential $creds  -ErrorAction Stop -port $portvc$report = @()
    $clusterName = "MonitoringTestCluster"foreach($cluster in Get-Cluster -Name $clusterName){
      foreach($esx in (Get-VMHost -Location $cluster)){
        $report += New-Object PSObject -Property @{
            VCname = $cluster.Uid.Split(':@')[1]
            DCname = (Get-Datacenter -Cluster $cluster).Name        Clustername = $cluster.Name        VMHost = $esx.Name        "Number of hosts" = $esx.Count        "Total Processors" = ($esx | measure -InputObject {$_.Extensiondata.Summary.Hardware.NumCpuPkgs} -Sum).Sum        "Total Cores" = ($esx | measure -InputObject {$_.Extensiondata.Summary.Hardware.NumCpuCores} -Sum).Sum        "Current CPU Failover Capacity" = $cluster.Extensiondata.Summary.AdmissionControlInfo.CurrentCpuFailoverResourcesPercent        "Current Memory Failover Capacity" = $cluster.Extensiondata.Summary.AdmissionControlInfo.CurrentMemoryFailoverResourcesPercent        "Configured Failover Capacity" = $cluster.Extensiondata.ConfigurationEx.DasConfig.FailoverLevel        "Migration Automation Level" = $cluster.Extensiondata.ConfigurationEx.DrsConfig.DefaultVmBehavior        "DRS Recommendations" = &{$result = $cluster.Extensiondata.Recommendation | %{$_.Reason};if($result){[string]::Join(',',$result)}}
            "DRS Faults" = &{$result = $cluster.Extensiondata.drsFault | %{$_.Reason};if($result){[string]::Join(',',$result)}}
            "Migration Threshold" = $cluster.Extensiondata.ConfigurationEx.DrsConfig.VmotionRate        "target hosts load standard deviation" = "NA"        "Current host load standard deviation" = "NA"
            "Total Physical Memory (MB)" = ($esx | Measure-Object -Property MemoryTotalMB -Sum).Sum        "Configured Memory MB" = ($esx | Measure-Object -Property MemoryUsageMB -Sum).Sum        "Available Memroy (MB)" = ($esx | Measure-Object -InputObject {$_.MemoryTotalMB - $_.MemoryUsageMB} -Sum).Sum        "Total CPU (Mhz)" = ($esx | Measure-Object -Property CpuTotalMhz -Sum).Sum        "Configured CPU (Mhz)" = ($esx | Measure-Object -Property CpuUsageMhz -Sum).Sum        "Available CPU (Mhz)" = ($esx | Measure-Object -InputObject {$_.CpuTotalMhz - $_.CpuUsageMhz} -Sum).Sum        "Total Disk Space (MB)" = ($ds | where {$_.Type -eq "VMFS"} | Measure-Object -Property CapacityMB -Sum).Sum        "Configured Disk Space (MB)" = ($ds | Measure-Object -InputObject {$_.CapacityMB - $_.FreeSpaceMB} -Sum).Sum        "Available Disk Space (MB)" = ($ds | Measure-Object -Property FreeSpaceMB -Sum).Sum    }
      }
    }
    $report | Export-Csv "Q:\Cluster-Report.csv" -NoTypeInformation -UseCulture
    
  • New users not in ESX Admins in AD

    We use AD authentication, works perfectly, with the group Admins of ESX.  We must now add a few users, temporarily on a test host couple.  We do not want to add to the ESX Admins in AD.

    If we simply add them to the passwd on the host and sudoers file, that will work?  In other words, they will still get the AD passthrough authentication?  Or must we treat them as local accounts completely and create passwords on the host?

    You must create local users or change all the files.  Just go to the permissions tab for the host and select Add permission.   When you add a user, you must change the domain (server) in your AD domain name.

  • ESX host reboots randomly

    Hi friends,

    Two ESX hosts with different hardware and different storage arrays restarts randomly once a week.

    Please check the below details:

    Group 1
    =======

    ESX 4.0 261974 build

    Server model: Dell PowerEdge R805

    : Processor AMD Quad-core Opteron (tm) processor 2376

    Storage model: Local Storare + NFS mount

    System reboots one or two times a week

    Feb 21 14:20:01 cfdresx1 crond [8037]: pam_unix(system-auth-generic:session): session closed for the root user
    Feb 21 14:22:55 cfdresx1 login: pam_unix(system-auth-generic:session): session closed for the root user
    Feb 21 14:23:16 cfdresx1 sshd [2518]: received signal 15. closing.
    Feb 21 14:23:17 cfdresx1 sshd [28064]: pam_unix(system-auth-generic:session): session closed for the admin user
    Feb 21 14:23:17 cfdresx1 sshd [28141]: pam_unix(system-auth-generic:session): session closed for the admin user
    Feb 21 14:23:17 cfdresx1 sshd [29326]: pam_unix(system-auth-generic:session): session closed for the admin user
    Feb 21 14:23:18 cfdresx1 sshd [7983]: pam_unix(system-auth-generic:session): session closed for the admin user
    Feb 21 14:23:18 known cfdresx1: pam_unix(system-auth-generic:session): session closed for the root user
    Feb 21 14:23:18 cfdresx1 last message repeated 3 times
    Feb 21 14:23:22 cfdresx1 sshd [14542]: pam_unix(system-auth-generic:session): session closed for the admin user
    Feb 21 14:23:22 known cfdresx1: pam_unix(system-auth-generic:session): session closed for the root user
    21 Feb 14:27:20 cfdresx1 sshd [2464]: server listens on 0.0.0.0 port 22.
    21 Feb 14:27:58 cfdresx1/usr/lib/vmware/bin/vmware-hostd [2700]: pam_per_user: create_subrequest_handle(): search for user 'root' card
    21 Feb 14:27:58 cfdresx1/usr/lib/vmware/bin/vmware-hostd [2700]: pam_per_user: create_subrequest_handle(): creation of new subquery (user = 'root', = 'system-auth-generic' service)
    21 Feb 14:27:58 cfdresx1/usr/lib/vmware/bin/vmware-hostd [2700]: pam_unix(system-auth-generic:auth): authentication failure; logName = uid = 0 euid = 0 TTY = ruser = rhost = user = root
    Feb 21 14:28:25 cfdresx1/usr/lib/vmware/bin/vmware-hostd [2700]: pam_per_user: create_subrequest_handle(): search user ID 'vpxuser '.
    Feb 21 14:28:25 cfdresx1/usr/lib/vmware/bin/vmware-hostd [2700]: pam_per_user: create_subrequest_handle(): creation of new subquery (user = "vpxuser", service = "system-auth-local)
    Feb 21 14:30:01 cfdresx1 crond [6866]: pam_per_user: create_subrequest_handle(): search for user 'root' card
    21 Feb 14:30:01 cfdresx1 crond [6866]: pam_per_user: create_subrequest_handle(): creation of new subquery (user = 'root', = 'system-auth-generic' service)
    Feb 21 14:30:01 cfdresx1 crond [6866]: pam_unix(system-auth-generic:session): session opened for user root by (uid = 0)


    Group 2
    =======

    ESX 4.0 261974 build

    Server model: HP Proliant DL380 G5

    Storage model: EMC FAS 2020

    Processor: Intel Xeon E5310

    Fibre channel drive (Smart array P800)

    System restarts once or wice a week

    17 February 13:46:49 cfesx02 vmkernel: 3:06:29:42.934 cpu1:6071) VSCSI: 6025: handle 8245 (vscsi4:0): device destroying world 6072 (pendCom 0)
    17 February 13:46:49 cfesx02 vmkernel: 3:06:29:43.057 cpu1:6071) DevFS: 2370: could not find the device: 7f20c802-NP-5 - delta.vmdk
    17 February 13:46:49 cfesx02 vmkernel: 3:06:29:43.206 cpu1:6071) VSCSI: 6025: handle 8246 (vscsi1:0): device destroying world 6072 (pendCom 0)
    17 February 13:46:50 cfesx02 vmkernel: 3:06:29:44.356 cpu4:6088) VMotionSend: 2921:1297971987014193 S: sent all modified pages to destination (band network bandwidth ~115.203 MB/s)
    17 February 13:47:14 cfesx02 vmkernel: 3:06:30:08.548 cpu5:4137) WARNING: NFSLock: 2036: disk is locked by other consumers
    17 February 13:47:14 cfesx02 vmkernel: 3:06:30:08.548 cpu5:4137) NFSLock: 2677: can't get the lock on file 5 - NP - 36a6887b.vswp 0 x 410003234410 on 192.168.48.32 (192.168.48.32): busy
    17 February 15:02:28 cfesx02 vmkernel: TSC: 0 cpu0:0) Init: 418: cpu 0: tsc measured at the beginning of 2300092987 Hz speed
    17 February 15:02:28 cfesx02 vmkernel: TSC: 10276 cpu0:0) Init: 419: vmkLoadEntry = $[0x390ab9a0]
    17 February 15:02:28 cfesx02 vmkernel: TSC: 18114 cpu0:0) Cpu: 346: id1.version 100f42
    17 February 15:02:28 cfesx02 vmkernel: TSC: 25157 cpu0:0) CPUAMD: 214: detection of xapic on AMD_K8:tcr = 0x4fc820
    17 February 15:02:28 cfesx02 vmkernel: TSC: cpu0:0 30887) CPUAMD: 315: effective family = 16

    Could someone please let me know why the reboot is happening?

    You can also drop in the newspapers of the host-d and/or information provided by a dump of support?

    My suspicion is that you can have something material related current. Have you checked the hardware section of the cilent VI or the HP tools?

    -Cody

    http://professionalvmware.com

  • Script to automate the affinity of the crib of DRS-groups

    Hello

    I am trying to automate the rules of affinity for the drs Group Manager. The idea is to let some virtual machines running on

    assigned to the esx host (type 'Run VMs on Hosts' / 'Should run on hosts in the group').

    Background: we have esx hosts in two data centers interconnected 10 giga with a metrocluster netapp on each site hosting the nfs exports. I created two groups of type "Host DRS Groups" (in datacenter esx host a go into one, hosts datacenter b go the other) and two groups of type 'Machine virtual DRS Groups' (virtual machines hosted on export nfs one go into one, while the virtual machines hosted on nfs export b go the other). In this way, we can prevent nfs/iscsi traffic across data centers.

    Create the rules manually in a small cluster works. However with dozens of virtual machines in the other groups, there must be a way to automate the task and that it is regualary. I let powercli generate a list of VMS according to nfs export (hard location is either the field a or site b) then import the given in the Virtual Machine DRS group concerned.

    Using get-drsrule-Cluster 'cluster ' | Export-CliXml does not display a details for groups of DRS HOST or Virtual Machine DRS. Is it possible to do it at all? I recon using set-drsrule let me import rules.

    Any help / ideas is appreceated.

    Concerning

    Sascha

    The current DrsRule cmdlets do not, all I know, allows you to work with groups of DRS.

    As an alternative, you can use the ReconfigureComputeResource method that is available.

    The script should look like this

    $clusterName = "MyCluster"
    $cluster = Get-Cluster -Name $clusterName
    
     $spec = New-Object VMware.Vim.ClusterConfigSpecEx
    $groupVM = New-Object VMware.Vim.ClusterGroupSpec $groupVM.operation = "add" $groupVM.Info = New-Object VMware.Vim.ClusterVmGroup $groupVM.Info.Name = "Grouped VM" 
    
    Get-VM -Name MyVM1* | %{
        $groupVM.Info.VM += $_.Extensiondata.MoRef
    }
    $spec.GroupSpec += $groupVM
    $groupESX = New-Object VMware.Vim.ClusterGroupSpec $groupESX.operation = "add"$groupESX.Info = New-Object VMware.Vim.ClusterHostGroup$groupESX.Info.Name = "Grouped Host"
    
    Get-VMHost -Name MyHost1* | %{
        $groupESX.Info.Host += $_.Extensiondata.MoRef
    }
    $spec.GroupSpec += $groupESX
    $rule = New-Object VMware.Vim.ClusterRuleSpec$rule.operation = "add"$rule.info = New-Object VMware.Vim.ClusterVmHostRuleInfo$rule.info.enabled = $true$rule.info.name = "Test DRS group rule"$rule.info.mandatory = $true$rule.info.vmGroupName = "Grouped VM"$rule.info.affineHostGroupName = "Group Host"$spec.RulesSpec += $rule
    $cluster.ExtensionData.ReconfigureComputeResource($spec,$true)
    
    The script first creates 2 DRS groups. One with the VMs and one with the ESX(i) servers.
    

    In the example, there all customers whose name starts with "MyVM1" for a group and all hosts whose name begins with "MyHost1" to the other group.

    These 2 selections will of course be changed for your configuration. Let me know what selection rules you want to implement for virtual machines and hosts and I can update the script.

    The script then creates a rule. Note that the rule specifies $true for the "required" property

    This means that a virtual machine will not be powered on if the placement host does not match the rule.

    The 2nd parameter to the ReconfigureComputeResource method allows you to specify if the changes defined in the $spec to add or not.

    If it's not $true all your cluster settings, except for the groups and the rule will be deleted. So, attention!

Maybe you are looking for