As you can see from the header, there is a Hetzner.de server, namely the EQ4 model, 8 gigabytes of memory, the customer needs to deploy exactly 3 virtual machines, 2 Linux and 1 Windows on this host, since in fact 3 these hosts will not be mega loaded, then the configuration is just right. Hetzner.de has the option of installing VMware ESXi 4.1, which they don’t hide (and do not advertise as well), you just need to indicate this when ordering a server, and you will be politely added +45 euros, 24 for an Intel network card, and another 21 for KVM.
This instruction is not tied to Hetzner.de, but is implemented on its example.
We ordered a network one and everything was as it should be, even an iron raid, it only happened that we were raised to the server, but KVM was not connected, or the end of the working day was, or someone stepped hard, it doesn’t matter, but I have turned out to be quite a working server (though they forgot to initialize the raid too).
')
Meanwhile
I didn’t want to sleep at all, and I decided to shock esxi on different installation methods, as it turned out, there were enough options:
- from disk
- from a flash drive
- using PXE
It's a shame that not a single option for “white” people came up to me, however, I also learned something useful from this micro intelligence.
The ESXi installer is based on anaconda from RedHat and supports kickstart, which in turn makes it possible to install the hypervisor in unattended mode and it all works fine for all the above installation types, in addition, you can also customize the installation image by adding, for example, iron which is considered to be unsupported in the original installation manner, and so on with the little things you need to add (ssh, ftp). And for all these manipulations, good people wrote a script, which can be downloaded
here , and read in detail about it
here . On the last link you will be taken to the forum where just a lot of information on this very "modding".
This script miracle is focused on debian-based systems (but it works on others), therefore, without thinking twice, I rolled the fifth Debian server to the fresh server (looking ahead to say that I made the / boot partition 1GB in size). After installation, I downloaded the script and the original installation image, reading the docks how to use it, I stopped at the option to create a custom iso image (why I will tell iso later).
The goal was to create an image that silently installs the hypervisor, simultaneously setting up the network, setting the root password, the hostname, and also silently goes into reboot.
I carried out all the operations under the root and in his own home directory (forgive me the guru)Creating a custom installation image
In order to enable ssh and ftp, I went
here , and downloaded the customization archive (you guess what you want, there are many other customizations in) in / root, also after the first launch of the script, it created a directory (/ root / custom- esx and a few others, however, as practice has shown, the script will then remove for itself leaving only 2 directories / root / custom-esx and / root / save in which it will carefully put a new image)
First I created the kickstart file
ks.cfg with content:
vmaccepteula
rootpw mysupersecretpass
autopart --firstdisk --overwritevmfs
install url example.com/vm
network --bootproto=static --ip=192.0.2.4 --gateway=192.0.2.1 --hostname=esxi.example.com --device=vmnic0 --nameserver=192.0.2.98 --netmask=255.255.255.192
reboot
And saved it to /root/custom-esx/etc/vmware/weasel/ks.cfg
example.com/vm - external address where it will be possible to find the unpacked image, why not you ask to put the image itself? Everything is simple - the installation will take place, to put it mildly, in a strange manner
I also changed the bootloader config (the original can be found in the root of the installation image under the name isolinux.cfg)
isolinux.cfg contains:
default menu.c32
menu title VMware VMvisor Boot Menu
timeout 5
label Kickstart debug
menu label ^ESXi Installer (default KS)
kernel mboot.c32
append vmkboot.gz ks=file:///etc/vmware/weasel/ks.cfg --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz --- oem.tgz
Here are all the necessary files prepared, now run the script.
Choose:
1) ISO installation
farther
[3] 4.1
And we answer the questions when it comes to the issue of editing proftpd.conf.
Open another console and copy isolinux.cfg to / root / esx-build with the replacement of the original, return to the first console and continue to answer questions, the script will swear at the absence of 2 files, just skip them, this is not critical. We are waiting until the image is created.
It will be in / root / save
With the image finished, I think you shouldn't remind that it will have to be unpacked on an external host, so that the files would be available at
example.com/vmNow actually how to install it
We will use GRUB, but since the rude cannot load an image from an iso, then an
additional utility will be needed
need to save it to / boot
Also edit /boot/grub/menu.lst
Add a section:
title ESXi Installation from ISO
root (hd0,0)
kernel /boot/memdisk iso raw
initrd /boot/esxiustom.iso
the root value depends on the disk layout on your serverchange default parameter to 1
copy iso from / root / save / to / boot / esxiustom.iso
Reboot the server:
(drink coffee / tea, smoke, dance with a tambourine)Underline whatever applicable.
As an indicator, you can run ping in another console, after two ping breaks, you can connect to a fresh ESXi via ssh or via the vSphere Client (only for Windows).
In general, that's all, do not judge strictly.
Comments are welcome.
I hope someone will come in handy.
As you can see, iso is mounted via external stray, and the installer is cool smart, and without finding a physical disk, nothing will be installed, so you have to connect an external web server to this epic.
There was also an idea to cheat and force the script to put everything on a hard flash card instead of a flash card, but the script that was meticulously calculating the yuzb device turned out to be clever, and there was no desire to peel in tons of bash code (the script is big enough).
Sources
benincosa.org/blog/?p=171blog.nettraptor.net/?p=26www.vm-help.comUPD1:In the case of a hetzner, you will need to ask for additional ip addresses to assign MAC addresses with a note that this is for vmware esxi, in this case you will be able to avoid crap with bridging and other chips, if you order the whole subnet, then be prepared to spend 2 addresses (1 extra and one of the subnet) for the virtual router
UPD2:I express my deep gratitude:
thelostreason BigD helios deniskin as well as moderators,
for finding and eliminating errors in formatting, grammar and punctuation