Created
August 4, 2015 17:08
-
-
Save adampats/b7a1efc15c4035d6e4a9 to your computer and use it in GitHub Desktop.
RbVmomi VirtualMachineConfigSpec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spec = { | |
| deviceChange: [ | |
| { | |
| operation: :edit, | |
| device: RbVmomi::VIM::VirtualCdrom( | |
| key: 2, | |
| controllerKey: 200, | |
| backing: RbVmomi::VIM::VirtualCdromAtapiBackingInfo( | |
| deviceName: "" | |
| ), | |
| connectable: RbVmomi::VIM::VirtualDeviceConnectInfo( | |
| startConnected: false, | |
| connected: false, | |
| allowGuestControl: true)) | |
| } | |
| ] | |
| } | |
| task = vm.ReconfigVM_Task(spec: spec) | |
| ##### | |
| [103] pry(main)> task.info | |
| => TaskInfo( | |
| cancelable: false, | |
| cancelled: false, | |
| completeTime: 2015-08-04 17:04:33 UTC, | |
| descriptionId: "VirtualMachine.reconfigure", | |
| dynamicProperty: [], | |
| entity: VirtualMachine("vm-4753"), | |
| entityName: "rhel7base_v2015.08.04_SSC (for automated template creation)", | |
| error: LocalizedMethodFault( | |
| fault: InvalidDeviceSpec( deviceIndex: 0, faultMessage: [], property: "virtualDeviceSpec.operation" ), | |
| localizedMessage: "Invalid configuration for device '0'." | |
| ), | |
| eventChainId: 9015909, | |
| key: "task-74458", | |
| locked: [], | |
| name: "ReconfigVM_Task", | |
| queueTime: 2015-08-04 17:04:33 UTC, | |
| reason: TaskReasonUser( dynamicProperty: [], userName: "svcaccount" ), | |
| startTime: 2015-08-04 17:04:33 UTC, | |
| state: "error", | |
| task: Task("task-74458") | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment