Replacement of a data store - migration of virtual machines

We have a VMware ESXi 4.0 installed on a SD card and our data store is on a dedicated internal RAID array. Our data store is running out of space... what we would do is remove the old hard drives and add new - therefore, delete and re-create the matrix RAID and the data store.

What is the best way to migrate our existing data store / VMs from the old array to a new one using vSphere or vSphere CLI? How we then re - associate VMs on the SD card with the new data store? Advice would be appreciated. Thank you very much.

Hello

Looks like it's a single ESXi host.

You will need to copy/save all the contents of the data store existing to another location (external HARD drive) while all virtual machines are closed.

Once it's done and you are sure that the copied data are intact, you can:

-remove all virtual machines of the inventory

-remove the data store

-Stop the host

-replace the HARD drive with the new

-Launch the host and to reconfigure the new raid

-Create the new data store in ESXi

Copy/restore all data to the new data store

-Browse the data store and add all the virtual machines to the inventory (create a list to make sure you get all the)

-Start the virtual machines

May be a good time to do an upgrade of ESXi5 as well

Please allow points to useful/correct answers

Tags: VMware

Similar Questions

  • 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

  • List of the files in the data store for the virtual machine

    Hello

    How to list the files of data store for the virtual machine? I can't find reference to the command.

    Thank you

    If you have installed vCLI and vSphere SDK for Perl, you have extra utilities on top of what is there with the vCLI, take a look at this list: http://www.vmware.com/support/developer/viperltoolkit/viperl40/doc/vsperl_util_index.html

    A script that can help with the list of files to store data for a given virtual machine is dsbrowse.pl

    Here is an example:

    [vi-admin@scofield ~]$ /usr/lib/vmware-vcli/apps/host/dsbrowse.pl --server himalaya.primp-industries.com --username root --name dlgCore-iSCSI.test
    
    Information about datastore : 'dlgCore-iSCSI.test'
    ---------------------------
    Summary
     Name             : dlgCore-iSCSI.test
     Location         : /vmfs/volumes/4a26f505-02dfd8a4-6867-003048d9586a
     File system      : VMFS
     Maximum Capacity : 15.75 GB
     Available space  : 11.654296875 GB
    
    Hosts associated with this datastore.
     himalaya.primp-industries.com
    
    Virtual machines on this datastore.
     None
    
    Templates on this datastore.
     None
    
    Datastore Folder Structure.
     Folder Path: '[http://dlgCore-iSCSI.test|http://dlgCore-iSCSI.test]'
     Files present
      testagain
      testlab-1
      testlab-2
      testlab-3
      testlab-4
      testlab-5
      testlab-6
      testlab-7
      testlab-8
      testlab-9
      testlab-10
      testlab-11
      testlab-12
      testlab-13
      testlab-14
      testlab-15
    
     Folder Path: '[http://dlgCore-iSCSI.test|http://dlgCore-iSCSI.test] testagain'
     Files present
      testagain.vmdk
      vmware.log
      testagain.nvram
      vmware-70.log
      vmware-65.log
      vmware-66.log
      vmware-68.log
      vmware-67.log
      vmware-69.log
      testagain-flat.vmdk
      testagain.vmx
      testagain.vmxf
      testagain.vmsd
    

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

    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

    150 VMware developer

    Twitter: @lamw

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

  • Data Center migration of virtual machines and records from one data center to another.

    So, I found an online script that migrates your inventory during one vCenter to another.  I broke the script into two pieces that export (path of the folder path of the VM folder, permissions of folder and notes and custom attributes) and the other to import (create folders, move the virtual machines in the original folder, reset the permissions and set notes and custom attributes).

    The export script works very well.  I have problems with the import script.  If I have the name of the duplicate folder in the tree view of the structure of the tree will get duplicated under each similar folder.  i.e.

    Exported folder structure

    Portuagal-> football

    Spain> football> football

    Any folder structure

    Portugal> football> football

    Spain> football> football

    I guess I should somehow figure out the ID of file but don't have a clue where to start.

    I rewrote the section import of files of the script to avoid the problem of duplicated folder. The new script detects the parent folder by starting to look at the record of the root instead of just the folder above where it should be created. Because the full path is in the .csv file it is possible. The following script should now work correctly:

    ##IMPORT FOLDERS
    $vmfolder = Import-Csv "c:\Folders-with-FolderPath-$($datacenter).csv" | Sort-Object -Property Path 
    
    foreach($folder in $VMfolder){
         $Path = $folder.Path.split("\")
         $PathLength = $Path.Length
         $SubFolder = Get-Datacenter $datacenter | Get-Folder vm
         For ($i= 1; $i -lt $PathLength-1; $i++) {
            $SubFolder = Get-Folder -Location $Subfolder -Name $Path[$i]
         }
         New-Folder -Name $folder.Name -Location $SubFolder
    }
    

    Because the forum software has problem with hooks and contains the script, I have attached the vCenter_migration_import.ps1 script has changed.

    Best regards, Robert

  • Can I download can imagine them in the data store when the Virtual Machine is running

    or do I have to stop the Virtual Machine first and then download?

    Rgds

    Chris

    If you want to have a consistent state, Yes.

    If you just need a consistent state to the accident, you can create a snapshot, download the base vmdk files and then validate once again the snapshot operation.

    You cannot download files in use (except the read-only).

    André

  • 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

  • need to migrate data to a new virtual machine

    Currently I have a W2K3 off warranty, physical file server. I created a file in Vmware VM W2K8 server which will replace previously mentioned W2k3 server. My data for hosts vSphere 4 and all the physical servers are stored on a CF CX 410 San. My questions are: how to get the data to my new virtual machine? Do I need to migrate? Redirect? Present it? Is there a tool in VMware? Perform this at the level of the logic unit number? I can restore from tape to complete backup using the backup software?

    To say the least, I am a little confused and would appreciate any ideas, I'm sure there is more than one way. Thank you.

    You have a few options.

    Use RDM using the link to the Tunis above.

    Create a new virtual disk in virtual machines and use robocopy to copy the data from the physical server to the virtual machines.

    If the has an option of CIFS SAN then use it directly to files on the server.

  • Different VM 1 with 3 vmdk in the data store: Migration of data to rename store

    Hello

    I'm here today to ask for your help please.

    In our Organization, we have 1 large VM

    1 vmdk = > The BONES in lun, SAS performance

    1 vmdka = > 1 Tera SATA MON only of DATA

    Another 1 vmdka = > 1 Tera SATA MON only of DATA

    This virtual machine is being tested and we need to rename it to the name of the production.

    When you rename in vcenter you do a data store migration to correct all files with the new name.

    In this case, how can we specify each VMDK to go to the data store specified during migration?

    Because we could all think in the same data store due to the limitation of 2Tera by a data store

    Thanks for your help

    When you "migrate" a virtual machine and choose 'Change Datastore' use the advanced option. This will allow you to specify multiple destinations of data store. Use the drop-down arrow in the current [location].

  • Migration of virtual machines to vSphere 4.1 to vSphere 6.0

    As the title eludes to, we are standing up a new physics 6.0 Server vCenter Server and need to migrate virtual machines of 4.1 6.0 guest hosts.  I'd love to take the time to create a script that does the following; However, before heading down this path, I wanted to do a ping of the group to see if someone has done something like this before or have pointers to scripts that perform some of these actions already.  Some background and concept:

    • Running 4.1.
    • A new physical Center of vCenter 6.0 will be deployed side-by-side with 4.1.
    • The existing configuration of vSphere HA allows for 1-2 guests down without impact to the virtual machines.
    • The two environment and will be Cisco N1KV, SAN access shared for the same data storages.
    • A new vCenter will be lifted.
    • A single host is identified and VMs evacuated to the remaining hosts.
    • This host will be in maintenance mode, removed from the cluster and close.
    • A clean install of ESXi 6 will be done and set up spec.
    • N1KV will be deployed.

    To digress on the details at the moment... Now markets PowerCLI desired.  This idea is ad hoc and on the fly, so as I write this.

    • identify all the virtual machines associated with a specific data store - will need to work with the local client to schedule downtime for virtual machines
    • Stop the virtual machine
    • Remove the VM of the vCenter 4.1 inventory
    • to connect to vCenter 6.0
    • Add the virtual machine to the vCenter 6.0 inventory (and once we have passed the first host in the new cluster, automatically place the virtual machine by using the DRS)
    • Reconfigure the vmnic with the new Cisco 1000V dvs (will be the same name on both sides, but has a different ID)
    • pull in the keys and the values to a CSV and advancedsetting set to harden
    • Turn on the virtual machine
    • Perhaps a test of ping for the NETWORK card to check connectivity

    The order in which the steps are performed can be switched around, as long as the desired end result is the same: migration effectively virtual machines between two disparate solutions with single medium sharing as a data store.  In which I realize will always be VMFS3.  New data stores VMFS-5 is another task for another time.

    Thank you for your time, suggestions, links, etc...

    @LucD - hi.

    These steps are quite possible with PowerCLI.

    See the script after skeleton, he probably needs some adjustments to fit your environment and requirements

    $dsName = "xyz".

    $vm = get - VM - $dsName data store

    Stop-VMGuest - VM $vm - confirm: $false

    Remove-VM - $vm VM - confirm: $false

    Disconnect-VIServer-Server vc41 - confirm: $false

    $vc6 = Connect-VIServer-Server vc6

    $newVM = $vm | New-VM - DiskPath $_. ExtensionData.Config.Files.VmPathName - confirm: $false

    # Suppose a CSV file with

    # Key, value

    # key1, value1

    # key2, value2

    $advSettings = import-Csv - UseCulture advSettings.csv

    {foreach ($obj in $newVM)

    $advSettings | %{

    Get-AdvancedSetting - $obj entity - name $_. Key |

    Game-AdvancedSetting - value of $_. Value - confirm: $false

    }

    }

    Start-VM - $newVM VM - confirm: $false

    $newVM |

    Select Name,

    @{N = "Available"; E = {Test-Connection - ComputerName $_.} Guest.HostName - County 1 - Quiet}}

  • Is it possible to migrate a virtual machine between vcenter servers programmatically?

    Hi all

    My question is quite simple:

    -Is it possible to migrate a virtual machine between vcenter servers programmatically?

    Let's say we have two data centers:

    vcenter1

    -vm1

    -vm2

    vcenter2

    -vm3

    Is it possible to migrate vms between vcenter2 and vcenter1 programmatically? (or vice versa)?

    Also, I'm assuming that the appropriate VLAN and data warehouses across the different vcenters!

    Thank you

    Luis

    It is not possible, vMotion or migration live is in an instance of vCenter, it cannot be covered through two even if you have the data store accessible both vCenters and sets of the host. At best, you can unregister the virtual machine of vCenter 1 host and re-save as on vCenter 2 host, but once again, it is while the virtual machine is turned off.

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

    William Lam

    VMware vExpert 2009,2010

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

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

    VMware developer community

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

  • Require a process step by step for the migration of virtual machines to new VMware ESX hypervisor

    Hello

    I'm looking for the method step by step for the migration of virtual machines to new host ESX Migration both cold and hot.

    Scenario - I have two data centers running ESX host stand-alone (with VM) in Europe. I need to build the new ESX host in new Dataceter to Singapore.

    Need prerequisites, the methods available for migrate VMWARE virtual has new host ESX (in the new data center) with minimum downtime.

    It will be great if you can enumerate the markets or redirect me to documentation that I can use to create detailed steps as the target host compatibility check on VMs and so on.

    Please advice

    Concerning

    AVI

    The steps are correct. The virtual machine must be turned off (step 3).

  • Problem with Migration hot virtual machines Hyper-V

    Dear support

    I am facing problem in Live Migration of Virtual Machine in Windows 2012 of Hyper-V R2 cluster. Here are the details for my current setup.

    Two windows 2012 R2 Datacenter even care Server (HV01 and HV02) both in cluster

    A Virtual Machine created the Volume share of Cluster (c:\Cluster storage\...)

    A network adapter dedicated to the management of server-> 10.0.1.11 (HV01) and 10.0.1.13 (HV02)

    A network card dedicated to Hyper v Virtual Machines-> 10.0.1.12 (HV01) and 10.0.1.14 (HV02) and allow networking option is disabled.

    A network card for the heart beats-> 10.0.20.1 (HV01) and 10.0.20.2 (HV02)

    A network card dedicated for Live Migration-> 10.10.10.50 (HV01) and 10.10.10.51 (HV02) and chosen to be used only for the live migration fails on cluster network settings

    I added the Virtual Machine Cluster Failover successfully without error or warning. When I do a quick migration his works fine but when I do live migration his error giving 21502.

    Please update what's wrong with my setup

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Not possible to export a list of virtual machines that are created in the past 7, 30, 120 and 180 days since an imported csv file containing the date of creation of virtual machine

    Not possible to export a list of virtual machines that are created in the past 7, 30, 120 and 180 days since an imported csv file containing the date of creation of virtual machine. My questions is the correct statement to the variable: $VmCreated7DaysAgo: $_CreatedOn "-lt" $CDate7.

    # #SCRIPT_START

    $file = "C:\Users\Admin\Documents\WindowsPowerShell\08-18-2014\VM-Repo.csv".

    $Import = import-csv $file

    $VMCreatedLast7RDayRepoFile = "C:\Users\Admin\Documents\WindowsPowerShell\08-18-2014\Last7Days.csv".

    $start7 = (get-Date). AddMonths(-1)

    $CDate7 = $start7. ToString('MM/dd/yyyy')

    $VmCreated7DaysAgo = $Import | Select-object - property name, Powerstate, vCenter, VMHost, Cluster, file, Application, CreatedBy, CreatedOn, NumCpu, MemoryGB | Where-Object {$_.} CreatedOn - lt $CDate7} | Sort-Object CreatedOn

    $TotalVmCreated7DaysAgo = $VmCreated7DaysAgo.count

    $VmCreated7DaysAgo | Export-Csv-path $VMCreatedLast7RDayRepoFile - NoTypeInformation - UseCulture

    Write-Host "$TotalVmCreated7DaysAgo VMs created in 7 days" - BackgroundColor Magenta

    Invoke-Item $VMCreatedLast7RDayRepoFile

    # #SCRIPT_END

    You can use the New-Timespan cmdlet in the Where clause, it returns the time difference between 2 DateTime objects.

    An example of this cmdley

    New-TimeSpan-start (Get-Date). AddDays(-7)-end (Get-Date). Select days - ExpandProperty

    In your case, you could do

    Where {(New Timespan-démarrer ([DateTime] $_.))} CreatedOn) - end $start7). {7 days - gt}

    But beware of negative numbers.

  • How to migrate a virtual machine of vsphere vsphere 4 5

    I have a vsphere 4 and a 5 of vsphere, I want to migrate a virtual machine of vsphere vsphere 4 5

    my method is export ovf model and deploy the model of the FVO in vsphere 5, but it shows "end of file EGGS reached while looking for: * hard.

    How can I work my problem

    Thank you very much

    Hello

    Why are you trying with VMware Converter?

    https://my.VMware.com/Web/VMware/info/slug/infrastructure_operations_management/vmware_vcenter_converter_standalone/5_0

    It's the right tool for this kind of tasks/migration

    However, if you share with us details about your environment, we can help you more accurately.

    Concerning

  • How to migrate a virtual machine from the server with DAS to another server

    Hi guys,.

    questions. 'More' essential Kit. VMotion is available

    I have 2 physical servers, two of them have DAS (not SAN Central). SO I want to migrate a virtual machine on server A to server B. is it possible in this situation?

    Or should I have versions of more expensive VMWare do?

    Thank you
    Dmitry

    You can use clone. I would close first to the bottom of the virtual machine, but a VM slowed would be very nice clone. You can also use the VMware conveter. VMware converter can make a hot clone, including synchronization of last-minute changes, stop the source machine and put under tension the clone.

Maybe you are looking for