Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 210929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:02:58+00:00 2026-05-11T18:02:58+00:00

In VMware ESX/i, how can I use the VMware Virtual Infrastructure Remote CLI to

  • 0

In VMware ESX/i, how can I use the VMware Virtual Infrastructure Remote CLI to find unused machines/disks? I have a huge inventory and many files on disk, and I want to find files that are candidates for deletion.

What I want is to determine whether

  • a vmdk disk is in use by any vmx machine on the host, or whether
  • a vmx machine exists in the inventory on the host.

Surely some smart method exists for finding this? If not the VIRCLI, then maybe something else? Or do I need Virtual Center for this?

EDIT: This is a single host that does not share machines or disks with any other host.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:02:59+00:00Added an answer on May 11, 2026 at 6:02 pm

    The IC doesn’t know if you’ve got those disks shared an in use by another ESXi host, it’s very common to have a SAN on the backend and multiple hosts accessing the same storage device. In this case there’s no way to know which hosts are accessing which machines, the scenario you describe only makes sense if you’ve got a single host – which is not the typical scenario for many of VMware’s corporate customers.

    Using the RCLI or shell you could iterate through all existing machines and then compare that to a list of what’s on disk. If you’ve got disks shared between hosts however, then things become a lot more complicated and you’d need to iterate through the devices on each machine as well.

    Update: Right, now it’s more of a nuts n bolts scripting/programming question 😉

    Starting with the RCLI documentation I’d probably do something like using vmware-cmd -l to list all registered machines on the host. Then using vifs download the config files, grep through those looking for mentions of virtual disks (.vmdk) and storing all those in a file.

    Part two, would be writing a script to do a recursive directory listing, again using vifs, running grep again on that to only include .vmdk and .vmx files. Now you’ve got two lists, pipe these through sort and then diff the results to find out what .vmx files are not registered on the machine and what .vmdk files are not in use by any active VM. And then you have your candidates for deletion 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 103k
  • Answers 103k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use GetAncestor() with the GA_PARENT flag. This will retrieve a… May 11, 2026 at 8:22 pm
  • Editorial Team
    Editorial Team added an answer In the MSDN doc here... There is a note mentioning… May 11, 2026 at 8:22 pm
  • Editorial Team
    Editorial Team added an answer I have found an alterntive solution to this issue and… May 11, 2026 at 8:22 pm

Related Questions

I have a VMWARE ESX server. I have Redhat VMs running on that server.
I've got problems installating the VMWARE ESXi Server. The Installation finishes without any error
I have an older server (retired database box in fact) that doesn't fit the
I am just having a look at using Powershell, along with VI-Toolkit, to produce
I hope everyone will pardon the length, and narrative fashion, of this question. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.