Clone a model on multiple data centers

So here's the scenario:

In my vcenter, there are two data centers. In a Datacenter (B), that we have our systems development and the other data center (A) are our production environments. Must often make a clone of a (B) VM and clone a VM (A) through. We have a process of the method we use to move our VMs. I'm powerCLI throughout the process in order to save on some manual cloning time. This is our process:

1 clone a VM (B) direct and take from the Datacenter (B) under the "DEV" folder, under this is a subfolder 'AppServer' where the virtual machine "DevAPP" exists and it a clone of this subfolder in another subfolder in 'AppServer' also called ' ~ DEV (B) to (a) staging of Clone.

2. once the clone "Date of DevApp_today" is realized in the "~ DEV (B) to (a) staging of Clone" remove us the NIC 1 and then convert it to a template.

3. once it is converted to a template with the name 'Date of DevApp_today' clone us over the back (B) data center "~ DEV (B) to a Clone (A) Organization" (A) record data center "(B) to (a) staging of Clone.

4. once the 'Date of DevApp_today' model in the data center (A) convert us into a virtual machine and and add the NIC, assign VLAN appropriate and then activate connected to power on.

5. once the network card on the virtual computer we then convert back to a model and deploy him 11 VMs with the customization files to configure the virtual machine.

Most of the time steps 1 and 2 I can script fairly easily, and the 4 and 5, my biggest problem is step 3. What I've tried is by using the New-model command.

Example: New-model -model 'Date of DevApp_today' -location a Datacenter in English (common name) VMHost - $HostA (a host in A data center) -data store $Data (storage in A data center) DiskStorageFormat - Thin -RunAsync-confirm: $false

It works to get the center of data (B) (A) data center model, but he falls into the root of the data center (A). I know it's because in - place I put 'A' there, but I do not know in any case to decompose from there to drill down to the data center (A) subfolders. If I put the subfolder "(A) (B) (a) staging of Clone" it's all just a stink about how I already have a template of this name and it must be cloned in the same data center. Meanwhile once it reaches the root of (A) I have just run a Move inventory on the template to move to "(B) to (a) Clone staged."

I have necessarily need a whole script created for me, I just want to know how to move the model obtained in (B) (a) without him having to be abandoned in the root (A), move inventory

Not sure about the quotes or not, but may be necessary

Tags: VMware

Similar Questions

  • Can clone us VM on the data centers with downtime, is this possible in ESXi 5 and above?

    Can clone us VM on the data centers with downtime, is this possible in ESXi 5 and above?

    No, they can be in different subnets.

  • Using node NHP groups in multiple data centers

    Hello

    I was looking for information, I'll implement a distributed deployment of ISE.   We have two data centers, each will have its own group of PSN node (load balancing), I need a strategy where we can ensure that all the DNA do not point to a single group of PSN node.  In the config switch that I only noticed that the radius server registration option where first is referenced and secondary IP is used only if the primary Radius Server is unavailable.  We have many sites of the direction we want to deploy ISE, we would like to distribute the RADIUS AuthC/AuthZ evenly between the two DC.

    Thank you

    -Amin

    Just so we are clear, ISE node groups did not-load balancing, you need a for this external load balancer. If you are actually using a balancer for each domain controller, then you might have half of your switches just manually use a vip for primary and secondary school, and the other half upside down. Also, if you use aaa server groups in your switch, you can also do a local switch 'balancing', based on the current session how are radius on each server in the group.

    http://www.Cisco.com/c/en/us/TD/docs/iOS-XML/iOS/sec_usr_rad/configurati...

  • copy root alarms in multiple data centers

    Hello.

    I try a few scripts, read some discussions and Web sites, but have to meet our needs without success.

    We have vcenter 5.0 with some data centers, where some of them have esx cluster and some of them have independent esx hosts.

    We create new alarms to run external scripts. everything works very well and now we want to our more granular alarms on each of our data center. to copy these alarms will be the easy way.

    I don't want to make new manual alarms and the alarm on the root.

    what I need is a handy script that copy three alarms to the root (or the folder hidden data center) to all data centers but two of them and optionally disable this three alarms in root.

    I try LucD 'alarms-move-them-around', some variants of this and other scripts, but ends up with a lot of mistakes that I don't understand.

    The PowerCLI Version: VMware vSphere PowerCLI 5.0 build 435427

    Thank you!

    with the help of lucd I arrived to our needs. I have attached the script to work (while you need not read all messages)

    Online 70 that you can put in the alarms to copy to all other domain controllers in the connected vcenter and change line 69 for domain controllers that you don't need.

    and thanks again to the Holy lucd

  • Use the model of multiple data in one report

    You can have several data model and integrated into one report?
    How can I do? Have some examples of how to implement this.

    Yes

    http://download.Oracle.com/docs/CD/E12844_01/doc/BIP.1013/e12187/T518230T518233.htm#4510518

    try to create a report with the two queries.

  • HP workspace: where are located the workspace of HP data centers?

    Hey everybody,

    Where are located the workspace of HP data centers?

    Thank you

    Bill

    HP workspace is currently supported by seven, SSAE16-SOC certified, regional data centers, serving many countries. Data centers are located in Australia, Germany, Ireland, Japan, Singapore, and two in the United States (California and Virginia). The workspace of HP team will be allowing multiple data centers in the coming months to provide global coverage for customers. To see a current list of regional data of the workspace of HP centers refer to www.hpworkspace.com.

  • Copy of models between data centers

    Hello

    I have a couple of VM being cloned to models. These models need to be copied in other data centers VMWare. I got it all to a using PowerCLI PowerShell script. If I understand well I can't do just a simple copy of a data center to another. First of all, I need to upload the template, then download to the data center target to get these models where they do.

    Does anyone have an idea how I could do this task and it is able to be accomplished using PowerCLI?

    TIA

    OK, you could do something in this direction.

    $vmName = "MyVM.

    $templateName = "template".

    $tgtDC = "dc".

    $dc = get-data center-name $tgtDC

    # Get the VM source

    $vm = get-VM-name $vmName

    # Clone VM and move it to the target DC

    New-VM - $vm - name $templateName VM | Move-VM-Destination $dc

    # Convert the VM cloned a model of

    Get-VM-name $templateName | Set-model

  • Using CLI, I would clone a virtual machine between different data centers

    Hello!!

    We have two data centers.

    We want to clone a virtual of DataCenter1 to DataCenter2 machine.

    We cannot with vSphere.

    Does anyone know how we can do this? any idea?

    Thank you very much

    Jose.

    Cloning is a feature of vCenter Server, not a host ESX (i). You need to connect to vCenter, that's why you get the error because this operation is not supported in a host ESX (i)

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

    William Lam

    VMware vExpert 2009,2010

    VMware VCP3, 4

    VMware VCAP4-DCA

    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".

  • Clone between data centers and through the firewall?

    I have a VC that manages 8 virtual data centers.  Some of these data centers are on a dish network, and some are in a demilitarized zone.  Even if the storage is NOT shared between data centers, I am able to clone a VM between data on food networks centers but I cannot clone between a data center on a dish network and the other in a demilitarized zone.

    Is there a specific port that must be open to clone through a firewall, or I wouldn't be able to do this.

    ________________________________

    Jason D. Langdon

    The file copy occurs using port TCP/UDP 902, as all communications from ESX.

    Do you have any NAT between the servers ESX and vCenter?

    Marcelo Soares

    VMWare Certified Professional 310/410

    Master virtualization technology

    Globant Argentina

    Review the allocation of points for "useful" or "right" answers.

  • Examples of a model of data using multiple data sources?

    I'm looking for a sample report using multiple data sources. I saw one where they make a master-detail, but I'm looking to combine the results in a sorted order (sorting between all sources of data). Master/detail used a variable binding to bind two defined queries, I think what I will not have this, so I'm lost on how to get there. I have reports using multiple sql queries and there is a way in the data source drop-down to tell him to combine data sources. It seems to be a process with data models, it is still possible.

    Any pointers/links would be appreciated.

    Gaff

    Use this

    http://download.Oracle.com/docs/CD/E10415_01/doc/bi.1013/e12187/T421739T434255.htm#3547893

  • Custom data centers

    I created several CDC that we use for the management of capacity, but recently noticed that it does not automatically update with the new groups added to the environment in. Does anyone know how I can get a CDC auto add new members in the area which I define as my CDC

    Here it is my CDC production and as you can see the new cluster its not added. It doesn't seem to be a parent object that I can select (in this case windows or linux) that will automatically add new groups

    CDC.png

    Today, custom data centers do not have an automatic fill criteria are met that statically. However, I agree with you that it would be an advantage to have this capability, similar to the how custom groups to have rulesets. Others that the obvious benefits of Datacenter Custom ojcts be exploited with WLP capabilities, I use these global organizational construction groups of cluster for the analysis of high level. This high-level analysis is in the form of capacity planning, calculation, efficiency and so on. This cap of model capabilities are not present in custom groups (CGs simply show the distribution of the population), which make the data centres custom unique positions for the aggregation of CLuster and analysis without the need to be creative with the SMs and the views to try to make them 'cap-model-like. "

  • Clone from model to model

    I need a simple script PowerCli to clone a model ESXi 4.1 on a data store to a template on another data store.

    No luck, the cmdlet PowerCLI 4.1 New Template have yet the parameter of the model .

    An alternative is to temporarily convert the source model in a virtual machine (with the cmdlet Set-model ), then make the new model with the setting of the Virtual MACHINE and once completed convert the virtual machine to a model (with the Set-VM cmdlet and the ToTemplate switch).

    A few extra steps, but that should work in PowerCLI 4.1

  • Reports on multiple virtual centers and export to CSV format

    Everyone,

    Does anyone know if possible a way for me to do the following in the following format.

    Requirements:

    (1) report on multiple virtual centers

    (2) export results to CSV or Excel with a title between each virtual Center

    (3) the need for Virtual Center Cluster belongs, name of the Cluster, host number of ESX and number of virtual machines. (Additional information can be added to the report later).

    It would be not so hard if I could just connect and report on all virtual centers and my results to export in this way.  However, each virtual server Center have a different purpose and that is how senior management wants to see the results.

    For example:

    VC3 VC1 and VC2 = service server environment

    VC4 and VC5 VC6 = service Workstation environments

    VC7 VC8 = environment of Cloud Computing Services

    What I would do is:

    (1) connect to the first 3 virtual centers and collect the above information.

    (2) I would like to create a title in the CSV or Excel named 'Standard Server environment summary'

    (3) then I would like to export these 4 columns with data for each cluster.

    Cluster is managed by this Virtual Center, the name of the Cluster, number # VM and ESX host

    I then unplug the 3 first virtual centres.

    Next

    (1) I would like to connect to the 3 next virtual centres

    2) add to the previous CSV or Excel with a title 'desktop environment summary.

    (3) export the same information as above in the CSV file

    Any help would be greatly appreciated.

    Try something like this

    $vcenters = @{}
    $vcenters["Server Environment"] = @("VC1","VC2","VC3")
    $vcenters["Workstation Environment"] = @("VC4","VC5","VC6")
    $vcenters["Cloud Environment"] = @("VC7","VC8")
    
    Set-PowerCLIConfiguration -DefaultVIServerMode Single -Confirm:$false | Out-Null
    $vcenters.GetEnumerator() | %{
      &{foreach($vc in $_.Value){
          $currentvc = Connect-VIServer -Server $vc      Get-Cluster -Server $currentvc | %{
            New-Object PSObject -Property @{
              "Cluster is managed by VC" = $currentvc.Name          Cluster = $_.Name          "# of ESX hosts" = @($_.ExtensionData.Host).Count          "# of VM" = Get-View $_.ExtensionData.Host -Server $currentvc |          %{@($_.Vm).Count} |          Measure-Object -Sum |          Select -ExpandProperty Sum        }
          }
        }} | Select "Cluster is managed by VC",Cluster,"# of ESX hosts","# of VM" |  Export-Xls -Path C:\report.xls -WorksheetName $_.Name  Disconnect-VIServer -Server $currentvc -Confirm:$false}
    

    You will have to render the Xls export function.

    Simplest is to include in the script with the code above.

    The name of the group is reflected in the name of the worksheet, having a separate line would be a little more difficult.

  • How to create the new folder in the title of data centers

    I have a data center called 'DR', which I can't seem to create a folder under the root with PowerCLI. Whenever I try to try: new-folder-name-location Test (Get-Data Center DR) it does not place the folder everywhere perceptible in the GUI. I only see it if I do: Get-folder or Get-file-name Test.

    Any help would be appreciated.

    Thank you.

    You are in the computers view virtual and models of vSphere Client by chance?  Because the file is not there.  It'll be in the hosts and Clusters discovered.  You can tell by the 'Id' of the folder property in your screenshot.  The 'h' in "File-group-h265" essentially tells the view of "Hosts and Clusters".  You should see a 'v' here instead of him was in the models and virtual computers discovered.  An excerpt from the "New folder" command help page for help:

    -Map

    Specify a container object (for example, a folder, a list of resources and so etc.) where you want to place the new folder. If a data center is specified for the - Location parameter, then the file is created in the folder "hostFolder" and contains hosts and clusters. The "hostFolder" is a system folder and is guaranteed to exist.

    Since a data center can contain folders, objects VM and host and cluster, you must specify what "view" to create your folder in.  There are some files hidden (for lack of a better term) that technically the child objects are data centers.  We're called 'vm' and another is called 'host '.  So, if you were to run this command:

    Get-Folder vm
    

    You should get a record returned for each datacenter, you (and all the folders that you simply named 'vm' because the folder names need not be unique).  You could also run ' host of Get-file ' and also to get a folder of "host and Cluster view" for each datacenter you have.

    Given that the cmdlet New-folder by default is the 'host' of the data center specified folder, a way you could force it to be created in the "vm" folder with a command like this:

    Get-Folder vm | ?{$_.Parent.Name -eq "DR"} | New-Folder "YourNewFolderName"
    

    Maybe it's not the quickest way to accomplish the task, but it should work for you, assuming that my intuition need you according to the evil the vSphere Client inventory is correct, of course.

  • vSphere data centers

    What are the guidelines / best practices when separated data centers to be used in vSphere?

    Thank you

    network traffic would be depends on how you have your configuration of VLAN.  Don't forget it's just a virtual data center, it does not isolate anything by default.

    For permissions, I prefer to use folders (models and virtual computers), and then assign roles and permissions to the folders.

Maybe you are looking for

  • Pavilion dv7: lost all my art background Win 7 win 10 update

    Hi all I've updated recently for Windows 10.  Something that I really don't think at the time was that this could remove all the art of the beautiful wallpaper which was commissioned by HP in 2012 of artists talented for Windows 7.  In particular, th

  • HP Laserjet C3916A: HP Laserjet C3916A DRIVER

    Hello I'm looking for a driver for this printer and Windows 8.1. Can someone help me please? Thank you very much Vincent

  • Another failure of SP2

    Function update SP2 fails... What is after the other updates correctly.   I get an error saying that it failed.  Well have SP1.  With the help of Ultimate 64.

  • Passing parameters to windows Explorer

    There used to be a way to make Windows Explorer open in a specific folder. This was done from the command line or a batch file. Is it still possible with the version of Vista that I like to do it under the control of the program from VBA in Access 20

  • File Explorer opens when the laptop is load / plugged

    Just bought a Lenovo G50 yesterday and now when I reboot it while charging, it opens "This PC" to start Windows. I searched and searched - that doesn't happen when I'm doing a secure boot and happens when I do a clean boot and disable all. If I unplu