martes, 30 de agosto de 2016

Configuring multiple LACP groups on a TP-LINK switch

I realize this is a very specific topic and situation, but this solution needs to exist on the internet. In the past I've written about Link Aggregation and what to expect performance-wise and since then I've run into an issue as our network has expanded. We're using a TP-LINK TL-SG2424 switch for our SAN network (budget, I know) but this applies to many TP-LINK switches which offer LACP
Here's the setup, we have 2 iSCSI SAN appliances connected to our switch. One of the appliances is connected via 4 network interfaces which are aggregated using LACP 802.3ad with Jumbo Frames enabled. This is our clustered shared volume for our virtual machines. This was the first LAG group that we configured using LACP and it was straight forward: enable LACP on the appliance bonded NICs, then choose the ports on the switch and enable LACP in Active mode:

1Cypress North
2Cypress North

Once this was completed, the appliance and the switch negotiated the link aggregation and we were off and running. 
A few weeks later we migrated our backup appliance to the SAN. The backup appliance is connected via 2 network interfaces which we also want to enable LACP on. Following the same steps as in our first setup, we bonded the NICs on the appliance and enabled LACP, then we went onto the switch and set the two ports to Enabled and Active.

3Cypress North

This is where the trouble began. Upon setting the new port group (11+12) to Active/Enabled in LACP, the switch added the ports to the initial port group under LAG 1. Obviously these are different groups, connections, and appliances so this wreaked havoc for a few minutes until we disabled the new LACP ports.
After banging around in the switch settings, we emailed TP-LINK support to confirm that multiple LAG groups were possible using LACP. They assured us that they were supported but their budget support could not explain to us how to configure it. Likewise, the manual doesn't describe how to enable multiple groups either. Google search failed us as well. 
The solution, it turns out, is a column idiotically labeled "Admin Key". On a whim, we changed the value in this column to "2" when enabling LACP on the two ports. This time, the two ports were placed into a new group LAG 2 and LACP was properly negotiated. 

4Cypress North

The Admin Key column is not talked about anywhere in the documentation as having an affect on the link aggregation grouping and I hadn't seen anybody mention it online. While the audience of this how-to is fairly limited, someone, somewhere, someday is going to be saved a massive headache by reading it. 

miércoles, 17 de agosto de 2016

Error OVF Deployment Failed: File ds:

Estaba teniendo un error en la exportación de una maquina virtual. El error se origina cuando esta instalado el vmware tools en la maquina virtual, o esta montada la unidad instaladora de vmware tools (Una iso en el cdrom de la maquina virtual).

Entonces lo que hay que hacer según la kb de vmware, es lo siguiente:
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2034422


  1. Editar la maquina virtual, clic derecho -> Edit Settings. 
  2. Clic en CD/DVD drive 1, y en el apartado Device Type seleccionar Client Device. 
  3. Clic en Ok.
  4. Exportar la maquina virtual. Seleccionar la maquina virtual y clic en File -> Export -> Export OVF template.
  5. Guardarla en algún lugar.
  6. Ir a la carpeta guardada. Abra el archivo OVF en un editor de texto y confirme que la entrada ResourceSubType CD-ROM está configurado vmware.cdrom.remotepassthrough .
  7. Despues para importarla, clic en File -> Deploy OVF Template.
  8. Seleccionas la ubicacion del OVF y le das import.



Deploying an OVF fails on vCenter Server 5.1/5.5 when VMware tools are installed(2034422)


Symptoms


  • Deploying an OVF fails on vCenter Server 5.1/5.5 when VMware Tools are installed.
  • When deploying an OVF from a virtual machine that has VMware Tools installed, you see the error:

    OVF Deployment Failed: File ds:///vmfs/volumes/uuid/_deviceImage-0.iso was not found

    Where uuid is the datastore ID where the OVF is being deployed.

Cause


This issue occurs when the VMware Tools installation task is not finished. The guest operating system may already have the Tools successfully installed and running, but the ESX task for installing the tools has not finished.

In vSphere 5.0 and earlier, device backings (what the device is connected to) were not exported. OVF files generated on ESX 5.0 and earlier do not contain the device backing information and therefore do not encounter this issue when importing on ESX 5.1/5.5.

In vSphere 5.1/5.5, virtual machines device backing information is exported. When the Tools install task has not finished it leaves the virtual machine's CD-ROM device connected to a datastore ISO image that cannot be accessed upon re-deployment of the OVF to a new virtual machine, which causes the error.

Resolution


