Recompose a list of clone bound virtual machines within a pool using view server connection

Hi all

I use View with ESXi 4.1 4.6, composer is 2.6. Yesterday, I recomposed 8 pools from the mine to the snapshot of the updated gold statue.

I have 140 VM in each pool. I checked today and about 125 to 130 of the virtual machine in each pool has been recomposed the new image, but 10-15 VMS in each pool were not reconstructed. They are currently closed. If I manually turn the, they have the old image.

Now, I want to select just 10-15 VMS thos s in each pool and recompose the. The only options that I can see is to recompose the whole new pool or redial each VM one by one. I don't want to recompose the whole pool again and recomposing each VM individually will take a LONG time.

When I go to desktop computers discovered in the administrator of the display and select the VM not recomposed, I don't get the opportunity to recompose.

Can someone please help.

There were errors, but I was unable to see them and all I could see the gray blocks, but nothing written on them. It seemed that the error windows were suspended by themselves.

Thank you

-Jay

You can select certainly several computers desktop to a redial.  If your sub screen of the inventory of the pool just highlight several desktop computers and select recompose.  You can even choose the View Composer details view to sort by the image that is currently loaded.

If you have problems for a reason, you could look at deleting workstations provided that they are in a floating pool that would simply allow view the based on the default image assigned to the pool to recreate.

Tags: VMware

