Skip to content

Commit f47e143

Browse files
committed
Allow setting the guestId on create, both for in yaml and cli option
Without setting a guestId, vmware can refuse to actually boot the VM.
1 parent b22e2ef commit f47e143

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ezmomi/ezmomi.py

+1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def create(self):
197197
vmconf.memoryHotAddEnabled = True
198198
vmconf.files = vmx_file
199199
vmconf.deviceChange = devices
200+
vmconf.guestId = self.config['guestid']
200201

201202
tasks = [destfolder.CreateVM_Task(config=vmconf, pool=resource_pool)]
202203
result = self.WaitForTasks(tasks)

ezmomi/params.py

+5
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ def add_params(subparsers):
244244
type=str,
245245
help='Domain, e.g. "example.com"'
246246
)
247+
create_parser.add_argument(
248+
'--guestid',
249+
type=str,
250+
help='Guest ID, e.g. "rhel6_64Guest"'
251+
)
247252
create_parser.add_argument(
248253
'--resource-pool',
249254
type=str,

0 commit comments

Comments
 (0)