Hetzner - DokuWiki

VMware ESXi/en
K (Preparations in the vSphere client)
(Subnet)
Zeile 51: Zeile 51:
 
'''NOTE'''
 
'''NOTE'''
  
The network card type for the router VM should not be VMXNET2 or VMXNET3, as otherwise the TCP performance can be very bad.  
+
The network card type for the router VM should not be VMXNET2 or VMXNET3, as otherwise the TCP performance can be very bad.
 
As a workaround LRO in the VM can be disabled via 'disable_lro=1'. More information on this bug can be found here:
 
As a workaround LRO in the VM can be disabled via 'disable_lro=1'. More information on this bug can be found here:
 
http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_vc41_rel_notes.html
 
http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_vc41_rel_notes.html
 +
 +
After upgrading the ESXi host to 4.1 and upgrading VMs to VMwareTools to 4.1, you may experience slow TCP performance on VMs running on the 4.1 ESXi host. You can address this situation by disabling Large Receive Offload (LRO) on the ESXi host.
 +
 +
 +
* Log into the ESXi host with vSphere Client.
 +
* Select the host > Configuration > Software:Advanced Settings.
 +
* Select Net and scroll down slightly more than half way.
 +
* Set the following parameters from 1 to 0:
 +
Net.VmxnetSwLROSL
 +
Net.Vmxnet3SwLRO
 +
Net.Vmxnet3HwLRO
 +
Net.Vmxnet2SwLRO
 +
Net.Vmxnet2HwLRO
 +
Reboot the ESXi host to activate these changes.
  
 
=== Preparations in the vSphere client ===
 
=== Preparations in the vSphere client ===

Version vom 7. Februar 2012, 07:28 Uhr

Inhaltsverzeichnis

General information

Physical drives

  • VMware ESXi uses a filesystem called vmfs5 (formerly vmfs3), which uses GPT and supports drive sizes of up to 64 TiB (formerly 2 TiB).
  • Software RAID (as used in our regular dedicated servers) is not possible, only hardware RAID controllers can be used.

Network configuration

  • ESXi is an operating system designed for virtualization. Its networking features do not include NAT or routing.
  • Additional IP addresses can only be used in bridge mode, which requires additional MAC addresses to be assigned.
  • To use a subnet one of the additional IP addresses has to be setup as a router VM.

Installation

  • The installation and basic configuration of ESXi with the install disc takes about 20-30 minutes, even without any prior knowledge. (Install guide)

Hetzner specific information

Hardware

  • The EQ and EX servers are fully compatible with ESXi. (Installing ESXi on the older DS series is not possible)
  • When ordering your dedicated server, please state in the comments section of the order form that you want to install ESXi. Hetzner Support will then provide you with a CD and a remote console (LARA) ready to install ESXi. You can then install ESXi yourself. This installation costs 25 Euros.
  • When installing on a server with multiple identical drives, ESXi can potentially show the drives in a different order than the BIOS does. Should the screen be blank with only a blinking cursor after the installation is done and you restart, you should try the other drive as the boot drive.

Network configuration

  • In our data centers IP addresses are statically mapped to the MAC addresses of servers. Thus it is necessary to request a special MAC address for the additional IP address because only bridge mode is possible. These MAC addresses can then be configured for the virtual servers. To get these MAC addresses assigned, log in to Robot, choose "Server" from the menu, select the desired server, and then click on the "IPs" tab. Here you can click on the icon next to the IP address to get a MAC address.

Esxi-mac-setzen.png

Subnet

  • Before ordering an additional subnet, you need at least one additional IP for a Router VM since ESXI cannot route itself. When ordering a subnet include that you are using ESXi and ask to have the subnet routed to the additional IP address. You do NOT get a separate MAC address for every IP address of the subnet.

The confirmation email of the subnets contains (for example) the following information:

Below you will find your additional IP addresses added to
the server 192.168.13.156.
Please note that you can use the subnet only for this server.
IP: 192.168.182.16 /28 Mask: 255.255.255.240 Broadcast: 192.168.182.31
Useable IP addresses: 192.168.182.17 70 192.168.182.30

In order to use these IP addresses in virtual machines, a "router VM" supplemented by an additional NIC from the new subnet is necessary. The subnet itself requires a new vSwitch in ESXi to which all VMs in the subnet will be connected.


