Skip to content

Instantly share code, notes, and snippets.

@BadgerOps
Created June 6, 2016 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BadgerOps/19feebfbe2fae4dcb3602ffec477984c to your computer and use it in GitHub Desktop.
Save BadgerOps/19feebfbe2fae4dcb3602ffec477984c to your computer and use it in GitHub Desktop.
salt-cloud vmware conf
cloud.profiles.d/vmware.conf
small-win2012:
provider: vsphere_name
clonefrom: 'TemplateSrv2k12R2'
win_installer: /etc/salt/cloud.deploy.d/windows_installer_x86_64.exe # needed?
deploy: True
num_cpus: 1
memory: 1GB
devices:
disk:
Hard disk 0:
size: 60
network:
Network adapter 1:
connectable: True # probably not needed, but trying to figure out what value is needed
adapter type: vmxnet3
connected: True # this seems right, but not actually attaching
startConnected: True # this seems right
name: 'VLAN_NAME'
switch_type: standard
debug output:
DEBUG ] Sending event - data = {'profile': 'small-win2012', 'event': 'starting create', '_stamp': '2016-06-06T16:10:38.749952', 'name': 'vm-hostname', 'provider': 'vcenter:vmware'}
[DEBUG ] No datastore/datastore cluster specified
[DEBUG ] Using datastore used by the template TemplateSrv2k12R2
[DEBUG ] Setting cpu to: 1
[DEBUG ] Setting memory to: 1024 MB
[DEBUG ] Hard disks to create: ['Hard disk 0']
[DEBUG ] clone_spec set to:
(vim.vm.CloneSpec) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
location = (vim.vm.RelocateSpec) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
service = <unset>,
folder = <unset>,
datastore = <unset>,
diskMoveType = <unset>,
pool = 'vim.ResourcePool:resgroup-176',
host = <unset>,
disk = (vim.vm.RelocateSpec.DiskLocator) [],
transform = <unset>,
deviceChange = (vim.vm.device.VirtualDeviceSpec) [],
profile = (vim.vm.ProfileSpec) []
},
template = false,
config = (vim.vm.ConfigSpec) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
changeVersion = <unset>,
name = <unset>,
version = <unset>,
uuid = <unset>,
instanceUuid = <unset>,
npivNodeWorldWideName = (long) [],
npivPortWorldWideName = (long) [],
npivWorldWideNameType = <unset>,
npivDesiredNodeWwns = <unset>,
npivDesiredPortWwns = <unset>,
npivTemporaryDisabled = <unset>,
npivOnNonRdmDisks = <unset>,
npivWorldWideNameOp = <unset>,
locationId = <unset>,
guestId = <unset>,
alternateGuestName = <unset>,
annotation = <unset>,
files = <unset>,
tools = <unset>,
flags = <unset>,
consolePreferences = <unset>,
powerOpInfo = <unset>,
numCPUs = 1,
numCoresPerSocket = <unset>,
memoryMB = 1024,
memoryHotAddEnabled = <unset>,
cpuHotAddEnabled = <unset>,
cpuHotRemoveEnabled = <unset>,
virtualICH7MPresent = <unset>,
virtualSMCPresent = <unset>,
deviceChange = (vim.vm.device.VirtualDeviceSpec) [
(vim.vm.device.VirtualDeviceSpec) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
operation = 'edit',
fileOperation = <unset>,
device = (vim.vm.device.VirtualVmxnet3) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 4000,
deviceInfo = (vim.Description) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
label = 'Network adapter 1',
summary = 'DEV_INFRA'
},
backing = (vim.vm.device.VirtualEthernetCard.NetworkBackingInfo) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
deviceName = 'DEV_INFRA',
useAutoDetect = <unset>,
network = 'vim.Network:network-805',
inPassthroughMode = <unset>
},
connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
startConnected = false,
allowGuestControl = true,
connected = false,
status = 'untried'
},
slotInfo = <unset>,
controllerKey = 100,
unitNumber = 7,
addressType = 'assigned',
macAddress = '00:50:56:a8:4a:8c',
wakeOnLanEnabled = true,
resourceAllocation = <unset>,
externalId = <unset>,
uptCompatibilityEnabled = <unset>
},
profile = (vim.vm.ProfileSpec) []
},
(vim.vm.device.VirtualDeviceSpec) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
operation = 'add',
fileOperation = 'create',
device = (vim.vm.device.VirtualDisk) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
key = -2085,
deviceInfo = (vim.Description) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
label = 'Hard disk 0',
summary = '60.0 GB'
},
backing = (vim.vm.device.VirtualDisk.FlatVer2BackingInfo) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
fileName = '',
datastore = <unset>,
backingObjectId = <unset>,
diskMode = 'persistent',
split = <unset>,
writeThrough = <unset>,
thinProvisioned = false,
eagerlyScrub = <unset>,
uuid = <unset>,
contentId = <unset>,
changeId = <unset>,
parent = <unset>,
deltaDiskFormat = <unset>,
digestEnabled = <unset>,
deltaGrainSize = <unset>,
deltaDiskFormatVariant = <unset>,
sharing = <unset>
},
connectable = <unset>,
slotInfo = <unset>,
controllerKey = 1000,
unitNumber = 1,
capacityInKB = 62914560,
capacityInBytes = <unset>,
shares = <unset>,
storageIOAllocation = <unset>,
diskObjectId = <unset>,
vFlashCacheConfigInfo = <unset>,
iofilter = (str) []
},
profile = (vim.vm.ProfileSpec) []
}
],
cpuAllocation = <unset>,
memoryAllocation = <unset>,
latencySensitivity = <unset>,
cpuAffinity = <unset>,
memoryAffinity = <unset>,
networkShaper = <unset>,
cpuFeatureMask = (vim.vm.ConfigSpec.CpuIdInfoSpec) [],
extraConfig = (vim.option.OptionValue) [],
swapPlacement = <unset>,
bootOptions = <unset>,
vAppConfig = <unset>,
ftInfo = <unset>,
repConfig = <unset>,
vAppConfigRemoved = <unset>,
vAssertsEnabled = <unset>,
changeTrackingEnabled = <unset>,
firmware = <unset>,
maxMksConnections = <unset>,
guestAutoLockEnabled = <unset>,
managedBy = <unset>,
memoryReservationLockedToMax = <unset>,
nestedHVEnabled = <unset>,
vPMCEnabled = <unset>,
scheduledHardwareUpgradeInfo = <unset>,
vmProfile = (vim.vm.ProfileSpec) [],
messageBusTunnelEnabled = <unset>
},
customization = <unset>,
powerOn = true,
snapshot = <unset>,
memory = <unset>
}
[DEBUG ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
[DEBUG ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Sending event - data = {'_stamp': '2016-06-06T16:10:40.879145', 'event': 'requesting instance', 'kwargs': {'profile': 'small-win2012', 'domain': 'domain.tld', 'priv_key': None, 'protocol': 'https', 'deploy': False, 'minion': {'master': 'salt.domain.tld'}, 'driver': 'vcenter:vmware', 'cluster': 'ClusterName', 'user': 'User', 'inline_script': None, 'password': 'super_secret_password', 'port': 443, 'name': 'vm-hostname', 'clonefrom': 'TemplateSrv2k12R2', 'url': 'vmware_url', 'pub_key': None, 'num_cpus': 1, 'devices': {'disk': {'Hard disk 0': {'size': 60}}, 'network': {'Network adapter 1': {'switch_type': 'standard', 'adapter type': 'vmxnet3', 'connected': True, 'connectable': True, 'name': 'VLAN_NAME', 'startConnected': True}}}, 'folder': 'DevOps', 'memory': '1GB', 'win_installer': '/etc/salt/cloud.deploy.d/windows_installer_x86_64.exe', 'os': 'bootstrap-salt'}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment