Using PowerCLI with Flexclone rapidclone re - deploy multiple servers daily

Hello

We currently use vSphere4.1 with SAN NetApp Flexclone Rapidclone installed We have deployed multiple servers with success of a model of Flexclone using rapidclone.

The servers in question are Windows 2008 RDS servers, which we would like to destroy and recreate on a daily basis.

We want to make use of the feature to "Redeploy" Flexclone, which will equip the servers and redploy image, but we want to do this on a planning automated nightly.

There are not many examples on the web on how to do it and with which application.

I suppose the obvious choice to be PowerCLI, but don't have any idea how to write the script.

Can anyone provide information on how to go about starting this script, or if there is a record of the tool that will convert mouse movements in vSphere PowerCLI commands. I tried to use Onyx 2.0 but for some reason it produces no output when cloning using "NetApp - implemented service & cloning" in the context menu in vShpere.

Any help would be much appreciated.

Kind regards

New year's Eve.

I think that this rapidclone does not use methods public vSphere API.

This probably explains why you don't see nothing in Onyx.

This rapidclone comes with API and/or the cmdlets?

Tags: VMware

Similar Questions

  • All trying to deploy Linux VM model using PowerCLI, during customization in error that "do not provide dns when you create NIC mapping for customization with type 'Linux" ".

    All trying to deploy Linux VM model using PowerCLI, during customization in error that "do not provide dns when you create NIC mapping for customization with type 'Linux" ".

    See my response on the other thread where you posted the same question.

  • deploy multiple virtual machines using vmdk and SID file

    Hello

    Need to know if I am correct or miss me something... I deploy many virtual machines using method.

    1. remove the vmdk files a XP.

    2. create new folders and copy the vmdk into this folder.

    3. create virtual machines using existing vmdk files.

    4 rename the computer and join it to the domain.

    My question is, my VMDK files are an existing xp VM (no longer exist), what is the status of the deployed virtual machines? they still have the same SID or it is changed? I managed to join to the domain, but do not want surprises in the future.

    Note:

    I had another option, could have all these automated with new SID using PowerCLi, unfortunately, osCustomization has default, I can't event run the get-OsCustomization command, it keeps failing.

    Thank you.

    Yes, Windows writes the SID on disk (virtual disk for virtual machines) or physical disk for physical machines.  The guest operating system has no idea on the vmx file.

    Dave

    VMware communities user moderator

    Now available - vSphere Quick Start Guide

    You have a system or a PCI with VMDirectPath?  Submit your specifications to Officieux VMDirectPath HCL.

  • How to use Apple time machine to back up multiple pc, I have an ipad, hp (WINDOWS 7, AND the door of ENTRY WITH XP

    How to use Apple time machine to back up multiple pc, I have an ipad, hp (WINDOWS 7, AND the door of ENTRY WITH XP

    Hi David,

    Time Machine is a backup utility in built for the Mac operating system that works with your Mac and a (sold separately) external hard drive or Time Capsule airport. You can go through the article to get the idea of base on the application.

    The basics of the Mac: Time Machine

    http://support.Apple.com/kb/ht1427

    You can go through the items in the link for your reference.

    Time Machine

    http://www.Apple.com/in/support/TimeMachine/

    I suggest you to contact the Apple support forums for help on the issue.

    https://discussions.Apple.com/index.jspa

    Do not hesitate to contact us for any information related to Windows.

  • PowerCLI: Deploying VM problem of model using PowerCLI

    Hi all


    I'm trying to deploy [clone] virtual machines from a template that is located in a NFS using PowerCLI script.

    First the script will add the NFS to the ESX host. Since NFS added, it will save the file .vmtx to the inventory. Then, the model, it will deploy as many virtual machines as specified in the XML file.
    But after adding the NFS, when the script tries to enumerate on the 'data warehouses' available, the added NFS shows for some hosts. So in turn, the le script script fails.

    I am running PoweCLI 5.0 and host is ESXi 5.0

    The script used is

    function Reg_Template
    {
    Param ($hsname, $dsname, $DSPath, $TMPNAME)
    $strMyHostName = $hsname
    $dsBrowser = get-View (Get-View (Get-VMHost-name $hsname) USER.USER). DatastoreBrowser
    $dcname = get-datacenter - VMHost $hsname
    $folder = get-View (Get-data center-name $dcname |) Get - Folder - name "vm") USER.USER
    foreach ($dsImpl to $dsBrowser.Datastore)
    {
    $ds = get-views $dsImpl
    if($DS.) Summary.Name - not $dsname) {continue}
    $strMyTemplateDatastorePath = '[' + $ds. Summary.Name + "]" + "" + $dspath
    # get the View .NET object for the destination folder
    $viewDestinationFolder = get-view ViewType - file-name of the property - filter @{'Name' = $folder.name}
    (# save the model third param $true means to register as a model)
    $taskMoRef = $viewDestinationFolder.RegisterVM_Task ($strMyTemplateDatastorePath, $tmpname, $true $null,')
    (Get-view ViewType-HostSystem property name - filter @{"Name" = $strMyHostName}). MoRef)
    $task = get-views $taskMoRef
    While ($task.info.state - eq "running" - or $task.info.state - eq "on hold")
    {
    $task. UpdateViewData ("Info.State")
    }
    If ($task.Info.State - eq "success") {break}
    on the other
    {
    Write-Host $task.Info.State
    recorder $fh1, 1, "Failure adding" $tmpname "to" $hsname
    }
    }

    Can someone give cela seconds and check whats up.

    Thanks in advance.

    Can you try to add after you create the data store based NFS?

    Get-VMHostStorage - RescanVmfs

    On all your servers ESX (i)

  • Is it possible to interact with the guest virtual computer console using PowerCLI?

    I'm trying to automate the installation of Linux on the ESXi systems.  Installing Linux is all from the command line.  Is there a way that I can interact with the console or shell comments VM using PowerCLI?

    In my view, customization works only with officially listed linux distributions.

    Kind regards

    Nedko Nedev

    PowerCLI development team

  • Deploy multiple virtual machines simultaneously

    Hello

    I'm trying to deploy multiple virtual machines at the same time using powercli.  I think I have has the switch - RunAsynch, howerver, this doesn't seem to work, instead of that virtual machines are deployed one at a time.  Here is my code:

    SE connect-VIServer-Server vc1. MYDOMAIN.local - user MYDOMAIN\MYACCOUNT-password MYPASSWORD

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR01 - model W2K8R2SP1 - IOMEGA data store - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR02 - W2K8R2SP1 - IOMEGA data store model - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR03 - W2K8R2SP1 - IOMEGA data store model - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR04 - W2K8R2SP1 - IOMEGA data store model - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    Start-Sleep - seconds 300

    Get - vm "TEST-SVR01 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get - vm "TEST-SVR02 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get - vm "TEST-SVR03 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get - vm "TEST-SVR04 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get-NetworkAdapter "TEST-SVR01 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    Get-NetworkAdapter "TEST-SVR02 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    Get-NetworkAdapter "TEST-SVR03 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    Get-NetworkAdapter "TEST-SVR04 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    If anyone can help?

    Thank you

    Duncan.

    Yes, you are right.

    By specifying the param -VM (Get - VM $modelVM) , you create the new virtual machine from an existing one.

    Just change the cmdlet New - VM settings according to your needs and let the VM - far.

    It creates your virtual machines based on a template and specification of customization.

    $esxName = "prodh1.MYDOMAIN.local"
    $template = "W2K8R2SP1"
    $datastore = "IOMEGA"
    $newVmList = "TEST-SRV01", "TEST-SRV02", "TEST-SRV03", "TEST-SRV04"
    $custSpec = "W2K8R2SP1"
    $location = "_Tobedeleted"
    $taskTab = @{}
    
    # Create all the VMs specified in $newVmList
    foreach($Name in $newVmList) {
         $taskTab[(New-VM -Name $Name -VMHost (Get-VMHost -Name $esxName) -Template $template -Datastore $datastore -OSCustomizationSpec $custSpec -Location $location -RunAsync).Id] = $Name
    }
    

    Of course, you can write it as before. You will need to only change the $newVmList variable in the original script.

    foreach($Name in $newVmList) {
         $taskTab[(New-VM -Name $Name -VMHost "prodh1.MYDOMAIN.local" -Template" W2K8R2SP1" -Datastore" IOMEGA" -OSCustomizationSpec "W2K8R2SP1" -Location "_Tobedeleted" -RunAsync).Id] = $Name
    }
    

    You will also need to insert the remaining part with the while loop and the customizations in your network!

    http://www.lucd.info/2010/02/21/about-async-tasks-the-get-task-cmdlet-and-a-hash-table/

    Concerning

    Emanuel

  • Determine the use of vCPU using PowerCLI

    Is there a way to determine how many vCPUs uses makes it a virtual machine using PowerCLI?  For example, suppose you try to size just your virtual machines with powerCLI.  If the virtual machine uses several threads, it can use the multiple vCPUs.  If it is mono-thread, it can only use one vCPU even if she has a high workload.  You can determine what virtual machines have multiple vCPUs but use less than they are allocated?

    As much as I know there is no meter that indicates if a core is used or not.

    What you could do, is the use of the CPU, and then check if the assigned processors are required.

    For example, suppose that the average CPU usage is 25%, and the maximum is 50%.

    If this VM has 4 processors assigned, you may deduct 2 CPUs would be sufficient.

    But this isn't an accurate calculation.

    Once you lower the processors assigned to the virtual machine, you will need to see if there's an obvious increase of the ready time.

  • Inventory of VC using powercli

    Hi all

    I'm looking for a script using powercli for several stocks of VCenterservers something like Vcenter name, host name, name of vm, the VM OS. Notes VM, information data store and vm tools release in excel or csv format

    Note: for multiple Vcenters

    You can check the PowerCLI version you are running? You can do it with the Get-PowerCLIVersion cmdlet. The latest version is: "VMware vSphere PowerCLI 5.1 Release 2 build 1012425. If you are using an earlier version, then please install the latest version. You can download this version of http://www.vmware.com/go/powercli.

    The

    Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Scope User -Confirm:$false
    

    command should work in the latest version of PowerCLI.

    Certificate warnings can be removed with the following command:

    Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Scope User -Confirm:$false
    

    To make the script more quickly, I did a new version using the cmdlet Get-View . This new version is about three times faster than the former.

    & { foreach ($vCenterServer in $DefaultVIServers)
        {
          Get-View -Server $vCenterServer -ViewType VirtualMachine -Filter @{"Config.Template"="False"} -Property Name,
            Runtime.Host,
            Guest.GuestFullName,
            Config.Annotation,
            Datastore,
            Config.Tools.ToolsVersion |
          Select-Object -Property @{N="vCenter";E={$vCenterServer.Name}},
            @{N="VMHost";E={(Get-View -Id $_.Runtime.Host -Property Name).Name}},
            @{N="VM";E={$_.Name}},
            @{N="Guest OS";E={$_.Guest.GuestFullName}},
            @{N="Notes";E={$_.Config.Annotation}},
            @{N="Datastores";E={[string]::Join(',',(Get-View -Id $_.Datastore).Name)}},
            @{N="VMware Tools version";E={$_.Config.Tools.ToolsVersion}}
        }
      } |
    Export-Csv -Path VMsInfo.csv -NoTypeInformation -UseCulture
    
  • Using PowerCLI 5.5 instead of 5.0

    CPO 3.1

    PowerCLI 5.5

    CPO seems to use PowerCLI 5.0 by default and cannot be changed I would say.

    I'm working on automation for VDS (virtual switches distributed) and the built in VMware adapter is somewhat limited in this Department as I was trying to use PowerCLI, but even basic commands in 5.5, such as Get-VDSwitch are "not recognized as cmdlets' in my process of CPO where the same functions in my console PowerCLI command I use for testing.

    So am I correct my observation that CPO by default even when 5.0 5.5 PowerCLI is installed? Is there a way to change this? Is there a place to download an upgraded version of the adapter for VMware?

    Lots of error: the PowerCLI script execution succeeded, but returned the following errors:
    The term 'Get-VDSwitch' is not recognized as the name of a cmdlet, function, script file, or an executable program. Check the spelling of the name, or if a path has been included, make sure the path is correct, and then try again.

    5.5 PowerCLI console load this snap-in to start the console.  This new component snap (comes with PowerCLI 5.5) did not exist when the activity was written.  Thus, it is not responsible for activity.  Maybe we can improve the activity in order to allow users to specify plug-in extra so that it loads. :)

  • Using PowerCLI to recover the capacity of volume comments data

    I am using PowerCLI to declare on the volume letter and free space associated with a guest computer.  I am currently addressing this problem through the extensiondata of the VM guest and then placing the properties I want in a PSObject.

    The question that I am running is that numeric values keep coming up as zero when it is inside the loop for, although they correctly resolve by themselves.  One thing I found interesting was these two upcoming properties like "System.Nullable [long"] when executing GetType(), but I don't know if that is related to the question.

    The script is below, and I changed the font color on the problem section.  I'd appreciate any help.

    # Pre - performance Variables

    $USCulture = New-Object - TypeName System.Globalization.CultureInfo - ArgumentList "en - us".

    $USCulture.NumberFormat.PercentDecimalDigits = 2

    $USCulture.NumberFormat.NumberDecimalDigits = 2

    Guest computers #Get

    [table] $vmguests = $vmcluster | Get - VM

    foreach ($vmguest to $vmguests)

    {

    $vmguestinfo = new-Object - TypeName System.Management.Automation.PSObject

    $vmguestinfo | Add-Member - MemberType NoteProperty-Name "Hostname" - value $vmguest.extensiondata.guest.Hostname

    $vmguestinfo | Add-Member - MemberType NoteProperty-Name "GuestState"-$vmguest.extensiondata.guest.GuestState value

    $vmguestinfo | Add-Member - MemberType NoteProperty-Name 'GuestFullName'-$vmguest.extensiondata.guest.GuestFullName value

    $vmguesthdds = $vmguest. ExtensionData.Guest.Disk

    for ($i = 0; $i - lt $vmguesthdds. Length; $i++)

    {

    $vmguestinfo | Add-Member - MemberType NoteProperty-Name ' DiskPath$ I '-$vmguesthdds [$i] value. DiskPath

    $vmguestinfo | Add-Member - MemberType ScriptProperty-Name ' CapacityGB$ I "-value {($vmguesthdds [$i]. Capacity). ToString ("N", $USCulture)}

    $vmguestinfo | Add-Member - MemberType ScriptProperty-Name ' UsedSpaceGB$ I "-value {[System.Decimal]: Subtract ($vmguesthdds [$i].} Capacity, $vmguesthdds [$i]. FreeSpace). ToString ("N", $USCulture)}

    $vmguestinfo | Add-Member - MemberType ScriptProperty-Name ' FreeSpacePercent$ I "-value {[System.Decimal]: Divide ($vmguesthdds [$i].} FreeSpace), ($vmguesthdds [$i]. Capacity). ToString ("P", $USCulture)}

    }

    [table] $vmguestresults += $vmguestinfo

    }

    Thank you

    Yes, he had a few typos in the code.

    I corrected which, in the code and the attachment.

    Try this one.

    I'm afraid that I can't achieve this GitHub repository.

    A search on your GitHub account does not return either

  • Identify DIMM memory installed using PowerCLI

    Hi guys,.

    Does anyone know how identify the DIMM memory installed using PowerCLI?

    With the help of smboisDump, I get the following

    MEMORY: 25 #.

    Geographical area: "DIMM_A1.

    Bank: "CPU 1 CHANNEL 0 DIMM 1.

    Manufacturer: '0xCE00 '.

    Series: "35F3A656."

    Part number: "M393B1K70DH0-YH9".

    Matrix memory: #23

    Form factor: 0 x 09 (DIMM)

    Type: 0 x 18 (DDR3)

    Detail of type: 0 x 2000 (registered)

    Data width: 64-bit (bit ECC + 8)

    Size: 8 GB

    Speed: 1333 MHz

    I would like to be able to get this help PowerCLI, in particular the following information will be of interest

    • Location
    • Part number
    • Type
    • Size
    • Speed


    I need to perform upgrades memory for 50 5.5 ESXi hosts and prefer if I didn't have to read all the smboisDump files and manually copy and paste the information in Excel.

    I have looked at using get-esxcli and get-view but, do not know the correct attributes to select.


    Thank you


    OK, I seem to have bypassed the error.

    Although the CIM server on host Service showed the execution, I have restarted using the following

    CIMService = Get-VMHostService - VMHost $item | Where {$_.} Label - match "CIM Server"}

    Restart VMHostService - $CIMService HostService - confirm: $false


    After that, the previous code worked

    I found the following handy KB VMware http://kb.vmware.com/kb/1025757

    Another good blog for ESX material followed by using PowerShell is physical ESX followed with PowerShell - VMware PowerCLI Blog - Blogs from VMware

    and

    for the CIM of information https://www.vmware.com/support/developer/cim-sdk/smash/u3/ga/apirefdoc/

  • Get a user/group, details of role using Powercli

    Hi all

    I wrote the script to extract the user role by using Powercli below information and got the details.

    $Excel = new-Object - ComObject Excel.Application

    $Excel.visible = $True

    $Excel = $Excel.Workbooks.Add)

    $Sheet = $Excel.Worksheets.Item (1)

    $Sheet.Activate () | Out-Null

    $Sheet.Name = 'vCenter roles. "

    $Sheet.Cells.Item (1,1) = 'name '.

    $Sheet.Cells.Item (1,2) = 'Role '.

    $Sheet.Cells.Item (1,3) = "entity".

    $Sheet.Cells.Item (1.4) = 'entity Type.

    $Sheet.Cells.Item (1.5) = 'vCenter.

    $intRow = 2

    $WorkBook = $Sheet.UsedRange

    $WorkBook.Interior.ColorIndex = 19

    $WorkBook.Font.ColorIndex = 11

    $WorkBook.Font.Bold = $True

    $gps = get-vipermission

    {foreach ($gp to $gps)

    $vc = $gp.uid.split(':@') [1]

    $Sheet.Cells.Item ($intRow, 1) = $gp.principal

    $Sheet.Cells.Item ($intRow, 2) = $gp. Role

    $Sheet.Cells.Item ($intRow, 3) = $gp.entity.Name

    $Sheet.Cells.Item ($intRow, 4) = $gp.entityid.split('-') [0]

    $Sheet.Cells.Item ($intRow, 5) = $vc

    $intRow = $intRow + 1

    }

    $WorkBook.EntireColumn.AutoFit)

    In addition, I am trying to expand the list of privileges using the script below.

    $gvips = get-vipermission | Role of group | Select name

    {foreach ($gvip to $gvips)

    Get-ferrule-name $gvip.name | Select Name, PrivilegeList

    }

    I can find out the name and the list of privileges, but not completely due to the long list of Privlieges for certain roles. I'm out like {xxx.xxxxxxxxxxxxxxxx...}

    As it then not be able to see full privileges.

    If single role that I want to see, then I can run the command get-ferrule-name admin | Select - expandproperty PrivilegeList

    Above command will list the perfect performance. But this command cannot be used for loop with the parameter 'Name '.

    Can anyone suggest me how to get result with all the details.

    Is it possible I can get 2 out of Scripts in a spreadsheet or HTML with SameFormat file.

    Thanks in advance.

    Try like this

    $reportName = "C:\Report.xlsx".

    Get-VIPermission |

    Select Principal,Role,@{n='Entity'; E={$_. Type of Entity.Name}},@{N='Entity'; E={$_. "EntityId.Split('-') [0]}}, @{N = 'vCenter';" E={$_. {{Uid.Split (' @: ') [1]}} |

    Export-Xlsx-path $reportName - WorksheetName permissions

    Get-ferrule.

    Select Name,@{N='PrivilegeList'; E = {[string]: join (",", $_.)} PrivilegeList)}} |

    Export-Xlsx-path $reportName - AppendWorksheet - WorksheetName roles - end SheetPosition

  • Using PowerCLI update CMDB

    I need a guide on how to use PowerCLI to update my CMDB.  For example:

    -J' I create a Virtual Machine in vCenter

    CMDB - one yet knows about this

    -J' have the VMname, IP address, OS vCenter with powerCLI type (this part is easy)

    Then I go and use the same script to hit the API of a commonly used CMDB and update the CMDB.

    Is there a guide for general how to do this or a script example of someone who did it?

    Thank you!

    For example, I use a simple real method:

    Every night a script is on demand making it an export of the vCenters with relevant information, CPU, memory, StorageSpace, etc. VMname.

    It is exported to a CSV file to a shared location.

    Every night he runs a CMDB solution, importing the CSV file and editing the right values. I don't know the name of solutions. Try to understand how you can modify / add CMDB items in your first CMDB software, from there you can begin to build your script to get the relevant information in the right format so your CMDB can add it.

  • VCSA device using PowerCli Configuration (or any other api?)

    Hello

    I was able to deploy aircraft to vcenter server 5.5 using powerCLI.

    Now how to configure it. Here I speak not of the vcsa configuration and NOT vcenter configuration - I hope it makes sense.

    Is there a powercli cmd-left for me to do or should I hit him all vcsa api?

    Please notify.

    Thank you

    RJ

    Hey Luke,

    I scripted it myself and it works!

    AUTOMATE THE DEPLOYMENT OF VCENTER SERVER APPLIANCE. RJ approve this Message!

    And also on my github at rjapproves/VMware - VCSA5.5 - Automation · GitHub

    Thank you

    RJ

Maybe you are looking for