Disk files of VMs deployed from a template in Content Library using the PowerCLI cmdlet New-VM are named with an additional number at the end
search cancel

Disk files of VMs deployed from a template in Content Library using the PowerCLI cmdlet New-VM are named with an additional number at the end

book

Article ID: 375770

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • You have a VM template in the vCenter Content Library, called <source_vm_name>
  • You use the PowerCLI cmdlet New-VM to deploy a new virtual machine from this template
    # New-VM -Name testVM1 -ResourcePool <target_resourcepool_or_cluster> -Datastore <target_datastore> -ContentLibraryItem <source_vm_name>
  • The new VM is properly name testVM1
  • However, the virtual disk ends up having a number added to it's file name, like testVM1_2.vmdk

Environment

vSphere 7.x

vSphere 8.x

Resolution

This is a known behavior, which was meant to prevent naming collisions with existing virtual machine.

It does not cause any technical problems.

VMware does not guarantee any strict naming conventions for virtual disks in vSphere, so please align your work flows accordingly.