Command to list all the hard files that are attached to a virtual machine

Hi people,

I am documenting our infrastructure. I would like to a command that lists all the vmdk files and the virtual machine, they are attached. I'm sure that I've done it before, but I don't remember the command. Thank you

in advance.

Paul

You could use Powershell and make a request to Virtual Center, if they are available:

A basic example:

SE connect-VIserver

Get - vm | Select Name, @{Name = "VMDK disks"; {Expression = {$_ | get-harddisk | select filename}}

/ Rubeck

Tags: VMware

Similar Questions

  • How to extract a report to list all the s VM that are turned off in a cluster.

    I tried to do this by adding my cluster in a new service and then, by running a report on this group, but did not.

    I have to add the VM; s as well as in the service to pick up this report.

    Please advise.

    What version of the SOUL are you running? You need not create any service.

    There is an out of the box report that you can run:

  • The list of all the Resource Pools that are part of a group of ESXi

    Hello

    I'm trying to get a piece of code work that will list all the resource pools that are present in a cluster of ESXi.

    • I know I can find what list of resources of a virtual machine resides in.  I don't want that.

    // Find a matching resource pool on an ESXi hosts
      var esxiCluster = esxiHost.parent;
      var esxiClusterResourcePools = esxiCluster.resourcePool_ResourcePool;
    
    
      System.log("what is the ESXi cluster: " + esxiCluster.name);
      System.log("vimtype: " + esxiCluster.vimType);
      System.log("what pools exists: " + esxiClusterResourcePools);
    

    So I know that the vimType will come back with what I expect (ClusterComputeResource).  The question I have is the object "resourcePool" is reference to the root resource list (in my case, it is 'resources').

    What I want is all DRS resource pools are configured.  I need something like "resourcePool_ResourcePool.children".

    Any help is appreciated.

    Thank you

    B

    Hello

    Check if this code example that works in your case:

    var esxiCluster = esxiHost.parent;
    var esxiClusterResourcePools = esxiCluster.resourcePool_ResourcePool;
    var pools = System.getModule("com.vmware.library.vc.resourcePool").getAllChildResourcePool(esxiClusterResourcePools);
    
    // dump names of child pools
    for each (var pool in pools) {
      System.log(pool.name);
    }
    
  • How to find the library files that are not due to problems of indexing

    I need help to know how to find the library files that are not as a result of indexing problems?

    I use Windows 7

    Thank you

    Charlene

    Try to open the folder that the library uses directly.  For example, if it is your Documents folder, open C:\Users\Charlene\Documents

  • When you try to install Internet Explorer 9 in Vista, got code 80070017 error, SFC/Scannow shows the corrupted files that are not resolved

    I had a lot of trouble with my vista system (the most recent is an error code 80070017 when you try to install the update IE-9).  I ran sfc.exe/scannow and have a CBS file with several currupt files that are not fixed.  I'm over my head from the experience now.  Can someone help me?  Thank you!

    Original title: Vista files corrupt

    Try to run in safe mode.

    If there are files corrupted again after that, you can mount the image file .iso for the same version of Windows, you probably Vista SP2 - OR - put the disc in the drive.

    (Make sure same version x 86 or x 64 also!)

    Then use 7zip to look in the file \Sources\install.wim for files without a problem. Copy and paste from here directly on those on your HARD drive.

  • My Win 7 said all the exe files that I download a virus and deletes it

    No matter what exe file I try to download it appears and says that he has a virus and deletes the file.  Gives me no options to go ahead and run the case.

    Niether win7 or IE will produce all this 'Virus '. msg... »

    The only app that will produce a msg saying 'Virus '.... "is your application antivirus or third-party plugin that is built into IE.

  • When file/collection, how can I delete all the related items that are not on my last composition?

    Hello, I have a great difficulty using the file/collection a large file I did months ago, because when I use it, the file is created, but it takes 2.5 to space! compared to others of my works, taking almost 1 TB of files, this one is too big and I think by deleting some files, but I don't want to make a mistake, so I wanted to ask here, if it is possible to take a main composition and only do a file/collection of this composition, objects and elements that serve there (the last I made on my account at least, with the elements used on that, because I think that there are many (if not a large part of them) files and elements that are not used in the final version, as scenes of the version beta of my work, the problem is the composition is too long and have a lot of different archives or drop movies then it could take forever to do it manually...

    Thanks for reading me! I hope that this is a solution...

    It's a two-step process:

    1. reduce your project to the desired composition.

    2 recover your files.

  • Report to the size of the list of snapshots that are used by a virtual machine

    I'm looking for to add to my report to the size of all the snapshots that are currently used by each virtual machine.  For example, I'm already reporting on space put into service and used space - but how much space are using snapshots?   Is there a way to get this data using powerCLI?

    Thank you!

    Get-Cluster-name NOMCLUSTER | Get - VM | Select

    Name, MemoryMB NumCpu, Description, PowerState, ProvisionedSpaceGB, UsedSpaceGB, Version, VMHost, ResourcePool,

    @{N = "HDsizeKB"; E={($_. Hard drives | Measure-Object-CapacityKB property-sum). Sum}} folder,.

    @{N = "Datastore"; E={($_ | Get - Datastore). Name}},@{N="#snapshots '; E={($_ | Get - Snapshot). County}},

    @{N = 'Name of the OS'; E={$_. Guest.OSFullName}} | Export-Csv "C:\report.csv" - NoTypeInformation

    The cmdlet Get-SNapshot in PowerCLI 4.1 returns an incorrect value. See the size snapshot by Dimitar and Vitali.

    And they display a script, called getsnapshotsize - 1.ps1 that returns the correct value.

    You can use this script to your script as follows:

    (1) download the script and save it in the directory where your other scripts

    (2) call the script of the post in your script and use the size of return value

    Something like that

    Get-Cluster -Name clustername | Get-VM | select Name,MemoryMB,NumCpu,Description,PowerState,ProvisionedSpaceGB,
         UsedSpaceGB,Version,VMHost,ResourcePool,
         @{N="HDsizeKB";E={($_.Harddisks | Measure-Object -Property CapacityKB -Sum).Sum}},Folder,
         @{N="Datastore";E={($_ | Get-Datastore).Name}},@{N="#Snapshots";E={($_ | Get-Snapshot).Count}},
         @{N="OS Name";E={$_.Guest.OSFullName}},
         @{N="Snapshot size MB";E={(.\getsnapshotsize-1.ps1 $_ | Measure-Object -Property SizeMB -Sum).Sum}}     |`
         Export-Csv "C:\report.csv" -NoTypeInformation -UseCulture
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • the installation files that are necessary to control a 33210 agilent has via USB

    Hello

    I'm trying to control agilent 33210 via USB to a produce an arbitrary waveform using labview. The installation files I need? Obviously labview 86, ivi specific driver for 33210a, and? After you install labview 86, the program prompted me to install pack pilot devices, which I did, but he asked for disk 3 that does not exist in the package, I downloaded on ni.com.

    BTW, is there a guide on where to go from there? I'm more c/matlab programming and graphic...

    Thank you very much

    Hi User2009,

    Once you have installed LabVIEW and NI-VISA, you can do the rest of LabVIEW.

    The simplest process is:

    1. Go to tools' Instrumentation' find instrument Driver and to use the finder driver tool to download and install the appropriate driver (I recommend getting the pilot LabVIEW Plug - and - Play project).
    2. "Once you have installed the driver open the example finder and navigate to hardware input and output" Drivers of instruments ' LabVIEW Plug and Play and find an appropriate example.
    3. Select your device and run the example to make the work of communication course.
    4. Use the example as a starting point and make any changes you need.

    I got to have an Agilent 33120 at my office, so I recorded a quick video for you to the process described above.  I use GPIB, but the process must be the same for USB.

  • Movie Maker does not recognize the MPEG2 files that are created from my new video camera. What can I do?

    I bought a new video camera and Movie Maker on my computer does not recognize the MPEG2 files as video files. He brings only in the sound. Is there something I can do?

    I bought a new video camera and Movie Maker on my computer does not recognize the MPEG2 files as video files. He brings only in the sound. Is there something I can do?

    ======================================
    You run Vista Movie Maker 6? Might be interesting to try
    Convert MPEG files to WMV format before importing.

    Or... it may be interesting to try to install Windows Live Movie Maker...
    which could be compatible with the MPEG2 files.

    Windows Live Movie Maker
    http://explore.live.com/Windows-Live-Movie-Maker
    (There are other applications included in the download...
    Uncheck the ones you don't want)

    Good luck...

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • where can I see all the business rules that are running

    Hello
    We said that it does not exist in our planning v11 but can't find it.
    where can I see all the processes (such as business rules) that users are running?
    Thank you.

    Hello

    They probably meaning that the work console > tools > console work.
    More information > http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_user/job_stat.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How do I/navigate/view to scroll through all the ID files that I have open?

    In Quark I could do this CTRL-F6.

    If you are a user of windows, press ctrl + tab

    If you are a mac press cmd + ~(tilde key) user

  • I bought the real book CD-rom, which inserts a link to the pdf files that are no longer be displayed in my firefox browser after the last upgrade to adobe reader DC.  How can I fix it?

    I bought the CD "The Real Book" which is a html interface that displays PDFs from the CD.  However, whenever there is an upgrade to adobe reader, it ceases to display PDF files and only displays a gray page indicating that an adobe plug-in is necessary.  How can I fix it?  (PDF files are sheet music).

    Hi jackd91021239,

    Please refer to this article:- display PDF in browser Adobe Acrobat DC, Acrobat Reader DC

    Kind regards

    Christian

  • Create a script to list all the .bat and .cmd files with the dir command &

    Hello

    Im trying to create a script that will list all the .bat and .cmd files in a specific folder and add the data to a new file (file.txt) - example below:

    dir c:\>desktop\file.txt/OD
    dir d:\>>desktop\file.txt
    dir f:\jobs\*.bat>>desktop\file.txt/OD

    IM able to search the F drive and the list of all the .bat files using a generic parameter, but ideally id like to search for .bat and .cmd files, but whenever I have it try does not work. Any ideas?

    I tried the following:

    dir c:\>desktop\file.txt/OD
    dir d:\>>desktop\file.txt
    dir f:\jobs\*.bat,*.cmd>>desktop\file.txt/OD

    Any help is appreciated, the reason for which I need to check all the .bat and .cmd files is to ensure that the scripts on a cluster are all data, so need them all listed in a doc if possible

    Thank you

    Hello

    Thank you for visiting the Microsoft answers community site. Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for guys official script Forum. Please ask your question in the official Scripting Guys Forum.

    http://social.technet.Microsoft.com/forums/en-us/iTCG/threads

  • How to list all the files in a backup job?

    User GreyGnome:

    I would like to get a list of all the files on a file system backup task. Is this possible?

    Through the CLI, if possible. On Linux.

    Thank you.

    Posted by AdrianMoir

    Hi GreyGnome,

    You can actually set this via the user interface on the backup options for employment. See attached picture.

    This will allow you to define a path and file name of a text file that lists all the files that are backed up by work, when the work is performed.

    Once the option set is saved under a name, if you create jobs through the CLI, with nvjobcreate, you can specify the selectionoptionsetname - , by using the name of the set option that you created with the entry 'Path to Backup Log'.

    The text file will display the name of the file in the following attributes...

    Backup Path, State, Type, size (bytes), Timestamp, attributes.

    Thank you very much

    Adrian.

Maybe you are looking for