Cannot start Virtual Machine on ESXi 6.5

As described by JC-LAN, I had a lot of trouble with one particular "special" VMDK on a ESXi 6.5 system, which did not start after a reboot of the ESXi host.

The power-on failed with "File system specific implementation of LookupAndOpen[...] failed" - however in the end it just gave me the overall error that it failed to start the machine. As it turned out, the VMDK was corrupted.

1.) Enable SSH on the ESXi host with the corrupted VMDK - and login

2.) Check the main VMDK (not with the name -s####.vmdk, the main file!) with

vmkfstools -x check /absolute/path/vm.vmdk

3.) It will probably report that the fail is defective. Repair with

vmkfstools -x repair /absolute/path/vm.vmdk

4.) Now you can try to start the VM again, helped me already 3 times 🙂

Taken from: https://jc-lan.tk/2017/02/01/esxi-6-5-host-crash-then-guest-fails-to-power-on/

[VMWare] Deploy vCenter Server Appliance to ESXi 6.5

To deploy the vCenter Server Appliance (vcsa) to an ESXi 6.5 Server, you need to grab the latest vCenter Server for Linux from http://vmware.com/go/evaluate-vsphere-en - at the moment, thats the Version 6.5.0U1d from 19.12.2017 - which equals to the file VMware-VCSA-all-6.5.0-7312210.iso. After downloading that DVD Image, just burn it to a DVD or unpack it. You can then go on with Deploying it via GUI - or via CLI.

For deploying it via GUI, just start vcsa-ui-installer\win32\installer.exe - if you're on a Windows PC - or execute the installer / Installer.app files in the lin64 or mac folders.

If you want to deploy it via CLI using a template, you should navigate to vcsa-cli-installer\win32. Within that folder, you will find the vcsa-deploy.exe - that is the one we are going to use.

Now, we need to provide a template for deploying our vcsa:

{
    "__version": "2.3.0",
    "new.vcsa": {
        "esxi": {
            "hostname": "ESXI_IP",
            "username": "ESXI_USER",
            "password": "ESXI_PASSWORD",
            "deployment.network": "ESXI_NETWORK, i.e. VM Network",
            "datastore": "ESXI_DATASTORE"
        },
        "appliance": {
            "thin.disk.mode": true,
            "deployment.option": "tiny",
            "name": "NAME_OF_THE_VCSA_APPLIANCE"
        },
        "network": {
            "ip.family": "ipv4",
            "mode": "static",
            "ip": "IP_OF_THE_VCSA",
            "dns.servers": "DNS_SERVER_OF_THE_VCSA",
            "prefix": "NETMASK_OF_THE_VCSA",
            "gateway": "GATEWAY_OF_THE_VCSA",
            "system.name": "HOSTNAME_OF_THE_VCSA"
        },
        "os": {
            "password": "PASSWORD_OF_THE_VCSA_ROOT_ACCOUNT",
            "ntp.servers": "0.pool.ntp.org",
            "ssh.enable": true
        },
        "sso": {
            "password": "SSO_FOR_VCSA_PASSWORD",
            "domain-name": "DOMAIN_NAME_OF_VCSA_AD - could be vsphere.local",
            "site-name": "DEMOSITE"
        }
    },
    "ceip": {
        "description": {
            "__comments": [
                [
                    "This is a demo template with disabled CEIP / Customer Telemetry"
                ]
            ]
        },
        "settings": {
            "ceip.enabled": false
        }
    }
}

Just fill in the needed variables and save it in the root folder of your installer, i.e. as install_template.json. Then run the installer (in Windows, that means to execute following CMD): vcsa-deploy.exe install install_template.json --accept-eula

The installer will then deploy the vcsa and inform you, as soon as everythings ready:

===============================================================================
vCenter Server Appliance installer finished deploying "HOSTNAME_OF_THE_VCSA".
This appliance is a vCenter Server instance with an embedded Platform Services
Controller.
    System Name: IP_OF_THE_VCSA
    Log in as: Administrator@DOMAIN_NAME_OF_VCSA_AD i.e. Administrator@vsphere.local
Finished successfully.
===============================================================================

