-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to add RDM disk to VM got error "Incompatible device backing specified for device '0'". #119
Comments
@14kosta Apologies for the late response. Can you try to comment out "type=Disk.HostBusAdapterType.SCSI," when creating the Disk.CreateSpec? If it's still not working. Could you please post the stacktrace from /var/log/vmware/vpxd/vpxd.log so we get more info? |
Hi tianhao64, Thank you |
@14kosta Hmm. the log doesn't have related error message. Will ask the storage expert to take a look. Meanwhile, can you check this post? https://cormachogan.com/2013/04/08/microsoft-clustering-on-vsphere-incompatible-device-errors/ |
Hi tianhao64, |
I filed a SR against the storage team. Will keep you posted. Can you check hostd.log see if you see related error message? |
Command "find / -name hostd" doesn't return any hostd.log on vCenter or ESXi. Where to search for it? |
Modern versions of ESXi keep the hostd.log in /var/run/log. Generally when you pull down a vm-support, the files will be gzip'ed |
when I run RDM mapping in the file /var/log/hostd.log (which is the link to /var/run/log/hostd.log) appears the following error: |
Hi tianhao64, |
Hi tianhao64, |
No update from the feature team yet. Will ping them again. |
@tianhao64 , thank you! |
@tianhao64 @14kosta |
Hi.
We don't get any reply from the feature team. Were very disappointed how
Vmware helps their users to resolve the problems concerned with usage of
Vmware sdk. Switched to PowerCli, ported to Linux, which worked fine.
…On Tue, Mar 16, 2021 at 8:41 AM Anusha Hegde ***@***.***> wrote:
@tianhao64 <https://github.com/tianhao64>
Was there any progress from the feature team?
@14kosta <https://github.com/14kosta>
Do you know if this issue still exists with the latest SDK?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#119 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKRWP44PWG2HSSZXYASDC4LTD34R5ANCNFSM4GGUYWDQ>
.
|
@14kosta |
Answer: yes
I use Version 6.7.0.1150 Build 8170132
Answer: yes
Environment
(vSphere_sdk_virt_env) [root@SIOVM-9 ~]# pip list | grep v
pyvmomi 6.7.1
vapi-client-bindings 1.5.0
vapi-common-client 2.10.2
vapi-runtime 2.10.2
vapi-vmc-client 2.10.2
vmc-app-python-sdk 2.2.0.0.0.15184434
vmc-client-bindings 1.3.0
(vSphere_sdk_virt_env) [root@SIOVM-9 ~]#
(vSphere_sdk_virt_env) [root@SIOVM-9 ~]# python --version
Python 3.5.1
(vSphere_sdk_virt_env) [root@SIOVM-9 ~]#
vSphere version:
Version 6.7.0.1150 Build 8170132
Operating System/Shell (used to run SDK-based apps):
Red Hat 7.3
Steps or code snippet to reproduce
I attached the sample code that i used. failed the function add_remove_vm_disk. Other functions succeeded.
vsphere_api_1.zip
Problem description:
Hi,
Trying to add device /vmfs/devices/disks/eui.57df0280647efa2de9751c5d0000000a as RDM disk to VM I do the following
datastore_root_path = "[vm1_thick] RHEL70_thick13"
datastore_path = datastore_root_path + '/RHEL70_thick13_2.vmdk'
by running
vdm = service_instance.content.virtualDiskManager
task = vdm.CreateVirtualDisk(
datastore_path, datacenter_mo,
vim.VirtualDiskManager.DeviceBackedVirtualDiskSpec(
diskType='rdmp', adapterType='lsiLogic',
device = "/vmfs/devices/disks/eui.57df0280647efa2de9751c5d0000000a"))
pyVim.task.WaitForTask(task)
After this call in the directory
/vmfs/volumes/vm1_thick/RHEL70_thick13 appear meta file RHEL70_thick13_2.vmdk and disk file RHEL70_thick13_2-rdmp.vmdk
Run the following code adapted from https://github.com/vmware/vsphere-automation-sdk-python/tree/master/samples/vsphere/vcenter/vm/hardware/disk.py
Got the following error:
File "/root/vmware/vsphere_api.py", line 320, in add_remove_vm_disk
disk = self.client.vcenter.vm.hardware.Disk.create(vm=self.vm, spec=disk_create_spec)
File "/root/vSphere_sdk_virt_env/lib/python3.5/site-packages/com/vmware/vcenter/vm/hardware_client.py", line 2634, in create
'spec': spec,
File "/root/vSphere_sdk_virt_env/lib/python3.5/site-packages/vmware/vapi/bindings/stub.py", line 317, in _invoke
return self._api_interface.native_invoke(ctx, _method_name, kwargs)
File "/root/vSphere_sdk_virt_env/lib/python3.5/site-packages/vmware/vapi/bindings/stub.py", line 275, in native_invoke
self._rest_converter_mode)
com.vmware.vapi.std.errors_client.InvalidArgument: {messages : [LocalizableMessage(default_message="Incompatible device backing specified for device '0'.", args=[], id='vmsg.InvalidDeviceBacking.summary')], data : None}
PowerCli command
New-HardDisk -VM RHEL70_thick13 -DiskType RawPhysical -DeviceName /vmfs/devices/disks/eui.57df0280647efa2de9751c5d0000000a
and RDM disk addition though vSphere client work OK and querying the disks shows that I gave correct parameters in the above functions.
Can you advise please what is the problem and how to solve it?
Thanks
Actual behavior
Get the following exception:
com.vmware.vapi.std.errors_client.InvalidArgument: {messages : [LocalizableMessage(default_message="Incompatible device backing specified for device '0'.", args=[], id='vmsg.InvalidDeviceBacking.summary')], data : None}
Expected behavior
Added RDM disk to VM
The text was updated successfully, but these errors were encountered: