Virtual machines do not power on after you complete the clone or deploy from template workflow in the vSphere Web Client.

Problem

When you clone a virtual machine or deploy a virtual machine from a template, you might not be able to power on the virtual machine after creation.

Cause

The swap file size is not reserved when the virtual machine disks are created.

Solution

  • Reduce the size of the swap file that is required for the virtual machine. You can do this by increasing the virtual machine memory reservation.
    1. Right-click the virtual machine and select Edit Settings.
    2. Select Virtual Hardware and click Memory.
    3. Use the Reservation drop-down menu to increase the amount of memory allocated to the virtual machine.
    4. Click OK.
  • Alternatively, you can increase the amount of space available for the swap file by moving other virtual machine disks off the datastore that is being used for the swap file.
    1. Browse to the datastore in the vSphere Web Client object navigator.
    2. Select the VMs tab.
    3. For each virtual machine to move, right-click the virtual machine and select Migrate.
    4. Select Change storage only.
    5. Proceed through the Migrate Virtual Machine wizard.
  • You can also increase the amount of space available for the swap file by changing the swap file location to a datastore with adequate space.
    1. Browse to the host in the vSphere Web Client object navigator.
    2. Select the Configure tab.
    3. Under Virtual Machines, select Swap file location.
    4. Click Edit.
      Note: If the host is part of a cluster that specifies that the virtual machine swap files are stored in the same directory as the virtual machine, you cannot click Edit. You must use the Cluster Settings dialog box to change the swap file location policy for the cluster.
    5. Select Use a specific datastore and select a datastore from the list.
    6. Click OK.