WilliamLam.com

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

Search Results for: vsphere events

How to move vSAN Datastore into a Folder?

06.14.2017 by William Lam // Leave a Comment

A question came up the other day from a customer that wanted to move a vSAN-based datastore into a vSphere Folder, but was having some trouble with this operation. vSphere Folders are commonly used by administrators for organizational purposes and/or permission delegation. When the customer tried to move their vSAN datastore into a folder using the vSphere Web Client (applies to HTML5 Web Client as well), what they found was that nothing happens even though the UI indicates the operation should be possible with the (+) symbol.


I also saw the same behavior described by the customer and was curious if this was a UI only issue or a general limitation. To quickly verify, I decided to perform the operation using the vSphere API instead of the UI. Behind the scenes, the UI simply calls the MoveIntoFolder_Task() vSphere API which allows you to move various vSphere Inventory objects into a vSphere Folder. As many of you know by now, the vSphere APIs can be consumed in variety of "SDKs" or programming/scripting languages which includes PowerCLI. For PowerCLI users, this functionality is further simplified and abstracted away using the Move-Datastore cmdlet which I will be using in our demonstration.

In my setup, I have two vSAN Datastores, one from a vSphere 6.0u3 environment and another from vSphere 6.5. Lets say I want to move the 60u3 datastore to HR folder and 66 datastore to Engineering folder. The following PowerCLI snippet below does exactly that:

Move-Datastore -Datastore (Get-Datastore "vsanDatastore-60u3") -Destination (Get-Folder "HR")
Move-Datastore -Datastore (Get-Datastore "vsanDatastore-66") -Destination (Get-Folder "Engineering")


Using the vSphere API/PowerCLI, the operation looks to have been successful. Lets now going back to our vSphere Web Client and see if the operation actually went through?

Look at that, both our vSAN Datastores is now part of a vSphere Folder! This looks like a UI (Flex/H5) only issue and I have also confirmed that this will be fixed in a future update of vSphere. For now, if you need to move vSAN-based datastores into a vSphere Folder, simply use the vSphere API as a workaround.

Note: I also found that if you need to move the vSAN Datastore back to the Datacenter level, you will also need to invoke that operation using the vSphere API as the UI also prevents this operation.

Categories // VSAN, vSphere, vSphere Web Client Tags // datastore, folder, PowerCLI, VSAN, vSphere API

Project USB to SDDC - Part 1

04.05.2017 by William Lam // 2 Comments

A couple of weeks back, Alan Renouf and I co-presented at the Sydney and Melbourne VMUG UserCon, here are some great write-ups about the events here and here. We were very honored to have been invited out and to also deliever the closing keynote. Having traveled halfway around the world, we thought it was only fitting to share something really special.

For the last couple of months, we had been working on a small pet project that I personally had been referring to as the "vGhetto SDDC". This was not something we had not shared with anyone before and thought the VMUG UserCon was the perfect venue to demo our new project. For the session, we decided to rename the project/session to USB to SDDC (better ring than the previous title) which might give you a hint on what the project might be about.

The inception for this project really stemmed from the work we did at last years VMworld Hackathon which was another idea that both Alan and I had came up and worked with the VMware Code team to deliver at both VMworld US and Europe. Like all great Automation stories, the motivation for this project was born out of pure laziness. With the huge success of the Hackathon at VMworld US, there was a huge demand for us to also deliver it again at VMworld Europe.

[Read more...]

Categories // Automation, ESXi, Home Lab, VCSA, VSAN, vSphere, vSphere 6.5 Tags // Docker, ESXi 6.5, Photon, usb, VSAN, vSphere 6.5

How to determine when a Virtual Machine is ready for additional operations?

04.04.2017 by William Lam // 3 Comments

This might sound like a pretty simple and basic question, right? However, the answer will actually depend on what you are trying to do. The motivation for this blog post actually stemmed from a conversation I had with one of our Engineers who works over in our core Platform Management Infrastructure which includes VMware Tools, Guest OS Customization, Guest Operations, etc. Although I was aware of some of these methods in determining when a VM was ready, I came to learn about a few new other methods that I was not aware of before. This is really one of the things I love about my job, constantly learning new things and diving deeper into our technologies and sharing that back with our customers to help enable them and their business.

So, what does it even mean for a Virtual Machine to be "ready"? Is it when the VM is powered on? Is it when the VM obtains an IP Address? Is it when the GuestOS is fully customized or is it when I can SSH or RDP to the system? Depending on what you are trying to accomplish, the answer will vary. In addition to that, there are two distinct VM states to consider. The first being the actual Virtual Machine state and the second being the GuestOS state.

Virtual Machine State

The VM state is pretty straight forward, it describes the "Hard" power state of the VM which can either be powered on, powered off or suspended. As you can probably guess, you will need to make sure the VM is powered on before you attempt to check whether the GuestOS is ready 🙂

Using the vSphere API, you can find the VM powerState under:

VirtualMachine->Runtime->powerState

Here is a PowerCLI snippet using the out of box cmdlet to get the power state for a VM named "air":

Get-VM -Name air | Select PowerState

Here is a PowerCLI snippet that uses the vSphere API via Get-View to retrieve the exact same information:

$vm = Get-View -ViewType Virtualmachine -Property Name,Runtime -Filter @{"name"="air"}
$vm.Runtime.PowerState

[Read more...]

Categories // Automation, PowerCLI, vSphere Tags // guest operations, guestOperationsReady, guestStateChangeSupported, interactiveGuestOperationsReady, vix api, vSphere API

  • « Previous Page
  • 1
  • …
  • 24
  • 25
  • 26
  • 27
  • 28
  • …
  • 36
  • 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...