deployment of a virtual machine in a paralytic using the api

Hello

How to deploy a vm in to an existing paralytic using the vcloud director api? I see this:

POST /vApp/ {identifier} / action/deployment

But I how to simply deploy a virtual machine in a public catalog in this paralytic?

Thanks - Oli

I found what I was looking for here:

http://pubs.VMware.com/VCD-51/topic/com.VMware.vCloud.API.doc_51/GUID-667B71BD-6F00-4223-9A12-3CCBE5D215AF.html

Tags: VMware

Similar Questions

  • Create several virtual machines on Vsphere multiple using the spreadsheet V2

    After much tinkering with the orginal VM deployment script, I brought a lot of improvements over the old.  I'm still learning my way powercli... It is not a pretty looking code, but it does the job...  I hope it helps

    The script is designed for a windows model that has two hard disks and two card WLAN.  Virtual machines are configured after their deployment to suit the needs of the customer.  You should be able to modify the script to fit your needs.

    The script file and sample xls is attached.

    Features:

    1 deploy VMs of template file and comstomization using worksheet

    2 customization of VM after the deployment of the VM

    3 multi-thread

    4 deploy VM on vSphere servers.

    5 creates the log file

    6 create notes, the date and the user who made the VM VM

    Columns of the worksheet: (the script is designed to go from line 6.  You can change it in the script)

    The virtual computer name. Host name | CPU | RAM (GB) | DISK2 (GB) | DISK3 (EN) | Nic1 connection | Name of the model. Data store | Notes

    #VM Deployment script by David Chung 8/12/2011
    #This script is multithreaded VM deployment script using spreadsheet across multiple vsphere servers.
    #
    #It will log the result in C:\scripts\log\ folder
    #Copy autobuildv2.xls to C:\scripts folder.
    
    # --- Note that our windows standard template has two hard drives and two network (lan and backup) ---
    # --- Depending on customer requirement, CPU, RAM, Disk size, and Network VLAN connection changes. ---
    
    # Spreadsheet file should be:
    # VM name | Host name | CPU | RAM (GB) | DISK 2 (GB) | DISK 3 (GB) | NIC1 Connection | Template name | DataStore | Notes
    
    #Use following command to launch the script
    #./autobuild [spreadsheetname]
    
    
    param( [string] $file)
    
    #Update User ID and Password
    $user = 'username'
    $password = 'password'
    
    if ($file -eq ""){
        Write-Host
        Write-Host "Please specify spreadsheet file name eg...."
        Write-Host "./autobuildv2.ps1 spreadsheetname.xls" -ForegroundColor yellow
        Write-Host ""
        Write-Host ""
        exit
    }
    # Replace with your virtual center name
    $v1 = 'labvirutalcenter'
    $v2 = 'testvirtualcenter'
    $v3 = 'productionvirtualcenter'
    $v4 = 'drvirtualcenter'
    
    $dt = Get-Date -Format d
    
    #Connect to VI server using saved credentials
    
    #$credlb = Get-VICredentialStoreItem -Host $v1 -File C:\labcredential.xml
    #Connect-VIServer $credlb.Host -User $credlb.User -Password $credlb.Password
    
    #$credpd = Get-VICredentialStoreItem -Host $v3 -File C:\pdcredential.xml
    #Connect-VIServer $credpd.Host -User $credpd.User -Password $credpd.Password
    
    #$credts = Get-VICredentialStoreItem -Host $v2 -File C:\tscredential.xml
    #Connect-VIServer $credts.Host -User $credts.User -Password $credts.Password
    
    #$creddn = Get-VICredentialStoreItem -Host $v4 -File C:\dncredential.xml
    #Connect-VIServer $creddn.Host -User $creddn.User -Password $creddn.Password
    
    #open excel and read values
    $xls = new-object -com Excel.Application
    $path = "C:\scripts\" + $file
    $xls.Workbooks.Open($path) | Out-Null
    
    # Removes any existing jobs
    Remove-Job *
    
    # Starts from Row 6 on the spreadsheet
    $Row = 6
    
    # Loop starts
    for ($name -ne $null)
    {
        $name = $xls.Cells.Item($Row,1).Value()
        $vhost = $xls.Cells.Item($Row,2).Value()
        $cpu = $xls.Cells.Item($Row,3).Value()
        $memgb = $xls.Cells.Item($Row,4).Value()
        $dgb = $xls.Cells.Item($Row,5).Value()
        $dgb2 = $xls.Cells.Item($Row,6).Value()
        $net = $xls.Cells.Item($Row,7).Value()
        $temp = $xls.Cells.Item($Row,8).Value()
        $nfs = $xls.Cells.Item($Row,9).Value()
        $desc = $xls.Cells.Item($Row,10).Value()
        $vmdisk = $dgb * 1048576
        $vmdisk2 = $dgb2 * 1048576
        $memmb = $memgb * 1024
        $cp = $Row - 6
    
    # End of the loop when there is no data in the row.
        if ($name -eq $null) 
        { 
            Write-Host ""
            Write-Host ""
            Write-Host "(" $cp ") VM Build in progress.  Please check virtual center for detail." -ForegroundColor Magenta
            Write-Host "The script will end when ALL VMs are completed." -ForegroundColor Magenta
            
            # Waits until all jobs are finished
            while ((Get-Job | where {$_.State -eq "Running"}).getType -ne $null)     
            {     
            Sleep -Seconds 10     
            } 
            
            # Stops Excel process
            Stop-Process -Name "Excel"
            Write-Host ""
            
            # Writes Jobs in to log file
            $Date = Get-Date
            $logfile = "C:\scripts\log\autobuild" + "_" + $Date.Day + "-" + $Date.Month + "-" + $Date.Year + ".txt"
            if (-not (test-path c:\scripts\log\))
                {
                MD c:\scripts\log | Out-Null
                }           
            Receive-Job * | Out-File -Encoding ASCII -FilePath $logfile -Append
            Remove-Job *
            
            Write-Host "Automated VM build is completed." -ForegroundColor Yellow
            Write-Host ""
            Invoke-Item $logfile
            exit
        }
        
                
        # Select the correct customization script
        if ($temp -eq "Win2K3-32")
        {
        # Customization script name
            $cust = "Win2003_32bit"
        }
        elseif ($temp -eq "Win2K3-64")
        {
        # Customization script name
            $cust = "Win2003_64bit"
        }
        
        elseif ($temp -eq "Win2K8R2")
        {
        # Customization script name
            $cust = "Win2008"
        }
                
        #if no customization script is selected, break out of the script
        else
        {
            write "Your Guest Customizations are wrong"
            break
        }
        
    #Select Vsphere server name based on ESX host name provided
        if ($vhost -like "ESXLAB*")
        {
            $v = $v1
        }
        
        elseif ($vhost -like "ESXTST*")
        {
            $v = $v2
        }
        
        elseif ($vhost -like "ESXPRD*")
        {
            $v = $v3
        }
        
        elseif ($vhost -like "ESXDR*")
        {
            $v = $v4
        }
        
        #if incorrect host names are selected
        else
        {
            write "Please input correct host name"
            break
        }
        
        # Launch Multi-threaded job (VM build and configure)
        $job = 
        {
        $in = $input.'<>4__this'.read(); 
        
        Add-PSSnapin 'vmware.vimautomation.core'
        
        $vmdisk = $in[5] * 1048576
        $vmdisk2 = $in[6] * 1048576
        $memmb = $in[4]* 1024
        
        #VM note (description, deployed by: username, and build date)
        $onwer = Get-Acl
        $deployed = $onwer.owner
        $note = $in[10] + '  |  Deployed by:' + $deployed + '  |  Created:' + $in[13]
        
        #Connect to VI server
        Connect-VIServer $in[11] -User $in[14] -Password $in[15]
        
        #Build VM and configure
        New-VM -Server $in[11] -vmhost $in[2] -Name $in[1] -Template $in[8] -Datastore $in[9] -DiskStorageFormat thin -OSCustomizationSpec $in[12] -Location "Discovered virtual machine" -Description $note
        Set-VM -Server $in[11] -vm $in[1] -Numcpu $in[3] -MemoryMB $memmb -RunAsync -Confirm:$false
        $disk = Get-VM $in[1] | Get-HardDisk | ? {$_.Name -eq "Hard disk 2"}
        Set-HardDisk -harddisk $disk -CapacityKB $vmdisk -Confirm:$false
        if ($in[6] -gt 0)
            {
            New-HardDisk -Server $in[11] -VM $in[1] -CapacityKB $vmdisk2 -Confirm:$false
            }
        $vmnet = Get-VM $in[1] | Get-NetworkAdapter | where { $_.Name -eq "Network Adapter 1" } 
        $vmnet | Set-NetworkAdapter -NetworkName $in[7] -StartConnected:$true -Confirm:$false
        }
        
        # pass variables in to jobs
        $jobspec=@()
        $jobSpec += $job
        $jobspec += $name
        $jobspec += $vhost 
        $jobspec += $cpu 
        $jobspec += $memgb
        $jobspec += $dgb 
        $jobspec += $dgb2
        $jobspec += $net 
        $jobspec += $temp
        $jobspec += $nfs
        $jobspec += $desc
        $jobspec += $v
        $jobspec += $cust
        $jobspec += $dt
        $jobspec += $user
        $jobspec += $password
        
        #start the job    
        Start-Job -InputObject $jobspec -ScriptBlock $jobspec[0]
        
        Write-Host ""
        Write-Host $name " VM is being deployed on " $v -BackgroundColor Green -ForegroundColor Black
        Write-host ""
        
        
        $Row++
    }
    
    
            
    
    

    Good script, a lot of interesting features in there.

    Thanks for sharing.

  • Can you pass offline virtual machines between data warehouses using the 'Migration' with the basic Kit Essentials feature?

    I speak not of Essentials Plus vMotion between hosts or migration of VMS between hosts and data warehouses online. Just curious to know if its possible to off a virtual machine and click the button to migrate to another store of data with the basic Essentials bundle.

    Welcome to the community - Yes you can - it's what we call a cold migration.

  • Creation of the virtual machine on a cluster using the vmcreate.pl script

    Hello

    I checked a few posts on this forum on how to create the virtual machine through vmcreate.pl, but responses was not so clear to me...

    These are the topics I've read:

    Create a VM on the Cluster instance

    How to configure the managed object HostSystem

    So, I would like to create a virtual machine on a Cluster, and not on a specific host. The vmcreate.pl script would have done the job? Or should I change it?

    In the topic = > VM create instance on Cluster I did not quite get, what I need to change...

    That's what I do:

    vmcreate.pl - server 'ESX NAME' - username "LOGIN" - password 'PASS' filename - vmcreate.xml - schema vmcreate.xsd


    Result:

    Creation of the 'myTestMachine ': VM error

    SOAP fault:

    -----------

    Error string: InvalidArgument

    The fault detail: InvalidArgument

    Here are the values of the XML file:

    < name > myTestMachine < / name >

    blah < Home > < / Host >

    blah < Center > < / Center >

    > Guest Id < Linioch < / comment-Id >

    blah < Datastore > < / Datastore >

    < > 2048 Disksize < / Disksize >

    > 256 MB memory < < / memory >

    < processor number > 1 < / number processor >

    < Nic-network > < / Nic-network >

    < Nic-Poweron > 1 < / Nic-Poweron >

    The values are correct the cause I checked the other perl scripts.

    Thanks in advance for your help

    Michal

    Thanks to xyz222 for the user and post Re: instance of VM to create the Cluster

    I was able at the end of the problem. So simple... The value of the in the xml file should be for example "rhel6_64Guest" and not a random word... that's all!

    sudo./vmcreate.pl--serveur SERVER - LOGIN - password PASS - filename... username/SampleData/vmcreate.xml - schema... /Schema/vmcreate.xsd

    Successfully created the virtual machine: 'teeest2' under host HOST_NAME

  • How many virtual machines can be run using the bridge at the same time?

    I'm on Win 7 and XP both in Bridge mode. every time the two machines lights I lose the entire network including the host NIC connection. Once I have change the VM to NAT connection I can resume normal activity. Mode bridge on 2 or more VMs is not a supported configuration? Can someone please clarify? I'd appreciate the help.

    Thank you

    The default value for switch ports is often the "Desktop" mode, which limits access to the only 2 (port security) MAC addresses. If you need more the port need to be configured as a port of "access".

    André

  • Folder path as a VM property - for virtual machines in a paralytic

    Hello

    I used the new-viproperty of LucD script to create a folder for each virtual computer property in my inventory. It works perfectly well for virtual machines, but not for virtual machines in a paralytic as these do not have a 'record' in powercli property. they report a $null value.

    Would be much appreciated if someone can help me to modify this script so it creates a VM property for the VMS and VMs in a paralytic?

    http://www.lucd.info/2012/05/18/folder-by-path/

    01

    02

    03

    04

    05

    06

    07

    08

    09

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    25

    26

    27

    28

    New-VIProperty-Name'BlueFolderPath' -ObjectType 'VirtualMachine'-Value{

        param($vm)

        functionGet-ParentName{

            param($object)

            if($object.Folder){

                $blue= Get-ParentName$object.Folder

                $name= $object.Folder.Name

            }

            elseif($object.Parent -and$object.Parent.GetType().Name -like"Folder*"){

                $blue= Get-ParentName$object.Parent

                $name= $object.Parent.Name

            }

            elseif($object.ParentFolder){

                $blue= Get-ParentName$object.ParentFolder

                $name= $object.ParentFolder.Name

            }

            if("vm","Datacenters"-notcontains$name){

                $blue+ "/"+ $name

            }

            else{

                $blue

            }

        }

        (Get-ParentName$vm).Remove(0,1)

    }-Force| Out-Null

    Check if the new version works for you.

    New-VIProperty-name 'BlueFolderPath' - 'VirtualMachine' - value {ObjectType

    Param ($VM)

    Function Get-ParentName}

    Param ($Object)

    if($Object.) {Folder)

    $blue = get-ParentName $object. Folder

    $name = $object. Folder.Name

    }

    ElseIf($Object.) VApp) {}

    $blue = get-ParentName $object. VApp.ExtensionData.ParentFolder

    $name = $object. VApp.Name

    }

    ElseIf ($object - is [VMware.Vim.ManagedObjectReference]) {}

    $folder = get-VIObjectByVIView - MORef $object

    $blue = get-ParentName $folder. Parent

    $name = $folder. Name

    }

    ElseIf($Object.) Parent - and $object. Parent.GetType (). Name - as a ' file * ') {}

    $blue = get-ParentName $object. Parent

    $name = $object. Parent.Name

    }

    ElseIf($Object.) ParentFolder) {}

    $blue = get-ParentName $object. ParentFolder

    $name = $object. ParentFolder.Name

    }

    If ("vm", "Data centers" - notcontains $name) {}

    $blue + "/" + $name

    }

    else {}

    $blue

    }

    }

    (Get-ParentName $vm). Remove (0.1)

    } - Force | Out-Null

  • Deploy a new virtual machine from a template

    Is there a workflow avaiable to deploy a new virtual machine from a template?  I tried using the Clone Virtual Machine, no workflow customization but receive an error saying, "task"CloneVM_Task"error: a specified parameter was not correct."
    "Spec.Location.pool (name of the dynamic Script Module: vim3WaitTaskEnd #20).

    When I use a template as a source of VM.

    I can't find any documents pointing to the deployment of the model.

    Hello

    It's the right workflow, but you must provide a pool of valuable resources for this workflow. If you do not resource pools, it can be shown in a vCO to root in the inventory (vCenter does not work).

    Christophe.

  • the virtual machine monitor driver required by the virtual machine is missing

    Hello
    After you install virtual pc xp2 and when I run this program I got this messege (the virtual machine monitor driver required by the virtual machine is missing)
    What is the answer

    Hi jameelaswad,

    The question you have posted is better suited in the forums of Virtual PC. Please see the following link for more information.

    Windows Virtual PC / Windows XP Mode Forum

  • Can't export virtual machines: unable to connect to the remote server

    Hello

    I'm working on vSphere client 5.1 (vCenter Server 5.1). Trying to export a virtual machine for distribution model. When I go to file-> export the template OVF..., I get the following error message:

    Can't export virtual machines: unable to connect to the remote server

    Remote not sure what/who he is not able to connect to. If I connect vSphere Web Client and navigate to the same model (or all other models), under 'All the Actions of vCenter' I don't have an option to export to the model of the FVO. But if I use a VM machine instead of a virtual machine template, I have the ability to export to the OVF, but it is grayed out.

    Am I missing any customer authorization or plugin for vShpere?

    Discovered that vSphere server had some modifications made by HIM to resolve the violation POODLE. HE had to set the ip address of the machine where export OVF will be performed. Which allowed the connection to establish vsphere client and perform an export of the FVO.

  • backup of the virtual machine fails HotAdd mode if the virtual machine is running?

    backup of the virtual machine fails HotAdd mode if the virtual machine is running?

    sometimes. When vmware tools is outdated, some os comments will be omitted to suspended snapshot. During this time, the backup may have failed.

  • Not possible to export a list of virtual machines that are created in the past 7, 30, 120 and 180 days since an imported csv file containing the date of creation of virtual machine

    Not possible to export a list of virtual machines that are created in the past 7, 30, 120 and 180 days since an imported csv file containing the date of creation of virtual machine. My questions is the correct statement to the variable: $VmCreated7DaysAgo: $_CreatedOn "-lt" $CDate7.

    # #SCRIPT_START

    $file = "C:\Users\Admin\Documents\WindowsPowerShell\08-18-2014\VM-Repo.csv".

    $Import = import-csv $file

    $VMCreatedLast7RDayRepoFile = "C:\Users\Admin\Documents\WindowsPowerShell\08-18-2014\Last7Days.csv".

    $start7 = (get-Date). AddMonths(-1)

    $CDate7 = $start7. ToString('MM/dd/yyyy')

    $VmCreated7DaysAgo = $Import | Select-object - property name, Powerstate, vCenter, VMHost, Cluster, file, Application, CreatedBy, CreatedOn, NumCpu, MemoryGB | Where-Object {$_.} CreatedOn - lt $CDate7} | Sort-Object CreatedOn

    $TotalVmCreated7DaysAgo = $VmCreated7DaysAgo.count

    $VmCreated7DaysAgo | Export-Csv-path $VMCreatedLast7RDayRepoFile - NoTypeInformation - UseCulture

    Write-Host "$TotalVmCreated7DaysAgo VMs created in 7 days" - BackgroundColor Magenta

    Invoke-Item $VMCreatedLast7RDayRepoFile

    # #SCRIPT_END

    You can use the New-Timespan cmdlet in the Where clause, it returns the time difference between 2 DateTime objects.

    An example of this cmdley

    New-TimeSpan-start (Get-Date). AddDays(-7)-end (Get-Date). Select days - ExpandProperty

    In your case, you could do

    Where {(New Timespan-démarrer ([DateTime] $_.))} CreatedOn) - end $start7). {7 days - gt}

    But beware of negative numbers.

  • One of the disks of rhe in this virtual machine is already in use by a virtual machine or a snapshot

    Hi all.

    An apologize for my bad English.

    I have 10 VmWare installed on Linux Centos 5.

    I worked with the Windows 7 virtual machine and hang on it.

    Now when I try to run this VM, I get this message:

    "One of rhe in this virtual machine disk is already used by a virtual machine or a snapshot.

    I try to fix it in this way:

    Re: Could not open the hard file. One of the disks in this virtual machine is already in use by a virtual machine or a s...

    mkdir ./clone
    vmware-vdiskmanager -r "Windows 7 x64-000008.vmdk" -t 0 "Windows 7 x64.vmdk"  
    mkdir /backup
    mv *.* ./backup/
    cp ./backup/*vmx ./
    cp ./backup/*vmxf ./
    
    

    But after that, I got the error: "cannot change the power state of VM: can't open ' / * /Windows 7 x 64 - 000008.vmdk.»» The system cannot find the specified file.

    Please, help me to solve the problem.

    Once again apologize for my English :)





    I really don't see what could be causing the problem, except that there are some .lck files in the subdirectory "lock"!

    Anyway, if worry ends snapshots and the current state is what you need, you can follow these steps (which are close to what you have already done) to merge snapshots of virtual disk in and use this virtual disk to the virtual machine:

    • Close VMware Workstation
    • Create a new subdirectory and move the VM files and folders to backup purposes
    • "" since this subdirectory run: vmware-vdiskmanager-r "Windows 7 x 64 - 000008.vmdk" t 1 '... / X64.vmdk of Windows 7 '
    • Copy the .vmx file to the parent directory and edit it as follows:
      scsi0:0.fileName = "Windows 7 x 64 - 000008.vmdk" --> scsi0:0.fileName = "Windows 7 x64.vmdk"

    Now you should be able to start the virtual machine with the cloned virtual disk.

    André

  • Virtual MACHINE disk, but not in the inventory

    I have a virtual machine that has disappeared from the inventory, but is still in the (non-local) data store. In my view, that it was off. I tried to add to the inventory, but received a message that a virtual machine is already registered with that name. I believe that these are the steps that led to this State:

    I had a consultant in an ESXi host to replace it with a new one and a few weeks ago. All virtual machines have been moved out of the old host. The virtual machine in question was arrested that we did not use it. I just noticed today that it was not in the inventory because now I'm ready to use it.

    Another change that happened a few weeks ago was replacement unit vCenter vCenter. I don't know if who had nothing to do with him or not.

    Any suggestions how I could see the virtual machine in the inventory again?

    Hello

    As you can see this message, "received a message that a virtual machine is already registered with that name", while adding another virtual machine name use inventory. However, be sure that this virtual machine is not already.

    Concerning

    Mohammed

  • What concurrent virtual machines are launched to start the failover or failover test

    Hi friends,

    What the simultaneous virtual machines are started when the failover or failover test is started?

    6 virtual machines are cocurrently recovered or the number can be configured?

    Thank you.

    Hello

    The number of virtual machines simultaneously recovered was 2 virtual machines per host up to a maximum of 20 virtual machines with MRS. 4.x ( http://www.vmware.com/files/pdf/VMware-vCenter-SRM-WP-EN.pdf document "Best Practices" 18 States, but I have seen 20 myself several times).

    With SRM 5 the number is unlimited by default (http://www.vmware.com/files/pdf/techpaper/srm5-perf.pdf, page 13), but can be changed (overall or specific cluster): http://blogs.vmware.com/uptime/2011/10/working-at-the-edge-of-srm-5-limits.html

    Michael.

  • From virtual machine automatically at startup of the host

    Hello

    I'm trying to find how to start a virtual machine automatically at startup of the ESXi host.  I think I did in ESX 3.5, but have so far been unable to find a similar feature in ESXi.

    Is this possible in ESXi?

    Thank you!

    I do not use ESXi, but if you go to the Configuration of your ESXi host and then virtual Mahcine start/stop tab is a box of properties in the right corner?  If so, like ESX, this is where to put it

Maybe you are looking for

  • How to find the owners of icloud id?

    IM new to this thing from icloud, I bought 3 old ipads2 on a flea market, where unlocked 2 but we have icloud, the screen is not the old owner alone info [email protected], I don't have a problem, try contacting the owner, but how to find the id of owne

  • Can I put dv7 laptop computers for the backlit keyboard? 6143CL &amp; 4183 CL

    I have two laptop dv7 which are 2-3 years. (Bought at COSTCO - models see below.) Question: Can I put these units for the backlit keyboard? Thank you, Ed. My Info: laptop dv7 6143CL Windows 7 Product name: HP Pavilion dv7 Notebook PC laptop dv7 4183C

  • Attention owners Studio XPS 1640/1645/47 and Studio 1747

    Please note that the communication is mailed this week to all parts of the Dell Technical Support issues replacement for systems of Studio XPS 1645.   At this stage we will treat PMs asking 130w replacement cards to be sent.    Please contact the Tec

  • Launch after effects CC Version 13.6.1.6 2015 problem

    Hi, I had a few difficulties to launch after effects CC 2015 Version 13.6.1.6.Whenever I try to open it, it gives me a series of dialog boxes, as shown.I checked the system requirements and my Office meets the requirements.I can run other application

  • Duplicate content XML child nodes

    Hi allI received below XML Developer example data and they need to load the data in table in the Oracle (10g) database.< table >< lines >< row >< CellCount > 3 < / CellCount >cells Tom John < cell > < / cell >< cell > [email protected] < / cell >< cell > 20