msCCare
asked on
Script to Copy ESXi VM from datastore1 to datastore2
Hello,
We need to copy a virtual machine from one datastore to another. i do not have much experience with linux commands nor do i know how to setup a scheduled task on linux. Does anyone know how i can set up a script to
1) shutdown virtual server
2) copy folder and contents
3) turn on virtual server
I know how to do this with vmware server but no clue with esxi. any help will be appreciated.
We need to copy a virtual machine from one datastore to another. i do not have much experience with linux commands nor do i know how to setup a scheduled task on linux. Does anyone know how i can set up a script to
1) shutdown virtual server
2) copy folder and contents
3) turn on virtual server
I know how to do this with vmware server but no clue with esxi. any help will be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
what i did was install the RCLI and ran the following command:
C:\Program Files\VMware\VMware VI Remote CLI\bin>vmkfstools.pl --server esxiserver --username root --password ****** i /vmfs/volumes/4a0370bc-0ba
I just had to do it for each hard drive. also, using datastore1 and datastore2 did not work, it had to be the actual GUID folder name