pyvmomi v6.5.0.2017.5-1 , v7.0.3 and python 2.7 VirtualNVMEController is getting converted to VirtualController when device change spec is passed to esx host
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to create vm having hard disk attached through nvme controller. When I pass vim.vm.ConfigSpec with deviceChange property setting to list of vim.vm.device.VirtualDeviceSpec having one for nvme controller - the spec is getting created but when it is passed to esx host it is getting internally converted to VirtualController object due to which Create_VMTask is failing with invalid device spec.
I checked spec passed to host in hostd.log there its failing while adding disk (which is attached through this controller) with
GetDiskControllerType: controller type unacceptable: (vim.vm.device.VirtualDisk) .
Sample spec created
(vim.vm.device.VirtualDeviceSpec) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
operation = 'add',
fileOperation = <unset>,
device = (vim.vm.device.VirtualNVMEController) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 31000,
deviceInfo = (vim.Description) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
label = 'NVME controller 0',
summary = 'NVME controller 0'
},
backing = <unset>,
connectable = <unset>,
slotInfo = <unset>,
controllerKey = 100,
unitNumber = 31,
busNumber = 0,
device = (int) [
32015
]
},
profile = (vim.vm.ProfileSpec) [],
backing = <unset>
},
spec logged in hostd.log
(vim.vm.device.VirtualDeviceSpec) {
--> operation = "add",
--> device = (vim.vm.device.VirtualController) {
--> key = 31000,
--> deviceInfo = (vim.Description) {
--> label = "NVME controller 0",
--> summary = "NVME controller 0"
--> },
--> busNumber = 0,
--> },
--> },
Also when I am trying to retrieve managed object for this vm the vm_conf.hardware.device is not recognizing it as VirtualNVMEController but instead it is returning VirtualController. I have tried this using both pyvmomi versions - v6.5.0.2017.5-1 and v7.0.3
Please check if I have missed anything and any help will be highly appreciated. Let me know if need more information.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sample vim.vm.ConfigSpec deviceChange containing a VirtualNVMEController, then compare the object returned through vm_conf.hardware.device with the representation in hostd.log. Check whether the controller type changes before Create_VMTask runs; done means the NVMe controller remains recognized and the VM creation succeeds without the invalid device spec error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100