To resolve this issue,  modify the SHA1 checksum value in the MyVM.mf file to match the SHA1 checksum value in the MyVM.ovf file.
To modify the SHA1 checksum value in the MyVM.mf file to match the SHA1 checksum value in the MyVM.ovf file:
  1. Right-click the virtual machine and click Guest > End VMware Tools Install.
  2. Export the virtual machine to a new OVF file.
  3. Open the OVF file in a text editor and confirm that the CD-ROM ResourceSubType entry is set to vmware.cdrom.remotepassthrough.

    For example:

    <Item ovf:required="false">
    <rasd:AddressOnParent>0</rasd:AddressOnParent>
    <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
    <rasd:ElementName>CD-ROM 1</rasd:ElementName>
    <rasd:InstanceID>9</rasd:InstanceID>
    <rasd:Parent>4</rasd:Parent>
    <rasd:ResourceSubType>vmware.cdrom.remotepassthrough</rasd:ResourceSubType><rasd:ResourceType>15</rasd:ResourceType>
    <vmw:Config ovf:required="false" vmw:key="backing.exclusive" vmw:value="false" />
    <vmw:Config ovf:required="false" vmw:key="connectable.allowGuestControl" vmw:value="true" />
    </Item>


    Note: When the ResourceSubType value is set to vmware.cdrom.iso, deploying the OVF fails and you see the error. Also, verify that the CD-ROM device is disconnected under the virtual machine settings.
  4. To view the SHA1 checksum value in the MyVM.ovf file, run the command:

    sha1sum MyVM.ovf
  5. Modify the SHA1 checksum value in the MyVM.mf file to match the SHA1 checksum value in the MyVM.ovf file.

Error OVF Deployment Failed: File ds:

Estaba teniendo un error en la exportación de una maquina virtual. El error se origina cuando esta instalado el vmware tools en la maquina virtual, o esta montada la unidad instaladora de vmware tools (Una iso en el cdrom de la maquina virtual).

Entonces lo que hay que hacer según la kb de vmware, es lo siguiente:
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2034422


  1. Editar la maquina virtual, clic derecho -> Edit Settings. 
  2. Clic en CD/DVD drive 1, y en el apartado Device Type seleccionar Client Device. 
  3. Clic en Ok.
  4. Exportar la maquina virtual. Seleccionar la maquina virtual y clic en File -> Export -> Export OVF template.
  5. Guardarla en algún lugar.
  6. Ir a la carpeta guardada. Abra el archivo OVF en un editor de texto y confirme que la entrada ResourceSubType CD-ROM está configurado vmware.cdrom.remotepassthrough .
  7. Despues para importarla, clic en File -> Deploy OVF Template.
  8. Seleccionas la ubicacion del OVF y le das import.



Deploying an OVF fails on vCenter Server 5.1/5.5 when VMware tools are installed(2034422)


Symptoms


  • Deploying an OVF fails on vCenter Server 5.1/5.5 when VMware Tools are installed.
  • When deploying an OVF from a virtual machine that has VMware Tools installed, you see the error:

    OVF Deployment Failed: File ds:///vmfs/volumes/uuid/_deviceImage-0.iso was not found

    Where uuid is the datastore ID where the OVF is being deployed.

Cause


This issue occurs when the VMware Tools installation task is not finished. The guest operating system may already have the Tools successfully installed and running, but the ESX task for installing the tools has not finished.

In vSphere 5.0 and earlier, device backings (what the device is connected to) were not exported. OVF files generated on ESX 5.0 and earlier do not contain the device backing information and therefore do not encounter this issue when importing on ESX 5.1/5.5.

In vSphere 5.1/5.5, virtual machines device backing information is exported. When the Tools install task has not finished it leaves the virtual machine's CD-ROM device connected to a datastore ISO image that cannot be accessed upon re-deployment of the OVF to a new virtual machine, which causes the error.

Resolution


To resolve this issue,  modify the SHA1 checksum value in the MyVM.mf file to match the SHA1 checksum value in the MyVM.ovf file.
To modify the SHA1 checksum value in the MyVM.mf file to match the SHA1 checksum value in the MyVM.ovf file:
  1. Right-click the virtual machine and click Guest > End VMware Tools Install.
  2. Export the virtual machine to a new OVF file.
  3. Open the OVF file in a text editor and confirm that the CD-ROM ResourceSubType entry is set to vmware.cdrom.remotepassthrough.

    For example:

    <Item ovf:required="false">
    <rasd:AddressOnParent>0</rasd:AddressOnParent>
    <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
    <rasd:ElementName>CD-ROM 1</rasd:ElementName>
    <rasd:InstanceID>9</rasd:InstanceID>
    <rasd:Parent>4</rasd:Parent>
    <rasd:ResourceSubType>vmware.cdrom.remotepassthrough</rasd:ResourceSubType><rasd:ResourceType>15</rasd:ResourceType>
    <vmw:Config ovf:required="false" vmw:key="backing.exclusive" vmw:value="false" />
    <vmw:Config ovf:required="false" vmw:key="connectable.allowGuestControl" vmw:value="true" />
    </Item>


    Note: When the ResourceSubType value is set to vmware.cdrom.iso, deploying the OVF fails and you see the error. Also, verify that the CD-ROM device is disconnected under the virtual machine settings.
  4. To view the SHA1 checksum value in the MyVM.ovf file, run the command:

    sha1sum MyVM.ovf
  5. Modify the SHA1 checksum value in the MyVM.mf file to match the SHA1 checksum value in the MyVM.ovf file.