WilliamLam.com

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

VMware Fusion Tech Preview 2 can now connect to ESXi & vCenter Server!

07.04.2014 by William Lam // 4 Comments

There was a lot of buzz this week on the announcement of the first vSphere Beta that is available for anyone to sign up for (still a private Beta with NDA rules), however one announcement that was probably missed is that the folks over on the VMware Fusion team just released their second Tech Preview of VMware Fusion (Build 1943533). Why is this such a big deal? Well, it includes one very exciting new feature that I have been asking for a awhile now, which is the ability to connect to an ESXi host or vCenter Server using VMware Fusion! VMware Workstation has had this feature for awhile now and I have been hoping the Fusion team would eventually implement something similar and It looks like they have finally answered 🙂

fusion-connect-to-vsphere-1
You now can connect either a Workstation, ESXi host or vCenter Server using VMware Fusion! If you are like me who primary uses a Mac and you do not want to run a single Windows VM just to be able to use the vSphere C# Client, you can now use VMware Fusion to connect to a vSphere system and perform some basic VM operations, which includes managing Virtual Hardware 10 VMs. You can even use this latest version to connect to the beta version of ESXi host.

Under the File menu, there is now a new option called "Connect to Server" or you can use Command+K for keyboard shortcut.
fusion-connect-to-vsphere-0
Here is a screenshot of connecting to a Mac Mini running ESXi 5.5:

fusion-connect-to-vsphere-2
Here is screenshot of connecting to one of my remote vCenter Servers:

fusion-connect-to-vsphere-4
As you can see this is a super handy feature and you can also have multiple connections to various vCenter Servers, ESXi hosts including Free ESXi! This alone is worth grabbing the latest Tech Preview of VMware Fusion! I can not wait for this feature to be officially released with VMware Fusion, this is going to be a must have feature for any VMware/Apple user!

If you have any feedback on this particular feature or others, please leave a comment on the VMware Fusion Tech Preview community forums!

Categories // Apple, ESXi, vSphere Tags // apple, fusion, mac

What happens when Virtual Machines have duplicate instanceUUID's on ESXi?

07.03.2014 by William Lam // 8 Comments

While catching up on some email this morning, I received an interesting question from an internal engineer regarding the behavior when a duplicate instanceUUID is encountered on an ESXi host. An instanceUUID is a unique identifier that is used by vCenter Server to uniquely identify a Virtual Machine within a vCenter Server instance, I have written extensively about this topic here and here. The question that was brought up was what happens when a duplicate instanceUUID is encountered on a standalone/un-managed ESXi host and then it is added to vCenter Server?

I had theory on how this might work, but I figured I might as well try this out in the lab to be sure. I created two standalone ESXi hosts and created a Virtual Machine on each host and made sure that both had the same instanceUUID (yes, the ESXi host will actually generate the instanceUUID property regardless of being connected to a vCenter Server, I suspect this is mainly for a placeholder). I then add ESXi #1 to a vCenter Server and confirmed that the instanceUUID is still the same using the vSphere MOB. I then continue to add ESXi #2 to the vCenter Server and because a duplicate instanceUUID has been detected, vCenter Server automatically updates the second Virtual Machine with a new instanceUUID.

Before adding to vCenter Server:

  • ESXi-1
    • VM1 - InstanceUUID: 52b5e420-9d79-6095-cfdf-dfdd998d205e
  • ESXI-2
    • VM2 - InstanceUUID: 52b5e420-9d79-6095-cfdf-dfdd998d205e

After adding to vCenter Server:

  • ESXi-1
    • VM1 - InstanceUUID: 52b5e420-9d79-6095-cfdf-dfdd998d205e
  • ESXI-2
    • VM2 - InstanceUUID: 502db26b-c32d-6c32-cd6c-1ffc1549d269

An interesting observation that was made by the engineer while testing a similar scenario was that instead of having two ESXi hosts, he just had one. He was a bit surprised to see that the ESXi host actually allowed both Virtual Machines to be powered on even with a duplicate instanceUUID. The reason I believe this was allowed is that both Virtual Machines still had a unique MoRef Identifier along with unique BIOS UUID and more importantly, the instanceUUID property is ONLY used with vCenter Server. From the ESXi host point of view, it does not care if it has a duplicate instanceUUID as it is not used but will try to generate a unique one to begin. This was actually pretty interesting to know and the reason for the initial question was to ensure that the instanceUUID of a Virtual Machine is still the right property to uniquely identify a Virtual Machine within vCenter Server, which it is.

Categories // Automation, ESXi Tags // instanceUUID

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

  • « Previous Page
  • 1
  • …
  • 128
  • 129
  • 130
  • 131
  • 132
  • …
  • 146
  • 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...