code: func (r *DiskSubresource) createDisk(l object.VirtualDeviceList) (*types.VirtualDisk, error) {
  	disk := new(types.VirtualDisk)
  	disk.Backing = new(types.VirtualDiskFlatVer2BackingInfo)
  
  	// Only assign backing info if a datastore cluster is not specified. If one
  	// is, skip this step.
  	if r.rdd.Get("datastore_cluster_id").(string) == "" {
  		if err := r.assignBackingInfo(disk); err != nil {
  			return nil, err
  		}
  	}
  
  	// Set a new device key for this device
  	disk.Key = l.NewKey()
  	return disk, nil
  }
docs: // createDisk performs all of the logic for a base virtual disk creation.