NOTE

The network card type for the router VM should not be VMXNET2 or VMXNET3, as otherwise the TCP performance can be very bad. As a workaround LRO in the VM can be disabled via 'disable_lro=1'. More information on this bug can be found here: http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_vc41_rel_notes.html

After upgrading the ESXi host to 4.1 and upgrading VMs to VMwareTools to 4.1, you may experience slow TCP performance on VMs running on the 4.1 ESXi host. You can address this situation by disabling Large Receive Offload (LRO) on the ESXi host.


  • Log into the ESXi host with vSphere Client.
  • Select the host > Configuration > Software:Advanced Settings.
  • Select Net and scroll down slightly more than half way.
  • Set the following parameters from 1 to 0:
Net.VmxnetSwLROSL
Net.Vmxnet3SwLRO
Net.Vmxnet3HwLRO
Net.Vmxnet2SwLRO
Net.Vmxnet2HwLRO

Reboot the ESXi host to activate these changes.

Preparations in the vSphere client

  1. Create a vSwitch (in the example the name 'subnetz' is used) vSwitch-Teil 1

    vSwitch-Teil 2

    vSwitch-Teil 3

    vSwitch-Teil 4

  2. Add a second NIC to the router VM. Connected network: subnetz (the previously created vSwitch)

    Esxi-router-nic.png

  3. The NIC of the virtual machine in the subnet. Connected network: subnetz

The networking overview should show the following:Esxi-subnet.png

  • Example of /etc/network/interfaces on the router VM
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
# WAN-NIC in VMnetwork
auto eth0
iface eth0 inet dhcp
# LAN NIC in Subnet
auto eth1
iface eth1 inet static
    address     192.168.182.30
    broadcast   192.168.182.31
    netmask     255.255.255.240
  • Example of /etc/network/interfaces of a Linux VM in the subnet
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
    address 192.168.182.17
    netmask 255.255.255.240
    broadcast 192.168.182.31
    gateway 192.168.182.30

The router VM is now connected to both networks and can be used as a gateway for virtual machines in the subnet. Don't forget to activate IP forwarding in the kernel:

echo 1 > /proc/sys/net/ipv4/ip_forward

To make this persistent across reboots, add the following line to /etc/sysctl.conf

net.ipv4.ip_forward=1

The virtual machines should now be accessible from the Internet over the assigned IP.

Installation guide

  • Order the desired server (EQ or EX). An optional RAID controller can be added if desired (requires the Flexi-Pack) and is supported during the installation.

Note: 3ware controllers are no longer supported by ESXi 5.0.

  • At the end of the order form there is a comments section where you can make a note that you want to install ESXi and that our technicians should set that up.
  • Once the server is ready, you will receive an email from Hetzner with the access details for a remote console (LARA) for the installation.
  • Login to the LARA console and finish the installation (approx. 5 minutes).

Afterwards, the following screen should be displayed:

Esxi-installed.png

  • After a reboot, set a password using the LARA console (mind the drive order!). This is the root password for SSH (if you enable it) as well as the password for the VMware vSphere Client (requires Windows). This can then be downloaded via a browser.

Esxi-password.png

Esxi-vsphere.png

  • After successful installation you can order up to four additional IP addresses. Please also include that you need MAC addresses for ESXi, so they will be assigned as well. For more than four IP adresses you need a subnet.
  • Configure the MAC addresses in your virtual servers with the correct IP addresses through vSphere. If you do this right, even DHCP works!

For additional information regarding ESXi and its usage, please refer to the official website

Manual installation of updates (4.0 to 4.1)

The normal way to install updates is via the Host Update Utility. Because uploading an update of hundreds of megabytes with a DSL connection takes very long, the following is a guide on how to manually install updates on the system. This guide comes with absolutely no warranty for correctness or usability! Use it at your own risk.

Prerequisite is SSH activated access and wget.

First you need to download the patch from VMware self support site. Choose ESXi and search. The major upgrade from 4.0 to 4.1 can be found on the regular ESXi download site or already repacked to tar.gz from download.hetzner.de (no warranty, use at your own risk)

Since the files are compressed with zip, which does not exist on ESXi, the updates have to be repacked with tar. So using either a Linux vm or another server unzip the downloaded files and compress them again using tar and gzip. The tar.gz is then transferred to the ESXi host using either wget (requires webserver) or rsync.

