Hetzner - DokuWiki

VMware ESXi/en

Inhaltsverzeichnis

General information

Physical Hard Disks

  • VMware ESXi uses a filesystem called vmfs3, which supports a maximum disk size of 2 TiB.
  • It is possible to combine several small disks into a large one using "extents"
  • Software RAID (as used in our regular root servers) is not possible, only hardware RAID controllers can be used.
  • Using a RAID-5 configuration is problematic as the resulting disk is larger than 2 TiB (with 3x 1,5TB disk) on which ESXi cannot be installed.
  • If the controller offers an 'autocarving' feature, it will automatically create volumes of 2 TiB. Thus the remaining disk space is seen as another disk in ESXi.
  • Manual setup of logical volumes is also possible using either tw_cli (3ware) or arcconf (Adaptec).

Networking

  • 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.

Installation

  • Installation and basic configuration of ESXi with the install disc takes about 10-15 minutes even without any prior knowledge (install guide).

Hetzner specific information

Hardware

  • The current EQ series are fully compatible with ESXi, with the exception of the onboard network card. (Installation of ESXi on the older DS series is not possible)
  • If you would like to install ESXi, you need to order an Intel-NIC. This requires the Flexi-Pack.
  • When ordering your EQ 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.
  • When installing on a server with multiple identical disks (EQ without hardware RAID), it may happen that ESXi shows the disks in a different order than the BIOS does. Should the screen only show a blinking cursor after the installation, you should try the other disk as boot device.

Network Setup

  • 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 have to be configured for a given virtual server and its IP address. 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. The Flexi-Pack is a pre-requisite for this.

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 the subnet include that you are using ESXi and ask to route the subnet to the additional IP adresses. You do NOT get a separate MAC for every IP 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" with an additional NIC in 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

According to http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_vc41_rel_notes.html poor TCP performance can occur in traffic-forwarding virtual machines with LRO enabled Some Linux modules cannot handle LRO-generated packets. As a result, having LRO enabled on a VMXNET 2 or VMXNET 3 device in a traffic forwarding virtual machine running a Linux guest operating system can cause poor TCP performance. LRO is enabled by default on these devices.

Workaround: In traffic-forwarding virtual machines running Linux guests, set the module load time parameter for the VMXNET 2 or VMXNET 3 Linux driver to include disable_lro=1.

Preparations in the vSphere-Client

  1. create vSwitch (in the example the name: 'subnet' is used) vSwitch-Teil 1

    vSwitch-Teil 2

    vSwitch-Teil 3

    vSwitch-Teil 4

  2. add an second NIC to the router VM. connected network: subnet (the previously created vSwitch)

    Esxi-router-nic.png

  3. NIC of a virtual machine in the subnet. connected network:subnet

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 connected to both networks (public Hetzner and assigned subnet) and must be used as 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

  • When ordering your desired server, include the FlexiPack (15€/month) and note in the comment field that you would like an Intel-NIC for ESXi. An optional RAID controller can be added if needed.
  • If you have stated in your order that you would like to install VMware ESXI you will receive an email from Hetzner when your server is ready for installation. The email will contain access details for a remote console (LARA) for the installation. A DVD drive with the Install-CD is connected as well.
  • Login to the LARA console and finish the installation (approx. 5 minutes)

Esxi-installed.png

  • After the reboot, set a password using the LARA console (mind the disc order!). This is the root password for SSH (if you enable it) as well as the password for the vSphere Client.
  • After successful installation you can order up to three additional IP addresses with a proper RIPE reason. If you also include that you need specials MACs for ESXi, they may be assigned as well. For more than three IP adresses you need a subnet.
  • Configure the MAC addresses in your virtual servers with the right 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

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

Prerequisite is an activate SSH access, a linux vm (or another server), tar 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 guest 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



© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.