You can then log into https://IP_OF_THE_VCSA to the vCenter Server (with the SSO Login, i.e. Administrator@vsphere.local) or https://IP_OF_THE_VCSA:5480 to the vCenter Appliance Administration (with VCSA Login, i.e. root and PASSWORD_OF_THE_VCSA_ROOT_ACCOUNT)

[VMWare] Get and upgrade ESXi 6.5 "offline" - without paid license

As I wanted to have a very recent version of ESXi, I went to VMWares website and checked out their Products, Free Products, vSphere Hypervisor section. This, however, only presented me with a ESXi 6.5.0a ISO from 02.02.2017 - too old. However, you'll get the much needed free license - so the visit pays off :).

So to get the latest version and updates, you need to go to http://vmware.com/go/evaluate-vsphere-en - and are presented with the 6.5.0 U1 ISO from 27.07.2017 - a lot better. With said image you can then install your server. Even if you had an old 6.5.0a install, you could download the VMware vSphere Hypervisor (ESXi) Offline Bundle - which will upgrade your old 6.5.0 installation to U1 from that site.

After that, you'll need to check out the very useful VMWare ESXi Patch Tracker on https://esxi-patches.v-front.de/ESXi-6.5.0.html. There you can see, which patches are needed to get your ESXi host to the latest version (in my case I only need to apply the 2017-10-05 patch series to get from U1 to latest). So now switch over to https://my.vmware.com/group/vmware/patch#search and look for ESXi 6.5.0 patches. I did find my needed ESXi650-201710001 patch with release date 05.10.2017 - and downloaded it. From the ESXi Patch Tracker I now know, that the Imageprofile of said Update is called ESXi-6.5.0-20171004001-standard and uses the Buildnumber 6765664. I then enabled SSH on the ESXi Host, shutdown all VMs, put the ESXi Host into Maintance mode and uploaded the ESXi650-201710001.zip to a folder on my Datastore datastore01 into a folder I created called ESXiUpdate.

After that, I could execute said update via SSH with the command esxcli software profile update --depot="[datastore01]ESXiUpdate/ESXi650-201710001.zip" --profile ESXi-6.5.0-20171004001-standard

As you can see, it needs to provide the path to the patch file, as well as the Imageprofilename we found out earlier via the ESXi Patch Tracker. After the successful installation, a reboot is need.

As soon as the machine has booted again, login and check if the Buildnumber now matches the Updates Buildnumber. If this is true, disable the Maintenance Mode, restart the VMs and you're good to go.

If other patches need to be applied, you would re-enable SSH  access, not restart the VMs and not disable the Maintenance Mode and just keep on uploading and applying the updates :).

More infos abot the esxcli commands can be found here - and you can still use your free license with ESXi 6.5 which you acquired at the first steps of this weblog - even if you use the most recent patch (luckily!).

And now, get those machines patched ;)!

[Freifunk] Upgrade Virtual Freifunk Router on VMWare ESXi 6.5

As I mentioned earlier, I use a virtual Freifunk Router as part of my mobile Infrastructure / Server. With this little VM, I can actually run a big-area Freifunk Network with lots of users without having to invest in new TP-Link accesspoints: I am running the VM, outputing the Freifunk LAN to a designated VLAN and use old spare Accesspoints as dumb "Media-Converters" (LAN to WIFI ;)).

But, as I only use this appliance every now and then for different kind of conventions and conferences, I need to upgrade that Appliance manually, to get it straight to the latest version without waiting or reinstalling (and droping the VPN key...).

Actually, that is quite simple in VMWare: Just go to the terminal of said VM and get started. Well. Ok, stop! Before you're doing that, just remember: You're on a VM. You got no excuse at all for not making a backup - so just shutdown your VM, make a snapshot, then turn it back on - and get started. Better safe than sorry ;)!

First, we're going to install wget with SSL support

opkg update
opkg install wget

