Hetzner - DokuWiki

VMware ESXi/en
Zeile 149: Zeile 149:
 
[[Datei:Esxi-vsphere.png]]
 
[[Datei:Esxi-vsphere.png]]
  
*After successful installation you can order up to four additional single IP addresses via Robot. You can get a MAC address for your additional single IP through Robot under the "IPs" tab. You will see a small button next to the IP address. Clicking on that button will give the IP address a virtual MAC.
+
*After successful installation you can order up to three additional single IP addresses via Robot. You can get a MAC address for your additional single IP through Robot under the "IPs" tab. You will see a small button next to the IP address. Clicking on that button will give the IP address a virtual MAC.
  
 
*Configure the MAC addresses of the virtual servers with the corresponding IP addresses through vSphere. Once this is done even DHCP will work via the Hetzner network!
 
*Configure the MAC addresses of the virtual servers with the corresponding IP addresses through vSphere. Once this is done even DHCP will work via the Hetzner network!

Version vom 29. Oktober 2012, 10:02 Uhr

Inhaltsverzeichnis

General information

Hardware

  • VMware vSphere Hypervisor (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 supported by ESXi.
  • The free version of ESXi supports a maximum of 32GB RAM.

Network configuration

  • VMware vSphere Hypervisor is an "operating system" designed for pure virtualization and supports neither NAT nor routing. Therefore only a true bridged setup can be used.
  • To use a subnet an additional IP needs to be setup as a router VM.

Installation

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

License

  • After installation the system has a test license, which expires after 60 days.
  • For the long-term usage of the OS a separate (free) license is required. This can be requested by registering on the VMware website
  • The license can be entered via the vSphere Client, under the tab "Configuration", the section "Software" and then under the menu item "Licensed functions". After selecting this you can click on the "Edit" button to the right and then enter the license key.

Hetzner specific information

Pre-built hardware

  • The EQ and EX servers, aside from the EX10, are fully compatible with ESXi 5. An installation on the EX10 is not possible, due to the 32GB RAM limitation of the free version.
  • Installing ESXi on the older DS or X servers is not possible.
  • When ordering your dedicated server, please state in the comments section at the end of the order form that you want ESXi on it. Hetzner Support will then provide you with a CD and a remote console (LARA), through which you can install ESXi. This installation costs 25 Euros. In some cases our support will pre-install ESXi.
  • 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.

Single IP addresses

  • IP addresses are statically mapped to the MAC address of the host. 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 on the left, select the desired server, and then click on the "IPs" tab. Here you can click on the icon next to the single IP address to get a MAC address.

Esxi-mac-setzen.png

Subnets

  • 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 please make a note 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

  • During the order choose the desired server (the EX10 is not supported by the free version). A RAID controller can be optionally added if desired (requires the Flexi-Pack) and is supported during the installation.
  • 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 the server up with a LARA (remote console) and an installation CD of ESXi.
  • Once the server is ready you will receive an email from Hetzner with the details of the server as well as the access details for the LARA.
  • 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 three additional single IP addresses via Robot. You can get a MAC address for your additional single IP through Robot under the "IPs" tab. You will see a small button next to the IP address. Clicking on that button will give the IP address a virtual MAC.
  • Configure the MAC addresses of the virtual servers with the corresponding IP addresses through vSphere. Once this is done even DHCP will work via the Hetzner network!

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 adaptec 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
  • Query the current driver version:
# 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.