How to quit ESXi SSH and leave background tasks running

In Linux when a console session is closed most background jobs (^Z and bg %n) will stop running when the parent ( the ssh session ) is closed because the parent sends a SIGHUP to all its children when closing (properly). Some programs can catch and ignore the SIGHUP or not handle it at all…

Automatically passing ssh password in scripts especially to ESX where passwordless ssh is hard

First you need to install sshpass. Ubuntu/Debian: apt-get install sshpass Fedora/CentOS: yum install sshpass Arch: pacman -S sshpass Example: sshpass -p “YOUR_PASSWORD” ssh -o StrictHostKeyChecking=no YOUR_USERNAME@SOME_SITE.COM Custom port example: sshpass -p “YOUR_PASSWORD” ssh -o StrictHostKeyChecking=no YOUR_USERNAME@SOME_SITE.COM:2400 from : https://stackoverflow.com/questions/12202587/automatically-enter-ssh-password-with-script   This works better for me though for sshfs: echo $mypassword | sshfs -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no user@host mountpoint -o workaround=rename…

Resizing a disk once the volume has grown on host in a VM (Ubuntu)

The disk will not automatically resize on many platforms once more disk space was made available. Particularly in Ubuntu 16.04 Rescanning the device for size maps : echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan Then standard procedures to grow the fs apply. nJoy 😉    

Longevity and stability of sshfs

Just worth noting I had many arguments with other sysadmins and bosses over the stability and validity of sshfs as a shortcut to creating a bridge for transferring files for backup or adhoc moves   The following is the result of an rsync from one sshfs mount to another (from ESXi servers I only had…

VMWare vSphere ESXi v5.5 Install Errors disk cannot partition

While adding a new disk to an ESX5.5. box it could not finish the partitioning stage and did not add to the Datastores. Apparently ESX does succeed to clean up the Disk from the GUI. NOTE: This procedure will destroy all data on the disk

Accessing ESX management interface (DCUI) from ssh

Access the ESXi Direct Console User Interface (DCUI) over SSH When not in position to go to the DC to access the ESX text mode interface use the DCUI command: First you need to enable and start Remote Tech Support (SSH). This is done for the ESXi Host in Configuration -> Software -> Security Profile…

Enable VMWare time sync from command line

Virtual machines and NTP do not go easily well together. Machines paused for extended periods tend to loose the ntp sync since the difference grows too much.   Also from VMware Docs the following info might be clarificatory: Do not configure the virtual machine to synchronize to its own (virtual) hardware clock, not even as…

ESXi 5.1 : Fixing ‘Failed to deploy OVF package: The task was canceled by a user.

Where I work, we love using OVA templates to speed up our deployment of virtual machines. I recently upgraded one of my servers to ESXi 5.1 (which also required an update to vSphere). ESXi 5.1 provides support for Windows 8 and Server 2012, which is incredibly useful. However, whilst building OVA templates for these operating…