Hi,
Trying to create a VM while attaching an existing disk. I can create the VM then attach
the disk with an additional call, but I thought it should be possible to do it in one
hit?
My code is
vm = vms_service.add(
types.Vm(
name='alma8.7',
description='AlmaLinux 8.7 CIS Packer image',
cluster=types.Cluster(
name='Default',
),
type=types.VmType('server'),
template=types.Template(
name='Blank',
),
disk_attachments=[types.DiskAttachment(
disk=types.Disk(id = "0532e728-a1fb-4ff8-a4f3-0702fc876fce"),
bootable=True,
active=True,
interface=types.DiskInterface.VIRTIO,
)]
),
)
This request returns no error but the disk isn't actually attached to the created VM.