Git Product home page Git Product logo

cross-sso_vmotion's Introduction

Cross-SSO_vMotion

Description

PowerCLI script to vMotion a running VM between two vCenters, even if they are not in the same SSO domain. The script will use the GetPortGroupObject() function to determine the portgroup type (standard or distributed) and return the correct object.

For more information, you can refer to the [related blog post] (http://cloudmaniac.net/using-powercli-to-vmotion-vm-between-different-sso-domains-vcenters/) for more details.

Requirements

Configuration

This section describes the credentials to your vCenter Servers (source and destination).

# vCenter Source Details (SSO Domain A)
$SrcvCenter = 'vc01-dc-a.sddc.lab'
$SrcvCenterUserName = '[email protected]'
$SrcvCenterPassword = 'VMware1!'

# vCenter Destination Details (SSO Domain B)
$DstvCenter = 'vc01-dc-b.sddc.lab'
$DstvCenterUserName = '[email protected]'
$DstvCenterPassword = 'VMware1!'

This section describes the VM to migrate as well as the destination (datastore, cluster and port group). The destination port group can be a standard or a distributed port group. The script will automatically check the type using the GetPortGroupObject() function and return the correct object.

# vMotion Details
$vmToMigrate = 'web01'
$DstDatastore = 'nfs01-dc-b'
$DstCluster = 'Compute Cluster B'
$DstPortGroup = 'DPortGroupB'

Once you have configured the parameters to match your infrastructure, you can run the script to vMotion the Virtual Machine.

Considerations

  • This script work only for VMs having a single NIC.

cross-sso_vmotion's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.