VMware {code} Community
kakakikikeke
Contributor
Contributor
Jump to solution

The vix-disklib-sample command of VDDK 6.7.1 does not work on remote host

"Error: [vixDiskLibSample.cpp: 1576] 3 One of the parameters was invalid" error occurred while executing the following command.

root@localhost.localdomain:~# ls -l VMware-vix-disklib-6.7.1-10362358.x86_64.tar.gz
-rwx------ 1 root root 20593857 Nov 29 15:44 VMware-vix-disklib-6.7.1-10362358.x86_64.tar.gz
root@localhost.localdomain:~/vmware-vix-disklib-distrib# cd doc/samples/diskLib/
root@localhost.localdomain:~/vmware-vix-disklib-distrib/doc/samples/diskLib# ls -ltr
total 92
-r--r--r-- 1 root root 90014 Oct  8 11:19 vixDiskLibSample.cpp
-r--r--r-- 1 root root   835 Oct  8 11:19 Makefile
root@localhost.localdomain:~/vmware-vix-disklib-distrib/doc/samples/diskLib# make
g++ -std=c++11 -lpthread -o vix-disklib-sample -I../../../include -L../../../lib64 vixDiskLibSample.cpp -ldl -lz -lsqlite3 -lcurl -lssl -lcrypto -lvixDiskLib
g++ -std=c++11 -lpthread -o vix-mntapi-sample -DFOR_MNTAPI -I../../../include -L../../../lib64 vixDiskLibSample.cpp -ldl -lz -lsqlite3 -lcurl -lssl -lcrypto -lvixDiskLib -lvixMntapi
root@localhost.localdomain:~/vmware-vix-disklib-distrib/doc/samples/diskLib# ./vix-disklib-sample -info -host 192.168.100.10 -user root -password secret "[datastore1] vm01/vm01.vmdk"
Error: [vixDiskLibSample.cpp:1576]  3 One of the parameters was invalid
root@localhost.localdomain:~/vmware-vix-disklib-distrib/doc/samples/diskLib# g++ -dumpversion
4.8.5
root@localhost.localdomain:~/vmware-vix-disklib-distrib/doc/samples/diskLib# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)


192.168.100.10 is the host of ESXi.
ESXi version is 6.5.0, 5969303.

I was able to create vddk and obtain information locally.

  1. ./vix-disklib-sample -create sample.vmdk
  2. ./vix-disklib-sample -info sample.vmdk

But it will fail for remote host.
Is there anyone who knows what is causing the problem ?

Thanks.

メッセージ編集者: Takayuki Yoshinaka tweak

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
kakakikikeke
Contributor
Contributor
Jump to solution

Running against vcenter instead of esxi worked fine.

./vix-disklib-sample -info  -host 192.168.100.20 -user "administrator@vsphere.local" -password secret -vm "moref=vm-10" -thumb "96:09:d6:5b:e0:83:58:1b:ba:2b:cc:78:22:88:33:36:64:50:32:eb" "[datastore1] vm01/vm01.vmdk"

192.168.100.20 is vCenter's IP.

It seems that the option of -vm "moref=vm-10" was mandatory.
In the same way, when executed on esxi, the following error occurred.

Error: [vixDiskLibSample.cpp:1564]  14 The command is not supported on remote objects

Is it impossible for esxi ?

View solution in original post

5 Replies
kakakikikeke
Contributor
Contributor
Jump to solution

Running against vcenter instead of esxi worked fine.

./vix-disklib-sample -info  -host 192.168.100.20 -user "administrator@vsphere.local" -password secret -vm "moref=vm-10" -thumb "96:09:d6:5b:e0:83:58:1b:ba:2b:cc:78:22:88:33:36:64:50:32:eb" "[datastore1] vm01/vm01.vmdk"

192.168.100.20 is vCenter's IP.

It seems that the option of -vm "moref=vm-10" was mandatory.
In the same way, when executed on esxi, the following error occurred.

Error: [vixDiskLibSample.cpp:1564]  14 The command is not supported on remote objects

Is it impossible for esxi ?

hwangwenchao
Contributor
Contributor
Jump to solution

I also encountered this problem. How do you solve it? How to connect the esxi host?

0 Kudos
dante9527
Contributor
Contributor
Jump to solution

me too.Do u solve this problem?

0 Kudos
hwangwenchao
Contributor
Contributor
Jump to solution

hi 9527,According to my test, the demo only supports vCenter, and requires “vm” and ”thumb” fields to connect successfully; If ESXi is connected, "appGlobals. vmxSpec!=NULL" in the source code should be removed
Yang_
Contributor
Contributor
Jump to solution

thanks, it works.

0 Kudos