Script for the content data store

Hello

I'm new in the world of Vmware of scripts.

I used powercli and real working examples of scripts to find my way.

I am trying to create an inventory of the existing infrastructure of vmware.

I have a list of all the VMS and their data store, but I also need a data store content.

As:

a list of all the stores of data in a data center.

Download all the contents of the data store (folders, files vmdk, iso files, other files)

A list of all the folders / files with VMservers still known in the inventory.

The goal is to know if there are any files/VMservers on the data store, which are no longer in use and to check if we have duplicate in other data stores files

Thanks in advance for any assistance.

Best regards

Dany

Take a look at the data store provider

Try something like

dir vmstore: \-recurse

Tags: VMware

Similar Questions

  • Need to create a structure for the target data store?

    Hi Experts,

    If I create a structure for the target data store, and then load the data from source to target works fine. If I make mistakes.

    Is necessary to create a structure for target?

    Please help me...

    Thanks in advance.

    A.Kavya.

    I found the answer. No need to create the structure for target temporary data store. and we need to create the structure for the permanent target data store.

  • Not able to start agent cache for the requested data store

    Hello

    This is my first attempt in TimesTen. I am running TimesTen on the same host Linux (RHES 5.2) running Oracle 11 g R2. TimesTen version is:

    TimesTen Release 11.2.1.4.0


    Trying to create a simple cache.

    The DSN entry section for ttdemo1 to. odbc.ini is as follows:

    + [ttdemo1] +.
    Driver=/home/Oracle/TimesTen/TimesTen/lib/libtten.so
    Data store = / work/oracle/TimesTen_store/ttdemo1
    PermSize = 128
    TempSize = 128
    UID = hr
    OracleId = MYDB
    DatabaseCharacterSet = WE8MSWIN1252
    ConnectionCharacterSet = WE8MSWIN1252

    With the help of ttisql I connect

    Command > Connect "dsn = ttdemo1; pwd = oracle; oraclepwd = oracle;
    Successful login: DSN = ttdemo1; UID = hr; DataStore = / work/oracle/TimesTen_store/ttdemo1; DatabaseCharacterSet = WE8MSWIN1252; ConnectionCharacterSet=WE8MSWIN1252;DRIVER=/home/oracle/TimesTen/timesten/lib/libtten.so;OracleId=MYDB; PermSize = 128; TempSize = 128; TypeMode = 0; OracleNetServiceName = MYDB;
    (Default AutoCommit = 1).
    Command > call ttcacheuidpwdset ('ttsys', 'oracle');
    Command > call ttcachestart;
    * 10024: could not start agent cache for the requested data store. Could not initialize Handle.* Oracle environment
    The command failed.

    The following text appears in the tterrors.log:

    15:41:21.82 Err: ORA: 9143: ora-9143 - 1252549744-xxagent03356: database: TTDEMO1 OCIEnvCreate failed. Return - 1 code
    15:41:21.82 Err: 7140: oraagent says it failed to start: could not initialize manage Oracle environment.
    15:41:22.36 Err: 7140: TT14004: failed to create the demon TimesTen: couldn't reproduce oraagent for "/ work/oracle/TimesTen_store/ttdemo1 ': has not been initialized Handl Oracle environment

    What are the reasons that the demon cannot happen again to another agent? FYI, the environment variables are defined as:

    ORA_NLS33=/U01/app/Oracle/product/11.2.0/Db_1/ocommon/NLS/Admin/data
    ANT_HOME = / home/oracle/TimesTen/ttdemo1/3rdparty/ant
    CLASSPATH=/home/oracle/TimesTen/ttdemo1/lib/ttjdbc5.jar:/home/oracle/TimesTen/ttdemo1/lib/orai18n.jar:/home/oracle/TimesTen/ttdemo1/lib/timestenjmsxla.jar:/home/oracle/TimesTen/ttdemo1/3rdparty/jms1.1/lib/jms.jar:.
    Oracle@rhes5:/Home/Oracle/TimesTen/ttdemo1/info% echo $LD_LIBRARY_PATH
    /home/oracle/TimesTen/ttdemo1/lib:/home/oracle/TimesTen/ttdemo1/ttoracle_home/instantclient_11_1:/u01/app/oracle/product/11.2.0/db_1/lib:/u01/app/oracle/product/11.2.0/db_1/network/lib:/lib:/usr/lib:/usr/ucblib:/usr/local/lib


    See you soon

    I see no problem here. The ENOENTs are superfluous because it locates libtten here:

    23302 open ("/ home/oracle/TimesTen/11.2.1.4.0/TimesTen/ttimdb1/lib/libtten.so", O_RDONLY) = 3

    without doubt, it does the same thing trying to find the libttco.so?

    23302 open ("/ home/oracle/TimesTen/11.2.1.4.0/TimesTen/ttimdb1/ttoracle_home/instantclient_11_1/libttco.so", O_RDONLY) =-1 ENOENT (no such file or directory)

    Thank you for taking the trace. I really want to have a look at the complete file if you can send it to me?

  • How to migrate Office persistent link clones of workstations for the new data store

    Hello. We have clones of persistent link to view running in the environment from our view. We need to migrate these desktops to new storage. Rebalancing is out as this will include a refresh operation - destroy anything and everything installed in c:\ of the user. Is there a method to migrate Desktop clone link persistent to a new data store, while keeping the office in the same exact state (i.e. c:\ is not updated).

    Thank you

    Never say impossible. I came across the solution when I read the article by Duncan Epping:

    http://www.yellow-bricks.com/2012/03/15/Dr-of-view-persistent-linked-clone-desktops/

    I have that for my situation. Basically, replicate data from view in the new storage warehouses. Set up data warehouses replicated without re-signing with the cluster of ESXi. Turn the power off and unsubscribe the vCenter view workstations. Save the workstations from the data store replicated/mounted to vCenter and power over desktop computers.

    VCenter, nothing dramatic has happened if she sees just as vm being unregistered and re-recorded activity from the same exact data store (the same UUID). View Admin is happy because he sees just the events as desktop computers that have been turned off and then subsequently in reverse. Nothing has changed regarding the database to view ADAM, we still use the same data warehouses.

    I have already tested before for a scenario of View DR, and he succeeded. Between remembering who and Duncan's article helped me to adapt the same process for this. Nothing is impossible

  • Script for the current date

    I have a javascript document that worked. It prints the current date to the first opening the PDF file in a field called today. Subsequently, the date does not change no matter how many times the PDF file is opened.

    var f = this.getField ("Today");
    If (f.value == ' ') f.value = util.printd ("mm/dd/yyyy", new Date());

    I'm using Acrobat 9 Pro and for some reason this script no longer works in version 9. If someone can help fix this sript, I would be very happy.

    It works fine for me in Acrobat 9.2.0 (under Windows 7). If the field is empty when the form opens, it inserts the current date. If the field is not empty, it does nothing.

    You are absolutely sure that the field 'Today' is empty when you open the PDF file?

  • DTS moves to the same data store

    Greetings,

    We are short v5.5u1 esxi and vcenter device with DTS clusters installation using thresholds to space only at this time. We do not limit our VM to place records on the same data and store, and in view of the virtual machine can have his records scattered across data warehouses in a cluster of the DS.

    We have many events that seem to do nothing is represented below.  Everyone agrees that something actually happens or vcenter turns his wheels?

    Thank you

    Ron

    Just answered my own question... it has to do with my scattered placement of vmdk. Since the vmx file lives on a given data store, the event shows that the activity... However if you check the DTS tab for the cluster data store you will find the disks associated with the virtual machine on other data warehouses were actually moved.

  • Shrink a VM HD - is the destination data store need to have enough space for the source or destination VM?

    Hi all

    I have an existing file with HD Server configures:

    HD1: 60 GB

    HD2: 20 GB

    HD3: 650 GB

    Total: 730 GB

    I intend to shrink HD3 250 GB that will give me a new total of 330 GB.

    My question is, when I rode the VMware Converter Standalone process and I get to the step where I select the 'destination '.  Obviously, I need to select a data store that can adapt to the virtual destination machine.

    My concern is that it shows the size of the source disk (Go 730) (see image below), and for some reason any part of the conversion process the destination data store requires the storage of the size of 330 GB vm 730GB as opposed to the 'new '.

    source disk size.PNG

    Can anyone confirm?

    Thank you

    There are no for the data store 730 GB free in order to submit the conversion. 330 GB free (size after reduction) would be sufficient.

    If you also select a provisioning, you could even start the conversion with less free space on the data store, but it may fail at some point, if the actual data meet.

  • about the scripts for AWR report data!

    Hi all.


    The oracle's 10 g 2.

    I would like to extract the following data by issuing a query, and not by AWR report.

    ----------------------------------------------------------------------------------------------
    1 load of overall profile cache
    ~~

    2. global Cache efficiency percentages (target local + remote100%)

    Access - local cache buffer %: 99.91
    Access - remote cache buffer %: 0.07
    Access - disk buffer %: 0.02


    3. global Cache and messaging statistics - Enqueue Services
    ~~

    ----------------------------------------------------------------------------------------------

    What is the data dictionary (DBA_HIST tables *) for the above data?

    You will be greatly appreciated if you give me an example of a query for them.

    Thanks in advance.
    Best regards.

    You can get the SQL code of sprepins.sql in $ORACLE_HOME/rdbms/admin

    Concerning
    Vincent

  • Unable to read / write in the NFS data store

    Hi all
    I'm having a problem with a NFS datastore in Vcenter. I have an NFS share on a Win2k3 server which I am able to mount. However... I can't write him even though the permissions appear to be correct.  This server is connected to an array of training Vault EVA Storage with 2 TB of storage.
    Looks like he's not more as when I try to mount ad content, it shows as 0.00 B ability... and I know that there are files in the NFS data store. Same Host, I can mount my other NFS datastore successfully since a 2008 Server, just do not know which cannot be configured correctly here.

    Help, please... been at this for 2 days banging my head on my desk!

    Screenshots are attached. If there are log files that I could post that would help, please let me know and I'll join them as well.
    Thank you!

    Woot! It worked. I changed the local article, but then authorized security strategy anonymous access with the 2 GID and UID - 2. Once this is done, it is now properly show in Vcenter and allow me to read and write in the data store. Before that I got the value 0.0 even with security policy, change that did not work. So I hope that this issue helps someone in the future, and they do not have a hair pulling experience like I did.

    WHAT A PAIN!

    in any case, thank you all for your time.

  • Cloning of VM/TIME to the different data store

    Hi all

    I am working out scripts excellent clone of Ruben garcia and one thing I'm trying to add is to have the VAPP created on a different data store.

    # Clone and move virtual machines
    {foreach ($vm to $vms)
    $vm = $vm | Get-opinion
    $vmname = $cloneName + "»" + $vm.name "
    . \LcloneVM $vm.name - cloneName '$vmname' - «$PortGroup» PortGroup
    Get-vm-name $vmname | Move-vm-destination $vapp;
    The virtual machine are getting cloned and then inserted in the passed TIME as a parameter name, but I can't understand how do to have the VAPP will be created on a data store that I specify. At this time the vApp is created on the same data store where the linked clones. Can I travel after from the user interface by using the migrate command but I want if possible to automate it.
    I thought that the next line should work but the VAPP fails when creating, so the move-vm command fails later.
    # Create VAPP
    $vapp = $host_name | VAPP-new-name "$cloneName" - data store "ThinDiskTesting"

    I am at a loss to what im doing wrong

    Post edited by: BrianRTS - difficulty of setting in the form

    You can specify the data store where you want to create linked clone delta files.

    This requires a slight modification to the script of Ruben

    # Generate specs for clone
    $cloneSpec = new-object Vmware.Vim.VirtualMachineCloneSpec $cloneSpec.Snapshot = $sourceVM.Snapshot.CurrentSnapshot $cloneSpec.Location = new-object Vmware.Vim.VirtualMachineRelocateSpec $cloneSpec.Location.DiskMoveType = [Vmware.Vim.VirtualMachineRelocateDiskMoveOptions]::createNewChildDiskBacking $cloneSpec.Location.Datastore = (Get-Datastore -Name $tgtDatastoreName).ExtensionData.MoRef
    

    Ownership of the data store is used to indicate where the clone should be placed.

    Or you want to create the clones, then move them?

  • Good way to use the concurrent data store

    Hello

    I'm developing a multithreaded C++ application that uses the C++ of Berkeley DB Library.

    In my case, I have several databases that I composed in a wooded area. It is important for me to use an environment because I need control over the cachesize parameter.

    I don't need no guarantee of transaction and have for most of the readings, so I decided to use the "simultaneous database.

    I first pre-fill all databases with a number of entries (configuration single-threaded phase) and then work on it at the same time (for most readings, but also insertions and deletions).

    I tried all kinds of different configurations, but I can't work without specifying DB_THREAD as a flag of the environment.

    I don't want to because then access all handles is synchronized sequentially according to the documentation:

    "... Note that the activation of this indicator will serialize calls to DB using the handle between the threads. If

    simultaneous scaling is important for your application, we recommend handles separate for each thread opening

    (and do not specify this indicator), rather than share handles between threads. "

    (Berkeley DB QAnywhere C++)

    So I tried to open the environment with the following indicators:

    DB_CREATE | DB_PRIVATE | DB_INIT_MPOOL | DB_INIT_CDB

    All data in this environment handles are open only with the DB_CREATE flag.

    So, since my understanding this same basic access handles need to be synchronized, I opened separate handles foreach database for each thread (opening the handles is still single-threaded).

    In my first approach, I have only made use of the object of global environment. Which does not work and gives the following during operations error message:

    DB_LOCK-> lock_put: Lock is no longer valid

    So I thought, since the same handle global env is passed to all handles separate DB, it is perhaps a race condition critical on the handful of approx.

    So in my next test, I opened also handles separate EPS in each thread (and db handles owned each).

    That does not produce an error in db, but now it seems that each thread sees its own version of the databases (I call it stat early in the life of each thread and he sees all of the empty dbs).

    What is the right way to use the concurrent data store? Each thread should really open his own set of db handles? What about the number of open handles env?

    PS: Without specifying that the DB_PRIVATE flag seems to do the job, but for performance reasons, I want all operations to perform in the cache and do not specify product DB_PRIVATE average of several writes to the disk for my scenario.

    Thanks a lot for your help.

    CD (simultaneous database) allows a single editor with multiple drives, access to the db at a given point in time.    The handle for the writer doesn't have to be shared with readers.   If you share the DB handle then calls are synchronized, but if each thread has its own handle DB then this is not the case.     Since you have an environment, DB_THREAD must be at the level of the environment.   This will allow the sharing of the environment handle.     This type of error "DB_LOCK-> lock_put: Lock is no longer valid" you can provide us your code so we can take a look.   Also what BDB version are you using?

  • remove the Cluster data store data store

    I have an infrastructure with vCenter and ESXi 4 5.5 I have a data cluster store in SAN with 8 Mon, I need to remove 3 Lun (to be used for other purposes) what is the appropriate procedure

    to remove the Lun (end then to destroy)? Thank you

    Do you want the LUN to use for purpose of non-vSphere? If so, you can just storage vMotion virtual machines since associated LUN data warehouses that you want to decommission (or simply putting the data store in maintenance mode, in this way, that the virtual machines will automatically be migrated). Cleaning after the data store, move the data store from the cluster data store, and then delete the VMware environment data store as described here: best practices: how to properly remove a unit number logic of a host ESX - VMware vSphere Blog - VMware Blogs

  • Extremely high latency during the migration of the local data store to data store shared.

    Hi guys I hope you help me. Sorry for my English btw, I'm not native.

    Let's start!

    I have:

    1 vCenter
    1 host
    1 Distributed Switch (with a pg for managing network/IPstorage the esxi)
    1 standard switch (empty)
    1 FreeNAS to provide iSCSI LUNS
    1 Microsoft to provide iSCSI LUNS

    When I try to migrate virtual machines between the warehouses of shared data or data shared at local store, all right. The problem has become when I try to migrate virtual machines from the local to the shared data store. All data stores down (all paths down) and back up and I get this error:

    "Error caused by the /vmfs/volumes/volumenID/VMDirectory/Disk.vmdk file.


    When I try to migrate virtual machines from the local to the FreeNAS iSCSI data store it fails immediately.
    When I do the same local Microsoft iSCSI datastore that it takes a time loooooong to migrate the virtual computer, give it to me even all the paths downwards and uplinks down error but not lacking in migration.

    I'll give you some screenshots to see the errors.

    Thank you very much!

    EDIT: I have extremely high latency notice when I try to migrate from the premises of warehouses of shared data. average 2000ms with peaks of 50,000 (see my response below for more information)

    Finally, I found the solution! The problem is that I have been using E1000E vmnic instead of vmxnet3. I have configured an adapter vmxnet3 and boom! 20 ms in all migration!

    Thank you to all for help, especially Nick_Andreev !

  • Deployment uses the local data store

    The deployment of VIO works without problem, but one of the virtual machines (VIO-DB-0) is now in a local data store. I never chose this data store in the installation process.

    Is it possible to manually move the virtual machine? Is it possible to define the data store used for the management of virtual machines somewhere?

    Concerning

    Daniel

    Hi Daniel,.

    Take a look at VMware integrated OpenStack 1.0 Release Notes:

    • Installer gives priority to local storage by default
      When you set up the data for the database stores three virtual machines, VMware OpenStack Setup integrated automatically gives priority to a local storage to improve IO performance. For resilience, users might prefer a shared storage, but the installer does not clear how to change this setting.
    • Workaround: Before completing the installation process, the installer of VMware OpenStack integrated allows you to examine and change the configuration. You can use this opportunity to change the configuration of the data to the database store three virtual machines.

    If you have already installed VIO, AFAIR you should be able to manually move between data warehouses as long as you do not change VM itself.

    Note that there is rule anti-affinite, so you may not be able to move that VM in the same data store when no other VIO - DB resides.

    Another note is that if you turn off VIO-DB-0, mysql service will not appear automatically. you have to turn on manually by running "service mysql start" on the node itself, or run 'vioconfig start' of the SGD server.

    Best regards

    Karol

  • Disk groups are not visible cluster. vSAN datastore exists. 2 guests (on 8) cluster do not see the vSAN data store. Their storage is not recognized.

    http://i.imgur.com/pqAXtFl.PNG

    http://i.imgur.com/BnztaDD.PNG

    Do not know how even tear it down and rebuild it if the disk groups are not visible. The discs are in good health on each host storage adapters.

    Currently the latest version of vCenter 5.5. Hosts running 5.5 build 2068190

    Just built. Happy to demolish and rebuild. Just do not know why it is not visible on the two hosts and the disk groups are only recognized 3 guests when more are contributing. Also strange that I can't get the disk groups to fill in vCenter. I tried two different browsers (chrome and IE).

    I have now works.

    All the identical 5.5 relies on ESXi hosts. All hosts are homogeneous CPU/sum of the prospects for disk controller / installed RAM/storage.

    I have work. I had to manually destroy all traces of the vSAN on each single to help host node:

    (1) put the hosts in maintenance mode and remove the cluster. I was unable to disable vSAN in the cluster, I made on each node host (manually via the CLI below) then disconnected web client vCenter and return to finally refresh the ability to disable on the cluster.

    esxcli vsan cluster get - to check the status of each host.

    esxcli vsan cluster drop - the vSAN cluster host.

    storage of vsan esxcli list - view records in the individual host group

    esxcli vsan storage remove-d naa.id_of_magnetic_disks_here - to remove each of the disks in the disk group (you can ignore this using the following command to remove the SSD only falling each disc in this host group).

    esxcli vsan storage remove s naa.id_of_solid_state_disks_here - this is the SSD and all the magnetic disks in a given disk group.

    After that, I was able to manually add hosts to the cluster, leave maintenance mode and configure the disk groups. Aggregated data of the vSAN data store is correct now, and everything is functional.

    Another question for those of you who still read... How to configure such as the VM storage strategy that migrates towards (or inspired) the vSAN data store will immediately resume the default storage policy, I built for VSANs?

    Thanks for anyone who has followed.

Maybe you are looking for

  • Bluetooth and satellite M100

    Hello I have a Satellite M100 and I think that it supports Bluetooth, but so far, I could not use it or even locate. The only indication I have is that there is in ' Add/Remove Programs 'category' Bluetooth stack ".» Except that I couldn't use it and

  • Satellite L670-1HD - problem with audio interfaces USB 1.1

    Hello I have a Toshiba L670-1HD with an Intel HM55 chipset, and an Intel Core i5 460M processor. I use this machine for my music software and that's why I use different audio interfaces external and USB-MIDI-Controller with build in audio interface l

  • HP 6510 printer wireless not recognized by the computer

    Original title: HP 6510 wireless printer not recognized by the computer.  Works well before today.  Printer says ity online Our HP computer does not find the printer wireless above.  We made the updated IP address, which is correct, have restarted th

  • scam?-j' was called by a company that said I had a problem with my computer

    I was called by the company who said that I had a computer problem and that it was Windows and wanted to give me access to my computer for them to solve the problem, they wanted to log into www.logmein123.com is this true or a scam

  • A library of Winamp can be imported to the MS Media Player?

    I am a novice to this... I want to trash Winamp and switch to MS Media Player. How can I keep the music currently on Winamp?