Get-datastore shows each store data twice

Hi Admins,

I try to move the virtual machines in another data store using powershell.

Move-vm servername - datastore iSCSI-vmfs04

Error message: Move-VM of the specified parameter "Datastore" expects a single value, but your criteria "iscsi-vmfs04" name matches several
values.

If I run get-data warehouses, it returns:

iSCSI-vmfs04

iSCSI-vmfs04

iSCSI-vmfs05

iSCSI-vmfs05

iSCSI-vmfs06

iSCSI-vmfs06

Is my pathpolicy the problem? using RoundRobin.

Storage vmotion works fine if I use the GUI vCenter.

Advice?

See you soon,.

Tyler

You have noticed that free space is not exactly the same for the two lines of the same data store.

Perhaps you have warehouses of data Ghost in your vCenter.

Tags: VMware

Similar Questions

  • How to get more space to store data

    Hello

    I am newbie to ESXi 4.1. Recently I setup an ESXi 4.1 with the data store total 267 GB (146GBx3, RAID5), created 1 Win2008 Std 64 bit thick provisioned VM size 180 GB of disk & partition as C:\80GB, D:\100GB under Win2008, currently only 20,57 GB free data store space.

    (1) I try to create an another VM Win2008 standard 64-bit using typical/custom but max only allow 40 GB, how to get about 100 GB? (C:\60GB, D:\40GB)

    2) can I change existing VM thick to thin to follow steps of http://www.righteoushack.net/?p=419? what a C:\80GB, D:\100GB under Win2008? would it automatically resize so? or can I reduce existing 180 provided thick GB?

    (3) why there are 3 hard files created for a single virtual machine? how hard to remove? (see photo datastore.jpg)

    (4) as the system comes with Quard core 6 GB RAM & CPU, existing VM use 2 CPU4 GB of RAM, can I put a new virtual machine to use 2CPU4 GB RAM?

    Sorry, so many questions.

    Thank you and best regards,

    Kelvin

    Welcome to the VMware forums communities.  Your message has been moved to the forum of the Virtual Machine and the guest operating system.

    Dave

    VMware communities user moderator

    Now available - vSphere Quick Start Guide

    You have a system or a PCI with VMDirectPath?  Submit your specifications to Officieux VMDirectPath HCL.

  • 2 ESXi hosts... Nor can see each stores data to other hosts

    All, morning

    I have a little problem with a cluster of 2 servers ESXi 4.1.  They are connected to a VC and Enterprise Plus license.

    We have about 15 stores of data, called san01, san02,... san15.  ESXi hosts, we'll call it ESXi-01 an ESXi-02.  As I said - they are in an active HA with DRS cluster.  They are part of a disaster recovery test, we are performing.  For some reason, only the host on which each data store has been added (add storage, select LUNS, use the existing signature) can use this store.  It does not appear when a new analysis VMFS on another host (or automatically as it should).  If you try to import the same LUN to host opposed when it is already mapped to the one, the only available option is to reformat the partition, which is not good as there are a several machines on each Lun.

    So now I have a host with san2, 3, 5, 7 & 9 and all the others are on the other host.  Of course, they are unable to balance the load using vMotion & DRS.  It makes me crazy - any suggestions please?

    Just FYI, the hosts are the IBM HS22 blade, cards QLogic FC and the SAN is a unit of IBM XIV.  In our main site (live), we have a XIV with all LUNS alive and running on a cluster of 12 ESX4 host.  The data is replicated on the XIV in our disaster recovery site using the iSCSI Protocol and the links were broken between the 2 sites at the beginning of the excersise, allowing data replicated to our Dr site must be set to read/write and connected to hosts via FC.  Both hosts use the same configuration as the other and have the same drive mappings to the SAN.

    Look forward to hearing your ideas!

    Dave.

    As I understand it, the issue could be caused by the LUNS being recognized as LUN snapshot (see the ESXi host logs)

    In this case, you could try to force mount the LUNS. See http://kb.vmware.com/kb/1011387

    André

  • Store data and LUN id

    Hello

    I have a strange problem with my storage.

    I don't see the data store which is mounted on my ESXi. esxcfg-scsidevs - m also doest show LUN/store data.

    but when I see with esxcfg-mpath - l. I can see that lun. In addition, San, I see that it is mounted.

    If I see on VC under devices I can find the logical unit number id, but I do not see this LUN in the data store.

    can someone guide me here, how I can find this data store.

    The following KBs will help you

    VMware KB: Recovery of a lost on a VMFS volume partition table

    VMware KB: Re-create a missing partition of VMFS datastore in VMware vSphere 5.0/5.1/5.5

    Delete/recreate the partition tables does not affect the data but at any time if you feel that you need help to recover the lost partition table, connect a business with VMware Support and request their assistance.

    All the best!

    -f10

  • How do you get the path of the data store or the URL of a virtual disk in vRealize Orchestrator?

    I need to eager zero a virtual disk while building a virtual machine. I found the eagerZeroVirtualDisk_Task() under VcVirtualDiskManager function, which takes in 2 parameters:

    name - (String) the name of the disk, is a path to the data store or a URL pointing to the virtual disk that needs to be inflated.

    Data Center - (VcDatacenter) if the name is a path of data store, the data center for the path of the data store. Not necessary when called directly on ESX. If not specified on a call to VirtualCenter, the name must be a URL.

    How can I get the correct path of data store given the virtual disk? I intend to iterate through the features of the virtual machine to get the disks.

    Thank you!

    Actually figured out how to get the path of the data store, and how a drive zeros. In case it is useful to share the code here:

    var vimHost = vm.vimHost; VM instanceof VCVirtualMachine

    var vDiskMgr = vimHost.virtualDiskManager;

    for each disk

    var features = vm.config.hardware.device;

    for each {(dev var in devices)

    dev.backing contains a lot of useful things...

    If (dev instanceof VcVirtualDisk) {}

    a disc!

    var dsPath = dev.backing.fileName;

    System.log ("path of disk:" + dsPath);

    Data var Center =

    System.getModule('com.vmware.library.vc.datastore').getDatacenterForDatastore (dev.backing.datastore);

    var vcTask = vDiskMgr.eagerZeroVirtualDisk_Task (dsPath, datacenter);

    wait

    var waitResult =

    System.getModule('com.vmware.library.vc.basic').vim3WaitTaskEnd (vcTask, true, 5);

    }

    }

  • AT100 - impossible to get my calendar to store the dates of the annual events

    Hello.

    Cannot get my calendar to store the dates of the annual events birthdays for example.
    Option gives (annual 27 July 2012), but would it be fair (27 July each year). No way to remove year so presumably won't wait that 2012 will come along! All the other choices for weekly and monthly do not specify the year.

    Annual option should I think be the same. Tried to enter next year, but comes with (year July 27, 2013) so it looks that have to enter every year which is a pain. Someone at - it ideas.

    It's my first post he hopes in the right place.

    Thank you

    Hello

    Why you n t try another Android app like for example calendar of birthday or anniversary Assistant

  • Get the disc on a data store

    Hello

    I have the following script

    Get-Datastore "*sata)" | Get-VM | Get-VMGuest |  Where { $_.Disks } | select -ExpandProperty Disks VMName
    


    the output is

    VmName Path Capacity FreeSpace
    VM1C:\128807526404642414592
    VM1D:\322183864324818952192
    VM2C:\128807526404642414592

    I'm looking for is an output like

    VmName Path Data store
    VM1C:\Bank 1 (sata)
    VM1D:\3 (sata)
    VM2C:\Bank 1 (sata)

    Can someone help me with this?

    Kind regards.

    SaPu

    It is not so simple.

    The drive letter is related to the partition you set inside the guest OS.

    For example, you can create 2 or more partitions on the virtual disk 1.

    There is an excellent script that does this, which also appeared in our book, and you can find it here.

    The function is called Get-VMDiskMapping.

  • output of Get-store data in the table (datagrid)

    Hello

    I'm trying to get the output of get-store data in a table (datagrid).

    Code:

    Function Get-data warehouses
    {
    $array = new System.Collections.ArrayList object
    $Script: GetDatastore = Get-Datastore
    $array. AddRange ($GetDatastore)
    $dataGrid1.DataSource = $array
    $form1.refresh)
    }

    error:

    Das Argument '0' mit dem Wert "local_datastore01" as "AddRange' nicht den Typ"System.Collections.ICollection"konvertiert werden kann:" Der Wert "local_datastore01" vom Typ VMware.VimAutomation.Cl «»»
    ient20. DatastoreImpl' nicht den Typ "System.Collections.ICollection" konvertiert werden kann. »
    -snip-
    + $array. AddRange < < < < ($GetDatastore)
    + CategoryInfo: NotSpecified: (:)) [], MethodException)
    + FullyQualifiedErrorId: MethodArgumentConversionInvalidCastArgument

    Comment:

    If I replace the query data get store-get - VM the script works great!

    What's wrong? any suggestions?

    Many thanks and greetings

    Hello

    This particular Get-Datastore call returns a single object, which cannot be converted to the ICollection. But you can do something like this:

    If ($GetDatastore-[table]) {}

    $array. AddRange ($GetDatastore)

    } else {}

    $array. Add ($GetDatastore)

    }

    It will manage both situations - when you get the data object store or table of data warehouses.

    Vitali

    Team PowerCLI

  • When I try to use the Windows Update link for my XP computer I get a message indicating that the location where the Windows Update stores data has changed and it needs to be repaired. How can I solve this problem?

    When I try to use the Windows Update link for my XP computer and after using Windows Mr. Fix - It, I get a message indicating that the location where the Windows Update stores data has changed and must be repaired. How can I solve this problem?

    I'm not that computer literate and do not understand what needs to be fixed.

    This problem just started a few weeks when I noticed that I had any recent download automatic update that I regularly get. So I tried to do it manually through access via my control panel.

    I use ESET Antivirus Node32 software.

    Hello

    1. What is the error message or an exact error code?

    2 have you made changes on the computer before this problem?

    3. you try to check the updates?

    I would suggest trying the following methods and check if it helps.

    Method 1:

    Reset Windows Update components and then try to download the updates.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Warning: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://support.microsoft.com/kb/322756

     

    Method 2:

    File system scan tool checker and then try to press Ctrl + Alt + Delete and check.

    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe):

    http://support.Microsoft.com/kb/310747

    Please respond with more information so that we could help you more.

  • How to set vm-description/notes and get the name of the data store, where the virtual machine

    Hello guys,.
    I have vCenter Orchestrator 4.1.1 build 733 installed and it works fine, but I need your help for the following two issues:
    (1) I want to put the description/notes of a virtual machine using a workflow. But I have not found any API useful to create this workflow (I don't want custom attributes, see attachment for details).

    (2) how can I get the name of the data store, where the virtual machine? I need this name for a workflow.
    I need your help.
    Thanks in advance!

    With regard to the notes of the VM, the following code (see enclosed package) can do this:

    var oldNotes = vm.summary.config.annotation;
    If (oldNotes == null) {oldNotes = ' ' ;}}
    System.log ("Notes of VM current:" + oldNotes);
    Now put the new notes:
    Start by creating a context
    Context of var = new VcVirtualMachineConfigSpec();
    Update the annotation with the new value property
    configSpec.annotation = notes;
    launch the task to reconfigure the virtual machine with the new context
    NOTE: This is sure to apply with a virtual machine under tension
    var task = vm.reconfigVM_Task (configSpec);

    And, in what concerns the VM information, take a look at the workflow of the library: \Library\vCenter\Virtual Machine management\Others\Extract virtual machine information

  • How to get LASTDAY for each month between data dates...

    Hi friend

    I have a doubt, how to get LASTDAY for each month between data dates...

    for ex:
    My contribution will be like this
    date = 01/12/2011
    To date = 14/04/2011

    And I need an output like
    31/01/2011
    28/02/2011
    31/03/2011

    is it possible to achieve through sql query in oracle
    Thanks in advance for all friends to help him

    Hello

    Something like this (assuming that the dates are originally VARCHAR2s):

    SQL> var dt_start varchar2(10)
    SQL> var dt_end varchar2(10)
    SQL> exec :dt_start := '12-01-2011'
    
    PL/SQL procedure successfully completed
    
    SQL> exec :dt_end := '14-04-2011'
    
    PL/SQL procedure successfully completed
    
    SQL>
    SQL> select last_day(
      2           add_months(
      3             trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM'),
      4             level-1
      5           )
      6         ) as result
      7  from dual
      8  connect by level <= months_between(to_date(:dt_end,'DD-MM-YYYY'), to_date(:dt_start,'DD-MM-YYYY'))
      9  ;
    
    RESULT
    -----------
    31/01/2011
    28/02/2011
    31/03/2011
     
    

    If the dates are already of the date data type, simply remove the to_date function.

  • get guests basic stats and data warehouses

    Hi all

    I am totally new to vcenter and power shell, so please, be gentle on my stupid questions. I'm desperate to compile a script to get the weekly statistics for host, County of vcpu and data store memory space and export it to a csv file. Numbers so very basic for each host computer and the data store. Here's what I have so far based on blogs of the LucD generous. It would be great if someone of you can help me realize what is wrong...

    It took a lot of time for me to understand what are the parameters I need and I'm sure that they are correct, but the syntax is killing me now. Basically, I realize there is something wrong with my variables since nothing is exported to the file you want, but I do not know how to define variables and their attributes. And the error was "impossible to replace the host variable because it is read-only or constant", while other properties such as "name", "mem", etc.

    SE connect-VIServer-server xxx.com - user password xxx-xxxx

    $allhosts = @)

    $hosts = get-VMHost

    $allds = @)

    $datastores = get-DataStore

    {foreach ($vmHost in $hosts)

    $host = "" | Select 'name', 'mem', 'vcpu '.

    $$host.name = $vmHost.Name

    $host.mem = get-Stat-entity ($vmHost) - start (Get-Date). AddDays(-1)-Finish (Get-Date) - MaxSamples 1 - Stat "mem.consumed.average" |  Select - ExpandProperty value

    $host.vcpu = get-VM-location ($vmHost). Where-Object {$_.} PowerState - eq "Receptor"} | Measure-object-property NumCpu-sum |  Select - ExpandProperty sum

    $allhosts += $host

    }

    $allhosts | Export-csv - NoTypeInformation C:\host.csv

    foreach ($dataStore to $datastores |) Where-Object {$_ .name - like "xxxx *"}) {}

    $dsName = $dataStore.Name

    $provspace = get-Stat-entity ($dataStore) - start (Get-Date-time Minute 9 - 0-0 second) - Finish (Get-Date-time-Minute 10 - second 0-0) - IntervalSecs 30000 - Instance "-disk.provisioned.latest stat. Select - ExpandProperty value

    $freespace = $datastores | Select-Object Name, FreeSpaceGB

    }

    $allds | Select DataStorename, provspace, freespace | Export-csv - NoTypeInformation C:\datastore.csv

    Thank you in advance!

    -LX

    Unfortunately, you chose a PowerShell reserved name for the name of the variable.

    The $host variable is not allowed.

    Choose another name and the script should be ok

  • Ability to store data

    Hello

    Someone at - it a script that reports on the ability to store data, as indicated on the Summary tab?

    I have seen some using Get-View - ViewType Datastore but math similar enough to what I see in vCenter.

    Is it possible to have a condition if the Provioned is in the UK to show GB and if TB TB?

    Thank you

    Hello, AGFlora-

    There are various functions related to the format of the unit there.  You can use this function to format the numbers given in the appropriate units you do the math with the properties of the data warehouses that you recover.

    For example, consider the post friendly units by LucD wherein it has a nice feature for different types of units and examples of how to use the function.  Whatever help you?

  • Get-datastore

    I use the cmdlet get-data store to fill in a field in a billing report. We charge for storage based on the type of storage, it looks like this.

    $row. DatastoreName = get-datastore - vm $_. foreach {if($_.) Name - match "sata") {echo "Tier3" ;} else {echo 'Level 2' ;}}}

    My problem occurred only recently because I added a few clusters of microsoft to the environment and the second node of each has several data stores listed. What makes my statement foreach explode. Is it possible to use the command get-datastore to only return a value?

    Thank you

    Yes, but you must choose the one that he would get...

    you could do the premiera

    Get-datastore. Select-object - 1 first

    or at random

    Get-datastore. get-random

    or based on some type of filter

    Get-datastore. WHERE-object {$_.freespace - gt '5'}

    It could still return several data stores based on the filter you use...

    How do you choose just one?

  • After reformatting and installation, activation, I get a message that I don't have a valid copy of XP. Get errors from each Web site for certificate errors. Any ideas?

    Validation problem

    After reformatting and installation, activation, I get a message that I don't have a valid copy of XP.  Get errors from each Web site for certificate errors.  Any ideas?

    I think I found that the time and date on the pc was showing Jan of 2002.  Seems to be loading of updates now!  I hope that this will solve.

Maybe you are looking for