module Fog
module Vsphere
class Compute
class Real
def create_vm(attributes = {})
# build up vm configuration
cluster = get_raw_cluster(attributes[:cluster], attributes[:datacenter])
raise Fog::Vsphere::Compute::NotFound, "Cluster #{attributes[:cluster]} Doesn't Exist in the DC!" unless cluster
vm_cfg = {
name: attributes[:name],
annotation: attributes[:annotation],
guestId: attributes[:guest_id],
version: attributes[:hardware_version],
files: { vmPathName: vm_path_name(attributes) },
numCPUs: attributes[:cpus],
numCoresPerSocket: attributes[:corespersocket],
memoryMB: attributes[:memory_mb],
deviceChange: device_change(attributes),
extraConfig: extra_config(attributes)
This file has been truncated. show original