Announcement

Collapse
No announcement yet.

vSphere linked clone to different datastore

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • vSphere linked clone to different datastore

    Hello to all,
    I am using a script (PowerCLI) that clones vms in linked clone mode, and it worked great until I needed to change the datastore for the cloned vms; so I have the clean vm set up and ready for cloning (on Datastore1), but I need the clones (linked clones) to be on different datastore (Datastore2).

    I attached the script and I think it needs to be modified at the $cloneFolder variable, but I can't figure out what to put there.

    Thanks in advance
    Attached Files

  • #2
    Re: vSphere linked clone to different datastore

    $vm = Get-VM $SourceName

    sourceName is coming from your csv file

    # Get managed object view
    $vmView = $vm | Get-View

    # Get folder managed object reference
    $cloneFolder = $vmView.parent
    you need to update this to new location however i am not familiar with vmware powercli commands.
    Thanks & Regards
    v-2nas

    MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
    Sr. Wintel Eng. (Investment Bank)
    Independent IT Consultant and Architect
    Blog: http://www.exchadtech.blogspot.com

    Show your appreciation for my help by giving reputation points

    Comment


    • #3
      Re: vSphere linked clone to different datastore

      Originally posted by v-2nas View Post

      # Get folder managed object reference
      $cloneFolder = $vmView.parent
      you need to update this to new location however i am not familiar with vmware powercli commands.
      yes I know I have to put the new path here, but I don't know how to put it (the command)

      Comment


      • #4
        Re: vSphere linked clone to different datastore

        I got my answer, thanks allot for your help

        http://communities.vmware.com/message/1704991#1704991

        Comment


        • #5
          Re: vSphere linked clone to different datastore

          And from LucD, exceptional Powershell & PowerCLI scripter.
          Marcel
          Technical Consultant
          Netherlands
          http://www.phetios.com
          http://blog.nessus.nl

          MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
          "No matter how secure, there is always the human factor."

          "Enjoy life today, tomorrow may never come."
          "If you're going through hell, keep going. ~Winston Churchill"

          Comment

          Working...
          X