WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Quick Tip - Handy ovftool 4.0 advanced options

07.01.2014 by William Lam // 3 Comments

I recently had a need to deploy an OVA using ovftool on a Windows desktop and I ran into the following error:

Error: Could not lookup host: root

Since the environment I was deploying to did not have DNS, the failed hostname lookup was expected. This was pretty annoying with previous releases of ovftool but it looks like with the latest 4.0 version, there is a new advanced option called --X:disableHostnameResolve that would allow you to disable this check. Using the new version of ovftool and the advanced option, I was able to bypass the check and deploy the OVA.

[Read more...]

Categories // Automation, Fusion, OVFTool, vSphere, Workstation Tags // injectOvfEnv, ovftool

How to efficiently transfer files to Datastore in vCenter using the vSphere API?

06.18.2014 by William Lam // 19 Comments

A pretty common task for vSphere Administrators is to upload or download content from a vSphere Datastore which usually contains ISOs and floppy images. You can initiate the file transfer using the vSphere Web/C# Client, however this process can be quite tedious when having to manually upload several ISOs. Instead, you will probably want to automate this process and and there are a couple of ways in which you can accomplish this. One option, is to go directly to an ESXi host and upload your files but this is not ideal when you have vCenter Server to centrally manage your infrastructure. The second option is to go through vCenter Server, but depending on the implementation, you can potentially add unnecessary load to the vCenter Server if implemented incorrectly.

Let me explain this further with two diagrams and you can decide which implementation you prefer?
inefficent-file-transfer-to-datastore
In this first implementation, I directly access the file management API which leverages a simple HTTP GET/PUT operation to upload files to a vSphere Datastore. What I found out while transferring the data was that the data actually traverses through the vCenter Server and then onto the ESXi host before writing to the vSphere Datastore. This of course made the data transfer very inefficient not to mention additional bandwidth and load being added to vCenter Server.

I created a sample vSphere SDK for Perl script that demonstrates this inefficent transfer called inefficent-upload-files-to-datastore.pl

Here is sample execution of the script which accepts the name of the vSphere Datacenter, vSphere Datastore, the source file to transfer and the destination path of where the file will be uploaded to:

./inefficent-upload.pl --config ~/vmware-dev/.vcenter55-1 --datacenter Datacenter --datastore vsanDatastore --sourcefile /Volumes/Storage/Images/CentOS-6.4-x86_64-netinstall.iso --destfile ISO/CentOS-6.4-x86_64-netinstall.iso

After talking to some folks about this problem, I learned about a more efficient method as shown in the diagram below.
efficent-file-transfer-to-datastore.png
As you can see, we can still initiate the transfer using the vCenter Server, but the actual data transfer is than sent to one of the ESXi hosts that has access to the vSphere Datastore. To accomplish this, we need to use the AcquireGenericServiceTicket() method which is part of the sessionManager. Using this method, we can request a ticket for a one time HTTP request to connect directly to an ESXi. To upload a file, the request must include the method which in this case will be a PUT operation and the local URL to an ESXi host that has access to the vSphere Datastore.

Here is an example of a URL: https://vesxi55-1.primp-industries.com/folder/ISO/CentOS-6.4-x86_64-netinstall.iso?dcPath=ha-datacenter&dsName=vsanDatastore

  • ESXi IP Address/Hostname - In the script, I select the first ESXi host that has access to the vSphere Datastore
  • vSphere Datastore Directory - Directory into which the contents of the file will be placed in. In this example, we just have one top-level directory called ISO which must already exist
  • Destination file name - The name of the file that should appear in the vSphere Datastore
  • Datacenter Name - This should always be ha-datacenter when connecting directly to an ESXi host
  • vSphere Datastore - The name of the vSphere Datastore

To demonstrate this functionality, I have created a vSphere SDK for Perl script called efficent-upload-files-to-datastore.pl which accepts the name of the vSPhere Datastore along with the source and destination of where the file will be placed:

./upload-files-to-datastore.pl --config ~/vmware-dev/.vcenter55-1 --datastore vsanDatastore --sourcefile /Volumes/Storage/Images/CentOS-6.4-x86_64-netinstall.iso --destfile ISO/CentOS-6.4-x86_64-netinstall.iso

Hopefully after looking at these two implementations, you will also agree that the second option is the best! One last thing that I would like to point out is that even though we are talking about transferring files to a vSphere Datastore, this method can also be used to efficiently transfer other supported files to an ESXi hosts through vCenter Server as described in this blog article.

Categories // ESXi, vSphere Tags // datastore, HTTP, iso, vSphere, vSphere API

Want to test drive Apple OSX 10.10 Yosemite? Try it on VMware Fusion & vSphere

06.06.2014 by William Lam // 26 Comments

Earlier this week, Apple announced their next version of Mac OSX at their annual developer's conference called OSX 10.10 Yosemite. For those of you who are part of Apple's Development Program and would like to test drive the latest Developer Preview, you can quickly and safely do so by running it inside a Virtual Machine using either VMware Fusion or VMware vSphere.

Disclaimer: It is important to note that Mac OSX 10.10 is not officially supported by VMware because Apple has not officially GA'ed, however it will run fine for the most part.

UPDATE (07/26/14) - I was able to install the latest OSX Yosemite public beta using the same instructions listed below.

It is highly recommended that you perform an upgrade using the .app from an existing installation of Mac OSX to Yosemite for optimal performance. There are currently some known issues with a fresh installation which may cause some problems, this is currently being investigated by VMware Engineering.

Installing OSX Yosemite on Fusion:

For Fusion users, I recommend using the latest VMware Fusion 2014 Tech Preview and selecting OSX 10.9 as the guestOS. If you have any feedback on the Tech Preview of Fusion, be sure to leave a comment on the Fusion Community Forums. Here are a couple of screenshots going through the upgrade as well as a successful boot of Mac OSX 10.10.

mac-osx-10.10-yosemite-vmware-fusion-0
mac-osx-10.10-yosemite-vmware-fusion-1

Installing OSX Yosemite on vSphere:

For vSphere users, you will need to be running vSphere 5.5 and using Virtual Hardware 10 which provides support for Mac OSX 10.9 as a guestOS. If you need to perform a fresh installation of OSX, you can follow the detailed instructions here which requires a quick format of the underlying virtual disk before starting the installation. Below is a screenshot of Mac OSX 10.10 running on vSphere on top of my Apple Mac Mini.

mac-osx-10.10-yosemite-vmware-vsphere-1

Here are a couple of things I noticed about the current Beta of OSX 10.10:

  • Installing VMware Tools does not work and just seems to hang. If you need VMware Tools, make sure you install it before upgrading
  • After upgrading from OSX 10.9 to 10.10 running on VMware Fusion 6.0, it seems to hang after reboot
  • It feels a bit sluggish, potentially from being the first Beta drop

Even with some of these issues, I still think it is pretty cool that you can run a Beta version of OSX that was literally released a couple of days ago. I know VMware Engineering is already hard at work on figuring out the issues and optimizing OSX 10.10 to run just as smooth as past releases of Mac OSX. I am confident by the time Mac OSX Yosemite GA's, that it will be running flawlessly! I also would like to thank Regis Duchesne for sharing some tips on getting OSX 10.10 up and running.

Categories // Fusion, vSphere Tags // fusion, mavericks, osx, vSphere, yosemite

  • « Previous Page
  • 1
  • …
  • 90
  • 91
  • 92
  • 93
  • 94
  • …
  • 109
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...