The archive can then be extracted in a directory of your choice:

/vmfs/volumes/4a42186d-2d171bfc-6d01-001b213b649f/updates/ESXi400-201003001 # ls -all
drwxr-xr-x    1 root     root                560 Apr  6 18:29 .
drwxr-xr-x    1 root     root                560 Apr  6 18:27 ..
drwxr-xr-x    1 root     root                420 Apr  6 18:29 embeddedEsx
-rw-r--r--    1 root     root               4946 Mar 24 15:25 metadata.zip

Example ESXi 4.1 Upgrade:

/vmfs/volumes/4c4559de-9e2a8780-a90b-001b215f7a57/upgrade-40-to-41 # ls -l
-rw-r--r--    1 1000     1000               4934 May 19 00:30 metadata.zip
-r--r--r--    1 1000     1000               1507 May 19 00:29 upgrade_info.xml
-rw-r--r--    1 1000     1000            1351442 May 19 00:29 vmware- esx-esxupdate-esxi-4.1.0-0.0.260247.i386.vib
-rw-r--r--    1 1000     1000           89605022 May 19 00:29 vmware-esx-firmware-4.1.0-0.0.260247.i386.vib
-rw-r--r--    1 1000     1000          120626062 May 19 00:30 vmware-esx-tools-light-4.1.0-0.0.260247.i386.vib

After all guests have been shutdown, the maintenance mode must be activated

../updates/ESXi400-201003001 # vim-cmd hostsvc/maintenance_mode_enter
'vim.Task:haTask-ha-host-vim.HostSystem.enterMaintenanceMode-1852795269'

Now the update can be installed

../updates/ESXi400-201003001 # esxupdate update -m metadata.zip
metadata.zip                                                   ############### [100%]
vmware-esx-firmware-4.0.0-1.12.244038.i386.vib                 ############### [100%]
Unpacking deb_vmware-esx-firmware_4.0.0-1.12.244038.vib        ############### [100%]
Installing packages :deb_vmware-esx-firmware_4.0.0-1.12.244038 ############### [100%]
The update completed successfully, but the system needs to be rebooted for the changes to be effective.
/vmfs/volumes/4a42186d-2d171bfc-6d01-001b213b649f/updates/ESXi400-201003001 #


After a reboot, the update is complete. This reduces the downtime of your ESXi to about 5 minutes.

This guide was first posted by Tischi in the Hetzner Forum

Monitoring RAID controller

For the 3ware controller there exists both a CIM Provider as well as a CLI. The 64-bit CLI for Linux can be used from version 9.5.2 onwards.

Note: 3ware controllers are no longer supported by ESXi 5.0.

For adapted controllers the CIM Provider and the CLI (arcconf) must be manually installed. Required is an up-to-date version of the driver. An installation guide can be found on the Adaptec site


  • RAID driver (version 28000) download
  • Abfrage der aktuellen Treiberversion:
# esxupdate query --vib-view | grep -i aacraid
  • Install the new driver. Keep in mind that .vib is used for ESXi
# cp vmware-esxi-drivers-scsi-aacraid-400.4.1.7.28000-1.0.4.260247.x86_64.vib /tmp
# cd /tmp
# esxupdate -b vmware-esxi-drivers-scsi-aacraid-400.4.1.7.28000-1.0.4.260247.x86_64.vib --nodeps --maintenancemode --nosigcheck update
# reboot
# cp arcconf-18781.zip /tmp
# cd /tmp
# esxupdate --bundle=arcconf-18781.zip --nodeps --nosigcheck --maintenancemode update
# reboot
# esxupdate query

Monitoring can be achieved through the installation of remote ARCCONF via a Windows system

$ arcconf GETCONFIG 1 AD

Parallel operation of onboard controller/hardware RAID

During the installation ESXi only „sees“ one type of storage, so either the onboard SATA controller or an additional RAID controller. If drives are connected to both then the hardware controller ist prioritized and the drives connected to the onboard controller are invisible. By manually loading the appropriate kernel module these drives can still be used.

/sbin/vmkload_mod ahci

So that this module is loaded automatically during start, the line must be added to /etc/rc.local and /sbin/auto-backup.sh.



© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.