If you can’t shutdown a VM, and it won’t poweroff, ssh into your Host and kill the process that hosts the VM:
esxcli vm process list esxcli vm process kill --type=hard --world-id=[WORLDID]
You can choose types: soft, hard, force.
So, a few weeks ago I sent a letter to VMware requesting the source for ESXi 5.1.0U1 as stated on their site that any user who would like it should.
VMware’s law department creeped a little on my LinkedIn profile, I then received a call from a VMware lawyer a few days later. I explained the truth… I’m just a dude, trying to build a driver that isn’t supported. I just wanted the source so I could properly build the driver. I’m not looking to resell or reverse engineer… just some dude. He forwarded me to their driver project manager who followed up (within two days) with a call. I never followed up.
Today, I received “the source code” on a CD. Very impressive customer service.
Dear Matt, In response to your request, please find enclosed a CD containing the source code corresponding to the binaries for the open source components and modifications of those components distributed in VMware ESXi 5.1 Update 1. Sincerely, VMware
You can easily use `esxtop` in batch mode to generate a CSV file containing specific performance stats.
There are some caveats to this process, but you can make it through relatively unscathed capturing, generally, only what you need.
Download the patch bundle and incremental patches:
1) Download the latest patch bundle and any patches since the latest patch bundle.
There seems to be a naming convention for patch bundles as follows: “update-from-esxi5.0-5.0_update01”, “update-from-esxi5.0-5.0_update02”
Patch bundles are cumulative, so at this point, I would only need to download update-from-esxi5.0-5.0_update02 and any patches that were issued after its release.
Unfortunately, you can not use the native ESXi `wget` binary, as the downloads are only accessible via a logon session.
2) Using the vSphere, focus your host in the left pane> summary tab> resources panel> storage section> right-click on the datastore> Browse Datastore
3) Click the icon with the hdd icon with the green up arrow and upload the patch bundle and patches to your store.
Install the patch bundle, then the patches:
1) Connect to you ESXi server via SSH.
2) Verify the presence of the patch bundle and patch files by checking /vmfs/volumes/datastoreN (where N is the datastore number):
ls -al /vmfs/volumes/datastore*/*.zip
3) Check to see if any of the vibs require your server to be placed into maintenance mode:
for f in $(ls /vmfs/volumes/datastore*/*.zip) ; do ( python /sbin/esxcli.py software sources vib get -d $f | grep -E .*Name\|Maintenance.* ) ; done
4) You can then place your server/host into maintenance mode:
5) To install all VIBs:
for f in $(ls /vmfs/volumes/datastore*/*.zip) ; do ( python /sbin/esxcli.py software vib install -d $f &>> /var/log/vib_install.log ) ; done
6) Review the log for information on failures and pending reboots:
7) Reboot the host if necessary:
reboot #yep, that's it
8) You can take the host out of maintenance mode:
This article will expand over time.
I decided today that I was going to stop messing with the vSphere Client, and start doing all my work with VMs through the command line interface presented through SSH.
I soon realized that some of the interface is not so nice. I really want to bang out commands with tab completion, in luie of no true console like interface. I figured I’d throw together (and expect to expand) some bash scripts for ease of use.
Update: Here’s a valuable thread on HardForum. Here is info on using the VAAI and issuing SCSI UNMAP to reclaim thin provisioned space. You may want to disable this automatic functionality to control when it occurs.
There are three options for allocating space out of your storage for your VM disks:
Thick Provisioning Lazy Zeroed: Allocates the disk space statically (no other volumes can take the space), but doesn’t write zeros to the blocks until the first write takes place to that block during runtime (which includes a full disk format).
Thick Provisioning Eager Zeroed: Allocates the disk space statically (no other volumes can take the space), and writes zeros to all the blocks.
Thin Provisioning: Allocates the disk space only when a write occurs to a block, but the total volume size is reported by VMFS to the OS. Other volumes can take the remaining space. This allows you to float space between your servers, and expand your storage when your size monitoring indicates there’s a problem. Note that once a Thin Provisioned block is allocated, it remains on the volume regardless if you’ve deleted data, etc.
By definition, you would expect Thick Provisioning Eager Zeroed to be the fastest.
Suddenly, 17 days after the ‘leak press release’ was published by HardcoreCharlie to pastebin, the news story broke far and wide that VMware source code has been leaked.