Hetzner - DokuWiki

VMware ESXi/en

Inhaltsverzeichnis

General information

Physical Hard Disks

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

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 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 EX and EQ series are fully compatible with ESXi (installation of ESXi on the older DS series is not possible)
  • 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, ESXi can potentially show the disks in a different order than the BIOS does. Should the screen show only a blinking cursor after the installation is done, you should try the other disk as the boot disk.

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 a subnet include that you are using ESXi and ask to have the subnet routed to the additional IP adress. 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" 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 a 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 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

  • When ordering your desired EQ server an optional RAID controller can be added if desired.
  • 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 will be 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 disk 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 four additional IP addresses (with a proper RIPE reason). If you also include that you need specials MAC addresses for ESXi, they may 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

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



© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.