Move drive VM to a to another data store

Hi guys,.

In my environment, we divided the data banks on two virtual machines. I'm migrating all the drives in a data store to another by using the following code.

$HD = get-hard drive - data store "f2as01_nfs_hoss01".

{foreach ($i in $HD)

Moving-hard drive - disk hard $i Datastore-"f1aa01_nfs_hoss01" - confirm: $false

}

However, I get the following error:

Moving-hard drive: 26/03/2014 12:53:40 hard drive Move the specified parameter "Datastore" expects a single value, but your criteria of name "f1aa01_nfs_hoss01" corresponds to multiple values.
C:\Users\grantg\AppData\Local\Temp\5eed2c4f-a0e2-4a09-8855-1efcf58fbc90.ps1:7 tank: 14
{+ Hard drive move < < < <-disk hard - $i "f1aa01_nfs_hoss01" data store - confirm: $false}
+ CategoryInfo: InvalidResult: ([System.Collecti, dObjectInterop]:'1 List) [Move-hard drive], VimException
+ FullyQualifiedErrorId: Core_ObnSelector_SelectObjectByNameCore_MoreResultsThanExpected, VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.MoveHardDisk

I know PS don't like spaces, but could there be a problem with underscores too?

Concerning

Mr G

Hello

as commented, there maybe more than 2 with the name "f1aa01_nfs_hoss01" data warehouses (in different hosts).

When using powercli, that's not a good practice to have more than one data store with the same name.

You must change the name of the data store (s), in order to have a single data store with the same name.

Until you do this, the powercli script will fail!

Best regards

Pablo

Tags: VMware

Similar Questions

  • Move virtual machines from a to another data store

    Is there a recommended (or integrated) way to move propelled out of virtual machines from a data store? Or is it a cut simple and working of dough which can be done from any client PC connected to the underlying storage providers?

    If both, store data Source and Destination are connected to the same server vCenter, do Storage vMotion. Make a right-click VM--> migrate--> change of data store and select the Destination data store.

  • Move the location of the VM swap file in another data store

    Hi all

    Was in a task to move the 1000 to the file location of VM swap on another data store which is newly assigned to Exchange us to the existing store database file that will be decommissioned.

    Eager to check if anyone has made movement swap of VM location of the files to a data store to another and that all measures taken to move.

    Require some VM downtime?

    Thanks in advance a ton.

    Yes it is possible without interruption of service to virtual machines.

    1. make sure that your cluster is configured to use swap data store specified by host

    2. take a host in the cluster in maintenance mode, change the location of the VM configuration file to point to the new data store

    3. do this for all hosts in the cluster

    When you vMotion a VM from one host to another the swap file will get moved to the new data store. Later when you take guests to the maintenance and return output mode, vMotion occurs for each computer in the cluster virtual and file is moved.

  • Move a virtual machine in another data store

    Hello

    On our ESX 4, we have created pools of resources and multiple data on SAN warehouses.

    To move that a VM resource with Betclic is very easy, but howto move a virtual machine from a to another data store?

    If I understand your question you should migrate your VM to the different data store.

    Right-click on a virtual machine, select migrate..., select Change location of data, select the desired data store, select virtual disk format (end/thick)...

    VCP4 | MCITP | Master ASE | CCNA

  • Storage vMotion a VM except disk that is in another data store

    Hello

    I'm looking to convert a large number of virtual machines clones related to thick.  I decided the best way to do this is probably a simple a storage vMotion, but all the virtual machines have a secondary drive that is in another data store.  I have to make sure that disk #2 stays at its current location, while the machine virtual (Config and disk #1 files) are transferred to a new data store data store.

    I figured out how to move a virtual machine complete or a single disc but not a virtual machine under a disc.  I am able to make it through the advanced options of puissancela vSphere client so I guess it is techinically possible.

    Pointers or other ideas would be greatly appreciated.

    Kind regards

    Ty-

    You will need to use the API method, see for example Re: using several data stores, cannot migrate the vmx file in a data store

  • . VMDK copy in another data store

    Hi people,

    I currently have a virtual machine that is sitting in my main drive in an ESX host. My goal is to copy (and not move) this virtual machine to another data store. I heard that there is a copy command to achieve this. If someone can explain? Also can be done while VM is turned on?

    Thank you!

    KeV

    Thick-> vmkfstools-i /vmfs/volumes/source.vmdk d thick/vmfs/volumes/destination /... VMDK

    Thin-> vmkfstools-i /vmfs/volumes/source.vmdk d thin/vmfs/volumes/destination /... VMDK

    p/s: turning off the virtual computer

    http://www.no-x.org

  • Moving a disk of the user in another data store

    Hello!

    I have an office pool that is used by a few users and now I discovered, as i wan't to upgrade the user drives my Netapp file server to use snapshots on them. Is there a way to move a disc of the user to its current location on the same os drive data store was a new data store?

    I know that I can put in place a new pool, but let the user discs when I do this, so this isn't an option.

    Anyone know how I can keep my user records, moving them to another data store?

    Currently a UDD cannot be moved the data to be backed up and restored. Alternatively, you can also turn on roaming profiles have the connection of the user in two places, once everything is in place, turn them off.

    WP

  • How to change the vmdk in another data store

    for my vm four disks are there I want to increase disk capacity but there is no space on the data store

    Hello

    Solution is that you must change the drive to another data store and increase space.

    First findout in spatial data store is avaialble.

    Select the virtual machine and migration - migration datastore - Advanced - click the drive on which you want to increase space - browse - choose data store where space is available - finishing

    After migration - more space.

  • displacement of the VM in another data store

    Hello

    We organize 2 5.5 vSphere hosts (VMware vSphere Essentials 5 Licensed for 2 processors (unlimited cores per processor) physical.)

    One of our data warehouses has insufficient free space on the disk.

    I'd be happy if someone could give me a little advice what is the best way to move or copy a virtual machine in another data store.

    Already, I read after KB, but he has not understood completely.

    VMware KB: Move or copy a virtual machine in a VMware environment

    Kind regards

    Roland

    Your screenshot shows that you are on the right track.

    As soon as you have turned off the virtual computer the

    dimmed options get turned on even on the essential.

    See you soon.

  • How to migrate to VMDK all store data in another data store

    How would be migration of VMDK script all store data in another data store.

    No, then you must use the Move-VM cmdlet. But this cmdlet moves all files to the destination data store.

    The alternative is to use the method RelocateVM_Task , which allows more flexibility to define what that goes where.

    It is a good example of your thread has called using several data stores, can not migrate the vmx in a data store file

  • 'copy' in another data store using vSphere client

    do not use vCenter in this case, just gross ESX with the vSphere client.

    in the browser data store, we can transfer files, download files, move files, and delete files.

    is there a way to copy files from one to another data store in the vSphere client?

    untitled.JPG

    Try right click and copy

  • How to move a virtual machine to a different data store, preserving its ID

    I would like to move a virtual machine to a different data store.

    Because I use 3rd party software that identifies a virtual machine by its ID of VirtualCenter, I'd like to preserve the ID, and I also want to preserve the name of the virtual computer.

    If I clone the virtual machine, I lose the ID and name.

    I can clone a second time to restore the name, but the ID is always false.

    I know that I can use vmkfstools-i to copy the entire disk.

    Is it possible to copy the entire VM?

    I am currently on ESX 3.0.2/VC 2.0.2

    The operation that I describe is available in 3.5.x/VC ESX 2.5.x

    TIA,

    -Magister

    Don't use EVER of CP to copy a VM, VMDK move/copy should be used in conjunction with vmkfstools as best practice.

    OP,

    You can manually make a copy using the CLI interface or use the VI Client and browse the data store and to copy and paste in the appropriate data and as suggested Andre store, when you switch on for the first time, you should say 'keep' when asked if you want to update the virtual machine UUID.

    Another thing, you could do, is if you've enabled for vMotion, you can actually use Storage vMotion which will migrate directly from your virtual machine to a different data store, it's less effort on your side and you can count on Andrew Kutz sVMotion plugin: http://sourceforge.net/projects/vip-svmotion/

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    repository scripts vGhetto

    VMware Code Central - Scripts/code samples for developers and administrators

    http://Twitter.com/lamw

    If you find this information useful, please give points to "correct" or "useful".

  • VM to the another data store

    Can someone tell me how I can move a virtual machine from a to another data store?  I get cold?  Or can it be done live?  I have esxi embedded and a san, equallogic for my configuration of vmware (with VMware infrastructure).

    SVMotion is the best way, it's a live migration.  You can do this through the RCLI or GUI.  For me, the graphical interface is better.

    Here's a good way for:

    http://www.virtualizationadmin.com/articles-tutorials/VMware-ESX-articles/VMotion-DRS-high-availability/storage-VMotion-SVMotion-VI-plugin.html

  • Migration online fo VM in another data store

    Hello, I need move a virtual machine in another data store but I need only Activ VM.

    Thank you

    After you download the sVMotion Plugin the link that I provided, follow the instructions described here, http://www.virtualizationadmin.com/articles-tutorials/vmware-esx-articles/vmotion-drs-high-availability/storage-vmotion-svmotion-vi-plugin.html

  • Problem of migration of virtual machine of a store of data in another data store

    Hello

    I've migrated from the virtual machine to a data store to another data store
    but the virtual machine present in both store data even after migration successfully
    and when I stop the virtual machine, then it shows that in the new data store.

    Please tell us what could be the possible reason for the same

    Appreciate your quick response.

    Kind regards

    Hakim. B


    Dear all,

    Finally, I found the solution.

    I had stop the virtual machine, replaced by location always store with the virtual machine swap file and restarted the VM.

    Kind regards

    Hakim. B

Maybe you are looking for