How can I move virtual machines from a local data store for a new iSCSI SAN?

Hello guys,.

Now that we have a new iSCSI SAN market how can I tranfer all the virtual machine to a local data store for a new SAN? Can I stop the VM in the host, and then copy the DataStore files with all the info on the new volume?

Thank you



Alternatively, you can use VMware converter or cold Migration / Storage VMotion if you have the appropriate licenses.


VMware communities user moderator | VCP | VCDX


Tags: VMware

Similar Questions

  • Size of the virtual machines on the local data store

    What is the best way to determne the (total) disk space using a virtual machine? We have several virtual machines on local data warehouses and would like to estimate roughly how much disk space to the total number of virtual machines use to caculate how much storage SAN, they will consume. Is there an 'easy' way to socket this information?

    The most accurate way would be to calculate the total space used by the virtual machine files in the data store.

    Connect to the service console

    Navigate to the vmfs volume

    Navigate to the vm folder


    This will give you files for this particular virtual machine related to the amount of disk space used by all the vm


  • Clone the virtual machine to the local data store

    Hi all

    I'm looking to automate a task daily (or almost) of my friends with a small script with powercli.

    I'm trying to "backup" or to clone a virtual machine, I work in a storage of one of our servers.

    The servers are managed by a 5.1 vCenter and the machine is on a shared storage.

    From time to time, I clean, stop the machine, remove all snapshots and clone the virtual machine to one of the local server as a backup storage. So I put together a small script which almost works. It works as long as the target data store is a shared storage, but not with a local storage.

    I get always an error that claims it can not access the local data store and is not a permissions problem...

    Given that I can accomplish this via the customer without problem I thought it is possible via powercli too, or I'm wrong?

    My Script up to now:

    # Variables
    $VC = "" #vCenter Server
    $User = "domain\user" #User
    $Pass = 'test123' #User PW
    $VMName = 'scripttest' #VM
    $BackupSuffix = "backup" #Suffix to add the name of VM to mark this as a backup
    $VmHost = "".
    $Datastore = 'ESX2-LocalData' #Datastore
    $BackupFolder = 'Backup' #Folder the VM gets classified

    # Register cmdlets to VMware

    If (-not (Get-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue)) {}

    Add-PSSnapin VMware.VimAutomation.Core


    # Connect to the server

    SE connect-ViServer $VC - user $User-password $Pass

    # Remove the old clone

    $OldBackups = get - VM | WHERE {$_.} {Name: corresponds to '$VMName - $BackupSuffix'}

    If ($OldBackups - don't "")


    If ($OldBackups.Count - gt 1)


    Write-Host "better check! "Found several results:

    Foreach ($VM to $OldBackups)


    Write-Host $VM. Name



    on the other


    Remove-VM - VM $OldBackups - DeleteFromDisk-confirm: $false



    # Clone VM

    $VMInfo = get - VM $VMName | Get-View

    $CloneSpec = new-Object Vmware.Vim.VirtualMachineCloneSpec

    $CloneSpec.Snapshot = $VMInfo.Snapshot.CurrentSnaphshot

    $CloneSpec.Location = new-Object Vmware.Vim.VirtualMachineRelocateSpec

    $CloneSpec.Location.Datastore = (get-Datastore-name $Datastore |) Get - View). MoRef

    $CloneSpec.Location.Transform = [Vmware.Vim.VirtualMachineRelocateTransformation]: sparse

    $CloneFolder = $VMInfo.Parent

    $CloneName = "$VMName - $BackupSuffix".

    $TaskCloneID = $VMInfo.CloneVM_Task ($CloneFolder, $CloneName, $CloneSpec)

    # Check if the task is completed

    $Check = $false

    While ($Check - eq $false)


    $Tasks = get-job | Select State, id | Where {$_.} State - eq "Running" - and $_. State - eq "pending"}

    ForEach ($Task in $Tasks)


    If ($ - eq $TaskCloneID)

    {$Check = $false}

    on the other

    {$Check = $true}


    Start-Sleep 10


    # Move clone to the backup folder

    Move-VM - VM '$VMName - $BackupSuffix' - Destination $BackupFolder

    # Disconnect

    Disconnect-VIServer-confirm: $false

    Can you show us the complete error message you get?

    BTW, the clone step can be replaced by the New-VM cmdlet with the setting of the virtual machine.

  • How can I move virtual memory on hard drive external?

    I use windows xp. I have problems with virtual memory. I have an external hard drive. How can I move virtual memory external hard disk? I get a message that my virtual memory is low. My computer is running very slowly. Is there another answer to my problem?

    You can increase virtual memory instead of what you think now... You can find good info on how to do and However, for convenience, I'll include some steps below...

    "How to increase virtual memory? ."

    In Windows XP

    1. on start and then click Control Panel.
    2. click on performance and Maintenanceand then click System.
    3. on the Advanced tab, under performance, click settings.
    4. under the Advanced tab, under virtual memory, click on change.
    5. under drive [Volume label], click the drive that contains the swap file that you want to change.
    6. under paging file size for selected drive, click custom size check box. You can enter the amount of memory you wish to book for virtual memory by entering the initial and maximum size.
    7. click on set
    When you are prompted to restart the computer, click Yes.
    Special note: You must choose the same amount for the initial size and maximum size. This will stop your CPU from the pagefile evolving. "(found in the link above)

    I hope this helps, if I can be of further assistance, you can try to join the

  • 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



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


    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:


    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at:

    repository scripts vGhetto

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

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

  • I would like to have at least 1 of my toolbars that are displayed at the bottom of my browser open screen. How can I move a toolbar from the top to the bottom of the page?

    I would like to have at least one of my toolbars that are displayed at the BOTTOM of my browser open screen. How can I move a toolbar from the top to the bottom of the page? I don't want to do this by using an extension, and when I read about the extension, I really have not seen how it would move the toolbar to the top-down any browser page open.
    Thanks in advance for the supply, the answer and the procedure to get this accomplished.

    You can't drag an entire toolbar to the bottom of the window. The Bar of the Addon is a "toolbar", drag whatever you want from the Palette to customize or a toolbar up to the bar of the Addon.

  • How can I move my itunes from imac to the new imac 2011?

    How can I move my itunes from imac to the new imac 2011?

    Click here and choose the option that best fits your situation.


  • How can I move my music from iPod to old style to my computer so I can reload the music to a new iPod?

    How can I move my music from iPod to old style to my computer so I can reload the music to a new iPod?

    You should really have your iTunes library on your computer and keep a current backup of it.  iDevices are not designed or adapted for the storage of data in the long term.  See the tips to the user of turingtest2 on recover your iTunes from your iPod or an iOS device for a list of tools and methods (for Windows and Mac) that can be used to copy media from your iPod to your computer.

  • LENOVO S 60 - how can I move messages deleted from the Inbox?

    How can I move messages deleted from the Inbox?

    Once you click on the, read it, it should have an option to move electronic mail.

    The menu button is the physical button next to the original key.

  • How can I move my contacts from "Windows Mail" app list in Vista to Windows Live Hotmail online? I can't find the Contacts file to download.

    How can I move my contacts from "Windows Mail" app list in Vista to Windows Live Hotmail online? I can't find the Contacts file to download. Why is it so difficult?

    Hi JohnKoelling,

    When you use Windows Live Hotmail and the question you have posted is related to Windows Live, so it would be better suited in the Windows Live community. Please visit the link below to find a community that will provide the best support.

    Windows Live Solution Center Hotmail Portal


    I hope this helps.

  • How can I move the "dock" from the bottom to the side of my screen?

    How can I move the "dock" from the bottom to the side of my screen?

    How can I move the "dock" from the bottom to the side of my screen?


    If you mean that the taskbar, click with the right button on the taskbar and uncheck lock taskbar.

    Use the left mouse button to drag the taskbar to the side of the screen where you want to move and then block new taskbar.

    I hope this helps.

    Thank you for using Windows 7

    Ronnie Vernon MVP
  • Transfer of virtual machines from a server ESXi 3.5 to new ESXi 4.1 server. What is the procedure.

    I read on how to transfer a virtual machine from one server to another using VMotion. Not 100% clear on the process again. What I see or read is when you do this since an ESXi 3.5 Server ESXi 4.1 server, I do not see any information on, if possible. In addition, I have not read if I need to convert or upgrade the virtual machine until I use it on the new server. So, my question is, are there any special instructions, conversion tools to convert a VM created 3.5 to use on the new Server 4.1? Is there a detailed procedure that I have not yet found or read best describes this process. Like I said up to now I'm not 100% clear on the procedure. Thank you.

    ESX 3.5 VMs can run without modification on a host ESXi 4.1 - VMotion between the two hosts, you will stiil need to ensure CPU compatibility between the hosts.

    Maybe it's the best guid for upfrading to vSphere -

    If you find this or any other answer useful please consider awarding points marking the answer correct or useful

  • How can I move items 9 of my old xp computer to my new computer windows 8?

    How can I move element 9 of my old xp computer to my new computer windows 8?

    If you have an installation for Elements 9 disc, then I suggest you uninstall Elements 9 from your old computer, disable this feature during the uninstallation. On the computer of Windows 8, insert the disc and install Elements 9, enable it during installation. However, it is untested, according to this document from Adobe: Let me know how it goes.

  • Rename all the virtual machine files in the data store


    We have renamed one of the name of the server of our virtual machine running on esx3.5. In addition, we have renamed this server in VC to reflect the new name of the server. Please tell us how we can rename all files in this virtual machine residing in the data store to reflect the new name of the server.

    Appreciate your quick response.

    Thanks in advance...

    You can use sVMotion and move it to another data store or migrate from cold.  Two tasks will rename the underlying set of files.

  • List not updated virtual machines after the migration of the virtual machine to a different data store

    My vSphere infrastructure 5 uses several data stores.

    Two data warehouses are associated with NFS on different NAS shares.

    I migrate VM to a data to another store.

    The navigation data store, I see that the files are moved from the old data store to the new and that no file belonging to the migrated VM still does exist on the old data store.

    If I look at the list of VMs on the old data store, I still see the old VM.

    I see it in the list of the virtual machine on the new data store as well.

    I checked that no .iso no pagefile is in the old data store.

    How can I update the list of the virtual machine on the old data store?

    Above all, how can I safely delete the old data store by ensuring that the virtual machine works very well on the new data store and I don't lose anything?



    This use of data store 'Phantom' is usually observed, if the current configuration of the virtual computer points to the 'old' data store (diskette, CD-ROM) or the virtual machine contains snapshots where - at the time where tone have been created - the VM has had these references. Once the snapshots are deleted from data store 'ghost' will go away from summary of the virtual machine.


Maybe you are looking for

  • How can I stop Firefox to return to the previous window, as soon as I open a new window?

    In recent versions of Firefox, whenever I chaque fois que j' ouvre opens a new window, as soon as the window opens, Firefox goes back to the previous window, the one that was on the screen before I opened the new window. This is very irritating and n

  • Use the type of data "table of container" in teststand

    Hello I have a problem with data type "table of container" in the TestStand. I defined an empty local variable in the form "table of the container" with the name "array_of_container1" and also a local variable as 'container' with a name "container1".

  • numerical integration

    Hello I would like to ask, how is it possible to numerically integrate a function and to get all the little pieces (points) on the graph I table 1 d with a lot of points, and when I tried to use for loop for the integrative function, I have an error

  • setting up a wireless network

    Hello I wana share my wid of connection and the files internet my frendz in my community, we are all distributed in a box around 300metres.we live in different houses and between our houses, there are many buildings. This is our situation and I wana

  • Version of the Flash runtime?

    Hello I wonder what version of the Flash runtime is running on the PlayBook Simulator and the real PlayBook? Is it 10.1, 10.2... ? Everyone knows?