Then we need to find the latest version of our Freifunk Firmware - as sysupgrade package. I used the gluon-fftr-0.8.4-x86-vmware.vmdk to install the VM, so I need an x86-generic-sysupgrade.img.gz :). I found that thing here: https://github.com/freifunktrier/firmware_store/tree/master/firmware/stable/sysupgrade . However, please bear in mind to use the image from YOUR Freifunk Provider ;). Try to download the image and get to the "RAW FILE" link on Github and use it to download the file to your VM:

cd /tmp
wget -O sysupgrade.img.gz  https://github.com/freifunktrier/firmware_store/blob/master/firmware/stable/sysupgrade/gluon-fftr-0.8.6+jenk_tackin-x86-generic-sysupgrade.img.gz?raw=true

After that, apply the upgrade and reboot:

sysupgrade -v /tmp/sysupgrade.img.gz
reboot

And thats it :)!

Thanks a lot again to Freifunk Trier for supporting my project :).

[Freifunk] Virtual Freifunk Router on VMWare ESXi 4.1

This post was planed a LONG TIME, however - due to the fact that I could not get it working back in 2015 (See: https://github.com/freifunk-gluon/gluon/issues/496) it had been delayed. However, as I have the need to get Freifunk working as VM on a central ESXi Server - I tried it again - and it worked! Basic instruction to get it working can be found here in german: https://www.it-kl.eu/2015/08/gluon-x86-unter-vmware/

I got following equipment: ESXi 4.1 Server with multiple NICs.
Start up with getting the right image from your Freifunk Team. I got the gluon-fftr-0.8.4-x86-vmware.vmdk from the Firmware Store of my trusted guys from FFTR (https://github.com/freifunktrier/firmware_store/tree/master/firmware/stable/factory [ Trier 0.8.4 is gluon 2016.1.6-3-g9300421, it's just 2016.1.6 + ee597c6 + Webinterface-color-patches ] )
After that, create a new VM on your VMWare ESXi Server. Choose an user definied configuration, "Other" OS and "Other (32-Bit)" Version. I gave the VM a 1 vCPU and 512 MB of RAM - but you can chose as you like. After that, you need to create two Network Devices / NICs. I chose two E1000 ones, and gave the first Interface the Freifunk LAN and added the second Interface to my common WAN (IMPORTANT!). After that, you're not going to create an HDD.
After the creation of the VM, upload your vmdk file to the folder, edit the VM and chose the downloaded VMDK as Harddrive.

On your ESXi Server, go to Configuration, Network and edit your vSwitch. Allow Promiscuous Mode, MAC Change and Fake Transmissions.

After that, go to Configuration, Software, Advanced Settings - to the "Net" section and change Net.ReversePathFwdCheckPromisc to 1 (thanks to FFS-Roland for helping out! :))

After that, you can start up your VM. You should get DHCP on your FFLAN Port - something like an 192.168.1.x address. Go to 192.168.1.1 via browser, give your Router a name, enable Mesh VPN (important!) and maybe change the bandwidth settings. Save and mail your VPN Key to your Freifunk Team. In some hours, you should be good to go (the Key added to their system - and after a quick reboot of your VM, you should be live :))

Thanks a lot to Draco and Ranlvor from Freifunk Trier for their tremendous help :)!

[ESXi5.5U2] Install ESXi on VMWare Host with less than 4 GB of RAM

I found this solution in the Spiceworks VMWare Forum by User ZEFiR and after testing it succesfully with ESXi 5.5 Update 2, I wanted to preserve it for future use. The Original Post can be found
here. Thanks a lot to ZEFiR for sharing this very useful piece of knowledge :)!

1. Boot from VMware ESXi 5.5

2. wait "Welcome to theVMware ESXi 5.5.0 Installation" screen

3. Press Alt+F1 for enter console and login as "root" (no password needed)

4. go to:
cd /usr/lib/vmware/weasel/util/
delete file:
rm upgrade_precheck.pyc;

5. remove readonly flags:
mv upgrade_precheck.py upgrade_precheck.py.def
cp upgrade_precheck.py.def upgrade_precheck.py

6. set permissions:
chmod 755 upgrade_precheck.py

7. open script in 'vi':
vi upgrade_precheck.py

