vCenter

 View Only
  • 1.  Guest Customization without Cloning a VM?

    Posted Aug 31, 2012 03:33 PM

    Hi folks,

    I'm looking to kick off the VM Guest Customization process without actually cloning a VM.

    I want to take a LUN filled with VMs, and clone it on the storage level, then re-present that LUN as a new datastore filled with VMs. Then I need those VMs to be joined to the domain, so in order for that to happen I need to sysprep each of the VMs on the new datastore and rename them, without initiating a VM clone operation first (the VMs have already been cloned on the datastore level).

    I know that the guest customization adds a new variable to the VMX file of the VM to be customized - tools.deployPkg.fileName = "imcXXXX.tmp", and that the file  referenced in that variable is uploaded to the same ESX datastore folder  as the VMX. What I need to do is find a way to edit this file and inject a new sysprep.inf with a new VM name in it.

    I've tried looking at the imcXXXX.tmp file - it's an archive and it contains some exes along with a sysprep.inf. However, I can't edit the file, and I don't know the exact format of the file so I can't create a new one containing my edited sysprep.inf.

    Does anyone know if it's possible to make changes to these imcXXXX.tmp files, and if so, how do I do it? :smileyhappy:

    Thanks,

    - Brian



  • 2.  RE: Guest Customization without Cloning a VM?

    Posted Jan 26, 2013 12:10 PM

    FYI, I found an easier way to do this - which is good since nobody seems to know the answer to the question I was asking.

    Using Powershell you can apply an existing guest customization specification to an existing VM. The code is along these lines

    $myspec = Get-OSCustomizationSpec -name 'thisismycustomizationspecification'

    $VM_NAME = Get-VM -Name 'thisismyvmname'

    $VM_NAME | set-vm -OSCustomizationSpec $myspec -Confirm:$false