Similar Questions

  • Clone the virtual machine to the local data store

    Hi all

    I'm looking to automate a task daily (or almost) of my friends with a small script with powercli.

    I'm trying to "backup" or to clone a virtual machine, I work in a storage of one of our servers.

    The servers are managed by a 5.1 vCenter and the machine is on a shared storage.

    From time to time, I clean, stop the machine, remove all snapshots and clone the virtual machine to one of the local server as a backup storage. So I put together a small script which almost works. It works as long as the target data store is a shared storage, but not with a local storage.

    I get always an error that claims it can not access the local data store and is not a permissions problem...

    Given that I can accomplish this via the customer without problem I thought it is possible via powercli too, or I'm wrong?

    My Script up to now:

    # Variables
    $VC = "vc.domain.com" #vCenter Server
    $User = "domain\user" #User
    $Pass = 'test123' #User PW
    $VMName = 'scripttest' #VM
    $BackupSuffix = "backup" #Suffix to add the name of VM to mark this as a backup
    $VmHost = "esx2.domain.com".
    $Datastore = 'ESX2-LocalData' #Datastore
    $BackupFolder = 'Backup' #Folder the VM gets classified


    # Register cmdlets to VMware

    If (-not (Get-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue)) {}

    Add-PSSnapin VMware.VimAutomation.Core

    }


    # Connect to the server

    SE connect-ViServer $VC - user $User-password $Pass


    # Remove the old clone

    $OldBackups = get - VM | WHERE {$_.} {Name: corresponds to '$VMName - $BackupSuffix'}

    If ($OldBackups - don't "")

    {

    If ($OldBackups.Count - gt 1)

    {

    Write-Host "better check! "Found several results:

    Foreach ($VM to $OldBackups)

    {

    Write-Host $VM. Name

    }

    }

    on the other

    {

    Remove-VM - VM $OldBackups - DeleteFromDisk-confirm: $false

    }

    }


    # Clone VM

    $VMInfo = get - VM $VMName | Get-View

    $CloneSpec = new-Object Vmware.Vim.VirtualMachineCloneSpec

    $CloneSpec.Snapshot = $VMInfo.Snapshot.CurrentSnaphshot

    $CloneSpec.Location = new-Object Vmware.Vim.VirtualMachineRelocateSpec

    $CloneSpec.Location.Datastore = (get-Datastore-name $Datastore |) Get - View). MoRef

    $CloneSpec.Location.Transform = [Vmware.Vim.VirtualMachineRelocateTransformation]: sparse

    $CloneFolder = $VMInfo.Parent

    $CloneName = "$VMName - $BackupSuffix".

    $TaskCloneID = $VMInfo.CloneVM_Task ($CloneFolder, $CloneName, $CloneSpec)


    # Check if the task is completed


    $Check = $false

    While ($Check - eq $false)

    {

    $Tasks = get-job | Select State, id | Where {$_.} State - eq "Running" - and $_. State - eq "pending"}

    ForEach ($Task in $Tasks)

    {

    If ($Task.id - eq $TaskCloneID)

    {$Check = $false}

    on the other

    {$Check = $true}

    }

    Start-Sleep 10

    }

    # Move clone to the backup folder

    Move-VM - VM '$VMName - $BackupSuffix' - Destination $BackupFolder


    # Disconnect

    Disconnect-VIServer-confirm: $false

    Can you show us the complete error message you get?

    BTW, the clone step can be replaced by the New-VM cmdlet with the setting of the virtual machine.

  • Clone a virtual machine to a Cluster data store

    Hello

    Really simple (hopefully), but I'm trying to write a workflow that includes the provision of a virtual computer to a cluster of data store. I'm a link to the workflow 'Clone the virtual machine, no customizations' that only accepts a store of input data.

    I hope that I am a bit stupid here and there is a simple answer?

    Thank you.

    There is no simple answer.  DRS clusters are actually a set of rules and not a real thing, you can deploy a VMDK.  I suggest to use Onyx to deploy a virtual computer to a DRS cluster and see what it generates.  If I remember correctly, it executes DRS rules to get a recommendation for where to put a VMDK fundamentally and then uses the exit in order to actually deploy the model.

    I opted to write just a simple workflow that finds the data store with the most of freespace that corresponds to a string - for example, if I have a DRS cluster named DSCluster_ugabuga, I have a lot of data stores named something like "ugabuga... ».  So you ask these storages of data and find the one which most freespace.

  • Clone a virtual machine directly from single ESXi host

    Hi, I want to clone a virtual machine with all the related feathers which the Associate ID (CPU ID, UUID, BIOS ID, etc.) and redeployed on another single ESXi host. It could help me how can I do?

    Hello

    without vCenter server you can accomplish this by check script PowerCLI this useful post below:

    Tools of HL - part 1 - clone a virtual machine without vCenter - notes LucD

    If you want to clone individual disks check this KB:

    VMware KB: Cloning of disks to the individual virtual machine through the ESX/ESXi terminal host

    _________________________________________________________________________________________

    If you have found this device or any other answer useful, please consider to award points. (use the useful or correct)

    Kind regards

    P.

  • VCo workflow to clone a virtual machine of centos. Network interface problem

    Hello

    I use vco workflows to clone a virtual machine of vcenter. The virtual machine is running centos 6.0. When cloning is complete. I see the network eth0 and eth1 interfaces set correctly the static gateway ip and address information I provided. I deleted the 70 - persistent - net .rules on the basic vm form which I clone. So, I get the correct interface names. But when vm powers on and I run "ifconfig eth0" I don't see the IP address of this interface has all the details.  same for the other interface also.

    But if I do a system restart network without changes to networking and then do an ifconfig I see the IP with the previous information.   I don't know why the service network restart is necessary so that he can recognize the ip address.

    Any ideas what I could do wrong. or to avoid this manual step of the execution of the service network restart command on the creation of the vm.

    Thank you

    Kiran

    Yes I'm restarting after after the application of customization.

    Has been able to solve the problem... In CentOS, the network service does not work by default. This is why it does not have network interfaces at startup. So now the machine instant, I started the network services and stop the Network Manager service

    using chkconfig network on

    chkconfig NetworkManager off

    and then cloned from this virtual machine... and apply the customization settings. during the start now it shows the interfaces properly without needing a service restart

  • Error trying to clone a virtual machine

    Hello

    I'm trying to use the vsphere api 5.0 to clone a virtual machine that was created in the web client.

    Here is my XML SOAP message:

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < SOAP-SOAP ENV:Envelope - ENV:encodingStyle = ' http://schemas.xmlsoap.org/SOAP/encoding/ "xmlns:SOAP - ENV =" " http://schemas.xmlsoap.org/SOAP/envelope/ "container =" " http://www.w3.org/2001/XMLSchema "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "xmlns:SOAP - ENC =" " http://schemas.xmlsoap.org/SOAP/encoding/ ">

    < SOAP - ENV:Body >

    < CloneVM_Task xmlns = "urn: vim25" >

    < _this type = 'VirtualMachine' > vm-xxxxx < / _this >

    < folder > datacenter-xxxxx < / case >

    < name > clone-test-1 < / name >

    < spec >

    < location >

    store of data <>data store - xxxxx < / datastore >

    resgroup-xxxxx < pool > < / pool >

    < / location >

    false < template > < / template >

    false < powerOn > < / powerOn >

    < / spec >

    < / CloneVM_Task >

    < / SOAP - ENV:Body >

    < / SOAP - ENV:Envelope >

    but I get the error "the application refers to an unexpected or unknown type".

    Here is the entire response in a table:

    {Array (15)}

    'key' = >

    String(11) "task-xxxxxxx".

    "task" = >

    String(11) "task-xxxxxxx".

    'name' = >

    (12) a string "CloneVM_Task".

    'descriptionId' = >

    (20) a string "VirtualMachine.clone".

    'entity' = >

    String (8) "vm-xxxxx".

    "entityName" = >

    (8) a string 'xxxxxx '.

    'State' = >

    String(5) "error".

    'cancelled' = >

    String(5) "false."

    'Cancel' = >

    (4) a string 'true '.

    'error' = >

    {Array (2)}

    'fault' = >

    {Array (1)}

    "argument" = >

    (22) a string "ManagedObjectReference".

    }

    'localizedMessage' = >

    String (52) "request refers to an unexpected or unknown type."

    }

    'reason' = >

    {Array (1)}

    'userName' = >

    String (10) "myusername".

    }

    'queueTime' = >

    (26) string "xxxx".

    "startTime" = >

    (27) string "xxxx".

    'completeTime' = >

    (26) string "xxxx".

    'eventChainId' = >

    String (7) 'xxxxxxx '.

    }

    Thanks in advance for any help, it will be greatly appreciated!

    Yes, login and vcenter.

    Thanks for trying to help, but I managed to solve it.  It turns out that it was

    1. I was providing the setting wrong folder (should have been the result of FindByInventoryPath('your_data_center_name/vm') instead of FindByInventoryPath ('your_data_center_name')

    2. I didn't need to provide anything inside the 'location' parameter, it comes to be present

    Thank you again and hope that the above comments help someone else trying to do the same thing

  • Clone a virtual machine and change is the network settings?

    I'm looking to clone a virtual machine several times change the network connection and the IP he uses, any help appreciated.

    NP, alternative, will host this script:

    $vmlist=Import-CSVC:vms.csv
    foreach($itemin$vmlist) {
     # I like to map out my variables
     $vmname=$item.vmname
     $ipaddr=$item.ipaddress
     $subnet=$item.subnet
     $gateway=$item.gateway
     $pdnswins=$item.pdnswins
     $sdnswins=$item.sdnswins
     #Get the current interface info
     $GuestInterface= Get-VMGuestNetworkInterface -VM $vmname -HostCredential $HostCred-GuestCredential$GuestCred
     #If the IP in the VM matches, then I don't need to update
     If ($ipaddr-ne$($GuestInterface.ip)) {
         Set-VMGuestNetworkInterface-VMGuestNetworkInterface$GuestInterface -HostCredential $HostCred -GuestCredential $GuestCred -IP $ipaddr -Netmask $subnet -Gateway $gateway -DNS $pdnswins,$sdnswins-WINS  $pdnswins,$sdnswins
     }
    }
  • How to clone a virtual machine using ESXi 4.1 and vSphere?

    Instructions for I have seen that you can click with the right button on a virtual machine and choose "Clone", but I think it's only for vCenter

    Is there a way to clone a virtual machine in vSphere?

    Thank you

    If you have a licensed copy of ESXi (not vSphere Hypervisor, the free version), you can try the document below.  However, if you do not have a licensed copy you vCenter for cloning function

    http://communities.VMware.com/docs/doc-11708

  • How to clone a virtual machine with the drive?

    Hello

    Previously, I used VMware Workstation and has a mastery of "clone". Now I use the reader and I would like to clone my current VM and there is no special orders. Simply copy the directory would probably not there a lot of information such as DNS name, etc. that are likely to be changed. Is it possible to clone a virtual machine with player or do I Workstation?

    Many thanks in advance,

    Nicolas

    In my computer a full clone is nothing more then is not a copy that was made unique in the process and the players of VMware capacity but there is nothing stopping you from manually making a copy and then manually by making the changes to make it unique.

  • How is it possible to clone a virtual machine cluster when data warehouses not presented in source and destination

    I did not know that on ESX 3.5, in order to afin de vivre live clone a virtual machine from one ESX host to another, source and destination stores had to be available. However, I'm currently cloning a virtual machine to a host in a datacenter and cluster to one host in a different data center, but the destination store is not available at the source host and visa versa.

    How is that possible?  This is a new feature of vSphere?

    That seems to work on the console port. See this thread: http://communities.vmware.com/message/1475721#1475721

    AWo

    VCP 3 & 4

    Author @ vmwire.net

    \[:o]===\[o:]

    = You want to have this ad as a ringtone on your mobile phone? =

    = Send 'Assignment' to 911 for only $999999,99! =

  • 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é

  • Automatically remove virtual machines for VDI pool after the period of time

    Use us Vmware View 5.0 but soon move to 5.2 and have need features to automatically remove all the virtual machines in the pool selected after a certain period of time. We are at disposal VDI for a project that will end for 3 months and after this time, we want to remove this VMs automatically. Is this possible?

    It depends a bit exactly what you want to do, but you can plan everything a powercli-script to remove the virtual desktop at a certain time.

    Another option that I usually prefer is to manage the rights with the ad groups.

    So when you want to revoke a users access to a desktop computer, simply remove the user from the group, which should be easy to do with a script.

    Linjo

  • Clone a virtual machine / move to folder / delete VM / as a Powershell Script as a scheduled task ends with "ongoing"

    Hi all,.

    I would kindly ask your help with a script that needs to run as a scheduled task. It is functional, but does not correct and little need for love at the end...

    I want to create a script that

    • find a virtual machine with a pattern on its behalf (realized and works)
    • delete a virtual machine with a reason given in his name (completed works)
    • create a clone of a virtual machine (completed works)
    • move that created clone (upstairs) and move it to a folder named (open)
      or the fact in the clone process

    I realized thus far:

    Add-pssnapin VMware.VimAutomation.Core
    # Import CSV backup
    $backupinfo = import-Csv C:\scripts\vm_backup\test.csv
    VCenter servername #Set
    $vcenter_server = "name servers".
    #Connect to vCenter
    SE connect-VIServer $vcenter_Server

    # BEGIN OLD BACKUP CLEANUP
    #Select all old backups
    $old_backups = get - VM *-backups
    {if ($old_backups)}
    {foreach ($backup_vm to $old_backups)
    Get - VM $backup_vm | Remove-VM - DeleteFromDisk-confirm: $false
    }
    }

    # START QUEUING NEW CLONES
    #Increment through CSV
    {foreach ($customer to $backupinfo)
    $target_host is get-VMHost-name $customer. TargetHost
    If {($target_host)
    Date format #Set for clone names
    $date = get-Date-Format 'YYYY-MM-dd ".
    Date format #Set for emails
    $time = (get-Date - f "Hh: mm")
    #Get SourceVM
    $vm is get - VM $customer. SourceVM
    # Create new snapshot clone
    $cloneSnap = $vm | New-Snapshot - name "instant Clone.
    # Get the managed object display
    $vmView = $vm | Get-View
    # Get the managed folder object reference
    $cloneFolder = $vmView.parent
    # Construction specification clone
    $cloneSpec = new-object Vmware.Vim.VirtualMachineCloneSpec
    # Make linked disc specification?
    $cloneSpec.Snapshot = $vmView.Snapshot.CurrentSnapshot
    #Set VirtualMachineRelocateSpec
    $cloneSpec.Location = new-object Vmware.Vim.VirtualMachineRelocateSpec
    #Thin commissioning
    $cloneSpec.Location.Transform = [Vmware.Vim.VirtualMachineRelocateTransformation]: sparse
    #Target data store
    $cloneSpec.Location.Datastore = (get-Datastore-name $customer. TargetDS | Get - View). MoRef
    #Target host
    $cloneSpec.Location.Host = (get-VMHost-name $customer. TargetHost | Get - View). MoRef
    #Target list of resources, from the first VM in the TargetHost
    $cloneSpec.Location.Pool = (get-VMHost-name $customer. TargetHost | Get - VM | Select-Object - 1 first | Get - View). ResourcePool
    Name of clone #Set
    $cloneName = ' date of $vm-$- $temps - backup ".
    # Create clone
    $clone_task = $vmView.CloneVM_Task ($cloneFolder, $cloneName, $cloneSpec)
    # Remove snapshot created for clone, will automatically queues
    Get-Snapshot - VM (VM-Get-name $customer. SourceVM) - name $cloneSnap | Remove-Snapshot - confirm: $False
    }
    }

    # Move folder in VM Clone
    Move-VM - VM * - backups - Destination Clone

    VCentre #Disconnect
    Disconnect-VIServer-confirm: $false

    The script itself runs so far and does what it should, but the scheduled task is always "in process of execution". Now, I created a work around in this way, I have finished the task after two hours of running; but there must be a better solution that works properly.
    As well as the part with the rise of the virtual machine.

    Could you maybe help me or have a good idea how to solve this problem?

    Thanks in advance

    Try again with

    PowerShell-no interactive - noprofile - executionpolicy override - file C:\scripts\scriptname.ps1

  • Need a script to the list of all the virtual machines in CSV

    I want to record a list of virtual machines from one host in a csv file so that I can add to their return with

    New-VM - VMFilePath $VMXFile - $vmhost $ESXHost - $VMFolder location

    I started with that, but am struggling with the name of the folder of the virtual machine (can be used in New-VM-map)

    Get-VIServer-Server MyServer - protocol https-Force | out-null

    $report = @)

    Get - VM | Get-View | %{

    $row = "" | Select Name, VmPathName, location

    $row. Name = $_. Name

    $row. VmPathName = $_. Config.Files.VmPathName

    # $row. Location = $_. Folder # faced with this line

    $report += $row

    }

    $report

    # How to make this online, don't invite not not the user?

    Disconnect-VIServer-Server MyServer - Force

    Try this, it should give the blue files

    New-VIProperty -Name 'BlueFolderPath' -ObjectType 'VirtualMachine' -Value {    param($vm)
    
        function Get-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
    
    Connect-VIServer -Server MyServer -Protocol https -Force | out-null
    
    $report = @()Get-VM  | %{  $row = "" | select Name, VmPathName, Location  $row.Name = $_.Name  $row.VmPathName = $_.ExtensionData.Config.Files.VmPathName  $row.Location = $_.BlueFolderPath  $report += $row}$report
    
    Disconnect-VIServer -Server MyServer -Confirm:$false
    
  • Workflow list and range from virtual machine disk

    Hello

    I need to create a workflow that virtual disks of list of a virtual machine, defined in the input parameter.

    So I have 2 questions:

    How can I list a specific virtual machine disks?

    -I can't find how to access this information

    -Is it possible to fill a field of presentation after you have selected the virtual machine?

    ,

    Best regards

    Hello

    find the code of an action that loops through all the devices of a given virtual computer and returns an array containing the keys of the device below. You can then use it in a decorator for the workflow to let the user select a drive.

    See you soon,.

    Joerg

    var devices = vm.config.hardware.device;
    var diskCount = 0;
    var diskArray = new Array();
    

Maybe you are looking for

  • I got negatives on a CD. The instructions say to "run the Photo on the CD Viewer '.» How can I do this?

    I got the negatives on a CD instead of local printing. The instructions that came with the CD says: 1) Insert the CD into your computer [what I did]; (2) run "photo Viewer for Windows: on the CD." Use the photo viewer to see photos & save them to you

  • N100 screen problem

    My N100 receives no image on the screen of the laptop own. To the post, the image of the screen will show for around a second or less, with a slightly red tinge. In addition, when loading Windows (Vista), the screen will show again for a very short t

  • LEXMARK X560N - driver need Windows 8

    Looking to install a printer Lexmark x560n on my new laptop Windows 8 OS. Cannot find a driver for it in the manual update and we tried generic class without success drivers. Would appreciate the help of those who have installed successfully x560n pr

  • How to access the HTML tag in an existing PHP site.

    Hi, im using dreamweaver on windows 10 cs6. I tried to change an existing (PHP) site and in code view, I can only see the php code and functions, but I want to change the html markup that I see in the source of the page on a browser command to change

  • separate blocks

    Hi allI have two blocks1 - for patient data2. for the names of doctors who care for patients - every patient has a doctor cares about him.-two patients may have the same doctor, and I get duplicate names of doctors.-I want to get the doctor names sep