8. find "MEM_MIN_SIZE", pres "a" (edit mode. "(4 * 1024 - 32)" change to "(2 * 1024 - 32)", pres 'ESC', run command ":wq" (save & exit)

9. look installer PID:
ps -c | grep weasel

10. kill installer (PID = process Nr.):
kill PID

Installer process run automatically (with modified config script).

Continue from "Welcome to theVMware ESXi 5.5.0 Installation"

[ESXi4.1U1] UMTS Stick on VM [ZTE MF 190 / HUAWEI E160G]

I needed to connect an UMTS Stick (O2 Surfstick) to an VM Machine which should serve as "Router".
No problem - ESXi does support "USB Direct Through" - so you can easily connect an USB Stick to your VM...
At least, thats "normally" the Case:
With UMTS Sticks, this feature doesn't work.
Why?
UMTS Sticks start up with an U3 Partition with all that needed, nice connection software....
And therefor, ESXi does see an CD Rom - which doesn't show up within USB.
And... how to solve that?
Luckily I found this post: https://forum.openwrt.org/viewtopic.php?id=26045
Which does contain the secret sauce:
Just connect your USB Stick to an already installed System... (your Laptop with the Connection Software and Drivers i.e.)
Look up your UMTS Stick within the Device Manager, get the COM Port.
Open Putty (9600 Baud worked for me, the Original Author does think of: 115200 kbps, 8 data bits, parity none, stop bits 1, Flow control None) with that Com Port.
Type in: AT+ZOPRT=5 and AT+ZCDRUN=8
Thats it!
Now the U3 doesn't show up anymore, and it works!!
To reenable the feature, enter AT+ZCDRUN=9

For Huawei E160G / T-Mobile Surfstick V / Essential:
CD – Rom Funktion deaktivieren at^u2diag=0
CD – Rom Funktion aktivieren at^u2diag=1

Additional Links:
http://3g-modem.wetpaint.com/page/ZTE+AT-commands
http://3g-modem.wetpaint.com/page/Huawei+AT-commands

Switch from Diag to CD-Rom Mode per AT-Befehl unter Macosx

[ESXi4.1U1] vCenter Server Startup Problems

I got the vmware virtualcenter server error 1000 odbc error on bootup of my Windows Server 2003 (64bit) which did serve my vCenter Server.
In fact this did mean in my case: The MSSQL Server didn't boot / or too slow, so that vCenter Server came up - couldn't access the DB and shutdown - "great!".
Luckily, there is an solution, pointed to by this ( http://communities.vmware.com/message/1247357 ) and this Website ( http://blogs.egroup-us.com/?p=1821 )

In the end I solved my problem following:
cmdline:
sc config vpxd depend= rpcSs/lanmanworkstation/MSSQL$SQLEXP_VIM/ADAM_VMwareVCMSDS

With these new dependencies, vCenter should boot up on boot... at least it did that last time... ^^'.

[ESXi4.1] Review

It has been sometime, but I still want to tell my experiences with ESXi 4.1.
In the beginning, I was very annoyed from the fact that you really need an 64 bit System and at least 2 Gigs of RAM.
But the rest just turned out fine, I have to admit.

Theres an upgrade path available, so you can upgrade your ESXi 3.5 Machine via an Upgrade to 4.1 without losing your Machines or the need to reinstall.
Actually - it worked, which did surprise myself in a good manner.

In Terms of Speed and Stabilty I did not recognize anything bad.
Especially the new features were downright awesome:
I just love the USB Virtualisation.
I really hit the top by plugin in an USB Videocard to my ESXi 4.1, and adding this Virtual Device to an Vmware Appliance: Awesome speed, had realtime video within my VM.
( I used it to virtualize a bunch of Servers, Firewalls, Routers, Asterisk and a Webcamserver... was really nice running ).

The only thing I really couldn't test and missed was the PCI Virtualization.
That feature *should* work - but you need some kind of state-of-the-Art Intel CPU / Board with Virtual I/O... and I had an old Tyan AMD Dual Core Board, only... ^^'.

So maybe sometime later.

But after all, I'm really happy with that System, I could migrate an running Windows XP Machine to the ESXi4U1 and the Converter was really doing alright...