func Customize(vm *object.VirtualMachine, spec types.CustomizationSpec) error {
	log.Printf("[DEBUG] Sending customization spec to virtual machine %q", vm.InventoryPath)
	ctx, cancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout)
	defer cancel()
	task, err := vm.Customize(ctx, spec)
	if err != nil {
		return err
	}
	tctx, tcancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout)
	defer tcancel()
	return task.Wait(tctx)
}
func Customize(vm *object.VirtualMachine, spec types.CustomizationSpec) error {
	log.Printf("[DEBUG] Sending customization spec to virtual machine %q", vm.InventoryPath)
	ctx, cancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout)
	defer cancel()
	task, err := vm.Customize(ctx, spec)
	if err != nil {
		return err
	}
	tctx, tcancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout)
	defer tcancel()
	return task.Wait(tctx)
}
func Customize ( vm * object . VirtualMachine , spec types . CustomizationSpec ) error { log . Printf ( " " , vm . InventoryPath ) ctx , cancel := context . WithTimeout ( context . Background ( ) , provider . DefaultAPITimeout ) defer cancel ( ) task , err := vm . Customize ( ctx , spec ) if err != nil { return err } tctx , tcancel := context . WithTimeout ( context . Background ( ) , provider . DefaultAPITimeout ) defer tcancel ( ) return task . Wait ( tctx ) }
// Customize wraps the customization of a virtual machine and the subsequent
// waiting of the task.
Customize wraps the customization of a virtual machine and the subsequent waiting of the task .