Closed timogoebel closed 6 years ago
@scambra: Do you mind taking a look? Does this still work with your use case?
Thanks @timogoebel tested and working
Hey There,
I am getting below error while attaching the disk. Any Pointers?
**Required property id is missing from data object of type ID
while parsing serialized DataObject of type vim.vslm.ID at line 1, column 255
while parsing call information for method AttachDisk_Task at line 1, column 177
while parsing SOAP body at line 1, column 167
while parsing SOAP envelope at line 1, column 0
while parsing HTTP request for method attachDisk on object of type vim.VirtualMachine at line 1, column 0**
Code snippet.
vm.AttachDisk_Task(
diskId: did,
datastore: vmdk_datastore,
controllerKey: 1000,
unitNumber: 14,
)
Fixes #132.
This commit checks if the new_volume has a datastore attribute before trying to relocate it.
The error in the issue happens, because this is passed to vSphere (because
new_volume.datastore
isnil
):