Total amount of storage in the data center

I'm trying to get a script that will give me the whole total amount of space used in a data center. I want to launch against the center of data from virtual centres. There is a total of approximately 1900 of virtual machines and virtual machine is distributed among several LUNS. I need to get the overall figure for a migration.

PS: I want to get the numbers in GB instead of megabytes and I also want it spits out a report in .csv on my local machine (c:\scripts\xxxx.csv)



Thank you guys.

I'm afraid that it won't work by changing just the data center-Get Get-cluster.

The reason is the cmdlet Get-data store later in the script, on the location setting it only accepts the data center objects, folder and DatastoreCluster.

But with a little small change, we can get it to work for clusters as well.

Get-Cluster | Select Name,@{N="Storage Used (GB)";E={  $sum = Get-Datastore -RelatedObject (Get-VMHost -Location $_) |   where {$_.ExtensionData.Summary.MultipleHostAccess -and $_.Type -eq "VMFS"} |  Measure-Object -Property CapacityGB,FreeSpaceGB -Sum  [Math]::Round($sum[0].Sum - $sum[1].Sum,2)}} |Export-Csv c:\scrpits\xxxxx.csv -NoTypeInformation -UseCulture

Tags: VMware

Similar Questions

  • Data store 'datastore1' is in conflict with a store of data that exists in the data center which has the same URL (.), but is back different physical storage

    Hello

    I am new to vCenter Server, so you can assume that I'm missing something obvious.

    I installed vCenter Server 5.5 and one of the two hosts of re-usable ESXi 5.0.0 connected correctly. When I try to connect to the second 5.0.0 ESXi host, I get the error message:

    Data store 'datastore1' is in conflict with a store of data that exists in the data center which has the same URL (.), but is supported by different physical storage

    I Googled it and found what I think are the best answers that are successful, but they all seem pretty unique in their situation (they have a cluster, I do not have) etc. Some solutions involve disconnecting the store of data and reconstruction of things. I would not make things worse and can live without doubt with the help of vSphere client (and not the web client) until maybe I can start again with a 5.5 installation to a new host once I have back up everything from the host unconnectable. I closed all the VM on the host of the second. I have put in maintenance mode. I've renamed the data store, all to nothing does not.

    Thanks in advance

    The problem is that a whole army could not be connected to vCenter due to the problem, the solution involving disconnection of the host apply.

    Here is how I solved the problem:

    1 use the client vSphere client heavy, connect you to the host that cannot not be connected to vCenter Server.

    2. click on the host computer, and then click the Configuration tab.

    3. click on "storage".

    4. find the offending on the right data store.

    5. right click on the data store incriminated and click 'remove '.

    6. click on 'Add storage' in the top right.

    7. follow the steps to find this data not mounted store. I gave him a new name just to be sure, even if it's probably not necessary.

  • Getting the data center of VirtualMachine with Get-View information

    Hello

    Y at - it a faster way to get the name of data using Get-View and the viewtype VirtualMachine Center.

    I found the following:

    Get-View -ViewType VirtualMachine -filter @{ "name" = "mtl1fsit02" } | Select-Object -Property Name,

    @{ Label = "GuestOSName"; Expression = { $_.summary.guest.guestfullname } },

    @{ Label = "Datacenter"; Expression = { (Get-view (Get-View (Get-view $_.parent).parent).Parent).name } }

    Thank you guys

    I think that the property calculated for the data center does not work in all situations.

    It assumes that your virtual machines are 3 levels down from the data center, which is not always the case.

    I personally use a loop, passing up through the parents, until he finds an object data center.

    something like that

    @{N = 'Center'; E = {}

    $parentObj = get-view $_. Parent

    While ($parentObj - isnot [VMware.Vim.Datacenter]({))

    $parentObj = get-view $parentObj.Parent

    }

    $parentObj.Name

    }

  • Orchestrator 5.1 REPORT-all the virtual machines in the data center and create a CSV file

    Hello

    What I basically want to do is create a report CSV of all virtual machines in the data center with various information (VMname, domain name FULL, IPaddress, status, data warehouses, tools etc...).  The export list in the client feature is insufficient (especially for any KPI report).

    Problem: (workflow is still under construction so real email send does not not and need to clean the code)

    I am stuck at the part of the creation of a table that can be parsed correctly in the CSV file.  2 ways I've tried will produce a report of single object or combine all of the table into a single string (where I am now).  I think the main problem I have is that I have to create a 2D within my service to push toward the final table that is written to the CSV format.  Basically, I do not understand how to push my variables in a loop of a table.

    Any help or assistance?

    Thank you

    B

    BOOM!

    Added some comments, removed the hardcoded in the csv temp file, deleted path the hardcoded port 25 for SMTP - mail settings should come from the configuration of the MAIL plug-in. And fixed / confirmed that the workflow now includes the attachment for e-mail and ends with success!

  • How to get the data center moref moref VM in c# using

    Hi all

    Could someone tell how to get managedobjectreference of data center using the VM moref? or any other easy way is? If anyone has examples of code in c# please share with me?

    Thank you

    Vijaya

    You can get the data center in which the virtual machine resides by the following search:

    VM Moref-> Parent (vmFolder)

    Moref folder VM-> Parent (data center)

    Parent of the virtual computer object will always be the vmFolder and the vmFolder object will always be a data center.

    For more details on the model of article inventory of vSphere, take a look at this blog post - http://www.doublecloud.org/2010/03/vsphere-inventory-structure-deep-dive/

  • Evolution of the data center: N7k or C6500

    Hello

    I am curretnly studying how our data centers evolve.

    For physical physical architecture:

    -We have 2 data centers, L2 interconnected at 10 Gbps.

    -On each data center, 2 x C6500 serve basic and distribution at the same time.

    -The access layer is to C3750G, connected to the chassis base with 3x1Gbps etherchannels.

    -No server rack blade for the moment.

    For the logical aspect:

    -L2: we use STP lying on the 2 DC

    -L3: Core are connected directly to the MPLS cloud. We use the VRF.

    The next evolution of the server would be to replace the stand-alone servers by blade, connected with 10 Gbps.

    I was hesitant on how to improve the current design, and I'm not sure the + and - 2 (except that Nexus need investment)

    (1) keep the C6500 and:

    -Add maps to 10 Gbps on the C6500 (16-port cards)

    -use VSS on the two site to simplify the design STP (even though we have had no problems with it so far)

    (2) replace C6500 by Nexus7K for greater flexibility with 10 Gbps

    (3) as an option, add a distribution layer N5K which would simplify the wiring and allow a possible evolution FCoE (in this solution, I would keep C6500 as base or evolve N7k).

    What do you think?

    Thank you

    P.

    This is going to be a very controversial topic.

    Let's not talk about budget here because it could become very dark.

    The 6500 Sup720 or Sup2T (I still prefer the latter), is very good when you aggregate a significant amount of some 10 Gbps and 1 Gbps and a handful of 40 Gbit/s.

    The Nexus family is very good when you want to consider a few 100 Gbit/s, but a significant amount of 10 Gbps.  NEXUS is also the way to go if you want to connect your Fibre Channel switch DC as Nexus will support 1, 2, 4 - and 8 Gbps FC.

    Nexus 7 K can support 100 Gbps (two per card online), 40 Gbps (six per card online) and of course 10 Gbit/s (up to 48 by card online).

    Very quickly, the will be some service modules that will be introduced for the Nexus 7 K.  They are WAAS, ASA and a NAM.

    There will be life with the 6500?  In some cases, Yes.  It is still is not clear if ALL the 6500 service modules will evolve into the Nexus.  In my view, the three modules, I have just mentioned is to "test" the waters.  Once the momentum has been achieved, the others could follow.

    There are rumours abound that there could be a possibility of Nexus 2 K which will support the PoE.

    Attached something for your perusal.

  • Info from data store based on the location of the data center

    Hello

    I wrote a powershell script to get the amount of free space available in the stores of data butthis is too high

    I need the information broken down according to the opinion of the 'data warehouses' with the virtual Center

    EG - my eyes record data centre as

    Teir 1

    X-x-x-x-x-x-x data warehouses

    Teir 2

    X-x-x-x-x-x-x-x data warehouses

    Teir 3

    X-x-x-x-x-x-x-x data warehouses

    Can someone please

    Altogether.  The problem has to do with the Canal works and references that you are trying to use the output the way.  There are several ways to handle this, and I think that it can do what you want.

    Get-Datacenter  |  Foreach-Object { $dc=$_; $dc | Get-Datastore | Select-Object @{name="DC Name"; expression={$dc.name}},Name,FreeSpaceMB,CapacityMB}
    
  • problem with the storage of the data in the table

    Hello

    I'm having the problem on the storage of data in the table. My problem is that whenever he makes a loop, the table just keep replacing them rather save to the next index. At 0, the value is 123, and 1 is 234. But I saw that all the data capture all crush to 0 until the last data see the 0. How can I fix this problem?


  • local storage in the data store

    I have 4 ESXi 5.5 cluster nodes (host1, 2... 5) + 3par storage, I noticed that the local drive of host2 is detected as a data store.

    When I create a VM and I choose the data store, I can see all data related to my on3par LUN stores but it seems this drive local host2 too!

    I would like to remove it! Can you offer me please?

    You must hide hide this data store using permissions, you must run the following procedure: Open-> inventory-> warehouses vSphere-> select the select data-> permissions VMFS store-> click the user or group in the list and set them to 'No access' - are not propagated.

    Once achieve you its judgment showing everywhere.

  • Shortcut to achieve VCDX virtualization in the data center.

    Friends,

    I would like to know to achieve VCDX can choose path below to avoid to submit the design VCDX defense.

    VCP5-VTC > VCAP5DCA > VCAP-CID > VCDX - data center virtualization.

    Who currently hold VCP5-VTC & VCP Cloud. VCAP5DCA inprogress... hope it will pass soon

    Any information will be greatly appreciated.

    Please notify.

    Thank you

    Knockaert

    Yes - actually if you want the VCDX Cloud you have to earn the VCAP-CIA and certification VCAP-CID before sit you for the VCDX defense according to the chart here - (VCDX-cloud) VMware Certified Design Expert-cloud.

    The other option is to pursue and get VCDX-VTC and when you pass the VCAP-CID cert, you will get the Cloud VCDX certification.

    I also move the VCDX forum

  • Rename the data center?

    Hello

    I would like to rename my datacenter. Is this possible without impact to the underlying Cluster, hosts, and virtual machines? I tried in my test environment without any problem, but first I'll do in production I want to be sure there are no known issues.

    The environment is:

    VSphere 5.1.0

    Data Center

    Cluster having about 22 hosts ESXi - 5.1.0 - 7997

    approximately 120 virtual machines.

    Thanks for your help!

    It will not affect your underlying infrastructure. You can go ahead and do it.

    It will create problems if you use the view.

  • Cannot add the NFS storage to the data device

    Hello

    I try to add the NFS storage unit of data.

    I followed the documentation, and when I ran the script supposed to mount/add NFS storage to the device, an error message indicating that the export is read-only, which is actually not the case:

    ./Mount-NFS-Store.pl nfs--servername.domain.com:/hzn-data-01

    NFS: servername.domain.com:/hzn-data-01

    HOST: servername.domain.com

    servername.domain.com is alive.

    Mount.NFS: deadline set for Fri Mar 8 21:33:13 2013

    Mount.NFS: try the options based on the text 'hard, rsize = 32768, wsize = 32768, intr, addr = 128.178.102.59'

    Mount.NFS: prog 100003, try around = 3, prot = 6

    Mount.NFS: try the port TCP XXX.XXX.XXX.XXX prog 100003 3 prot 2049

    Mount.NFS: prog 100005, try around = 3, prot = 17

    Mount.NFS: try XXX.XXX.XXX.XXX prog 100005 3 UDP port 1234 prot

    ServerName.domain.com:/HZN-Data-01 on/opt/zimbra/store10 type nfs (rw, sync, noatime, hard, rsize is 32768, wsize = 32768, intr)

    Error has occurred: directory does not exist or is not writable: / opt/zimbra/store10

    zmvolume failed at ligne./mount-nfs-store.pl 49.

    Of course, I tried to go to the mount point (in this case/opt/zimbra/store10) and quite capable of writing in it (touch, create the file + dir, etc...).

    The data device has root access to the NFS export. I have no idea about the cause of this error.

    Any clue?

    Thank you very much

    Eric

    In my view, that ashish ask you to run the following command, so that the folder is owned by the user «zimbra»

    chown-r zimbra:zimbra

  • Storage of the data in the format of the FED

    I am electrical engineering student works with a data acquisition system. I need to store the data in the format of the FED.

    Could someone help me with this?

    Thank you

    Kind regards!!!

    Thank you very much Oswald, is a lot of very interesting infotmation, help me

    Thanks for your time

    Kind regards!!!

  • storage of the data output of while loop

    Hello

    I have a data acquisition system set up to read the couple of a transducer. The output needs to be fed with an excel document, once the program stops running, or when a key is pressed.

    with the current code attached, the excel document is created, but it only shows the most recent series of data. How to make the table to store all the data coming from while loop?

    Ive only been programming with labview for two weeks, so chances are that it is something simple, but please help us in any case.

    JM

    To get what you expect, the Terminal output of table a while loop right click and select the option activate Indexing. Usually if you want to save data use queue to pass data inside the while loop to another loop/VI and perform data recording. For all that you have examples, please do a searc in LabVIEW help > find examples.

  • Confusion regarding the storage of the data

    B is a tablespace with two data files a and b, two data files have a space in it. Now I'm inserting n number of rows in table x located in B tablespace. Now the data inserted are saved in what data file?

    Response from Ed is generally correct, but you can control what data file by the other less attractive datafile for Oracle. The best way to do it, it's not any space left in the data file. You can also do strange things as a prerequisite to extend a datafile to have plenty of space with no auto-extend and have a smaller with little space, the function of automatic extension, with a maximum of the same size as the other data file. Oracle will use one with empty space first, as opposed to normally alternating with similar data files. In general, it is illogical to try to control things like that, even if it might if you have very different devices. I use the effect as a size warning - when the kid, we start to expand, I make it bigger and do another little (after the reduction of all the tables that can benefit from). YMMV.

    If you have a specific situation, test. Sometimes the results are unexpected and interesting.

    (Edited to clarify normality)

    Edited by: jgarry December 30, 2012 10:53

Maybe you are looking for