SRIOV Adapter is not getting added.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
I have created VFs on vmnic5 and created a Vswitch out of it.. Created a VM IKM-testvm and trying to attach SRIOV VF to it using the following code..
vm = pyvmomi.get_obj([vim.VirtualMachine], name)
nic = vim.vm.device.VirtualDeviceSpec()
VM device
nic.operation = vim.vm.device.VirtualDeviceSpec.Operation.add
nic.device = vim.vm.device.VirtualSriovEthernetCard()
nic.device.deviceInfo = vim.Description()
nic.device.deviceInfo.label = vnic_label
nic.device.deviceInfo.summary = network_name
nic.device.backing = vim.vm.device.VirtualEthernetCard.NetworkBackingInfo()
nic.device.backing.network = pyvmomi.get_obj([vim.Network], network_name)
nic.device.backing.deviceName = network_name
nic.device.backing.useAutoDetect = False
nic.device.connectable = vim.vm.device.VirtualDevice.ConnectInfo()
nic.device.connectable.startConnected = True
nic.device.connectable.allowGuestControl = False
nic.device.connectable.connected = False
nic.device.sriovBacking = vim.vm.device.VirtualSriovEthernetCard.SriovBackingInfo()
nic.device.sriovBacking.physicalFunctionBacking = vim.vm.device.VirtualPCIPassthrough.DeviceBackingInfo()
nic.device.sriovBacking.physicalFunctionBacking.id = '0000:04:00.0'
devices.append(nic)
print nic.device
vmconf = vim.vm.ConfigSpec(deviceChange=devices)
task = vm.ReconfigVM_Task(vmconf)
But the task is not completed but gives the following exception..
vim.TaskInfo) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'haTask-11-vim.VirtualMachine.reconfigure-9608',
task = 'vim.Task:haTask-11-vim.VirtualMachine.reconfigure-9608',
description = ,
name = vim.VirtualMachine.Reconfigure,
descriptionId = 'VirtualMachine.reconfigure',
entity = 'vim.VirtualMachine:11',
entityName = 'IKM-testvm',
locked = (vim.ManagedEntity) [],
state = 'error',
cancelled = false,
cancelable = false,
error = (vmodl.fault.InvalidArgument) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'A specified parameter was not correct: ',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
invalidProperty =
},
result = ,
progress = ,
reason = (vim.TaskReasonUser) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
userName = 'root'
},
queueTime = 2016-04-19T11:19:32.854745Z,
startTime = 2016-04-19T11:19:32.854918Z,
completeTime = 2016-04-19T11:19:32.91381Z,
eventChainId = 9608,
changeTag = ,
parentTaskKey = ,
rootTaskKey = ,
activationId =
}
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 with the SR-IOV device configuration in the issue body and the resulting ReconfigVM_Task InvalidArgument fault. Check the vSphere API requirements for VirtualSriovEthernetCard and its SriovBackingInfo, then reproduce the reconfiguration against a VM with the stated VF and network setup. Done means the task completes successfully and the SR-IOV adapter appears on IKM-testvm.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100