Jan 27, 2021

Full error I get is the following:

rror:
- Access to resource settings on the host is restricted to the server that is managing it: 'vcenterip'.
Warning:
- Wrong file size specified in OVF descriptor for 'sperfVMv2-disk1.vmdk' (specified: 760487424, actual 760455429).
Completed with errors

Jan 27, 2021

Hi Kent,
This is the cause of the error:
The OVA upload from the client deploying the OVA to the vCenter is not upload the OVA correctly adding additional data to the import.
Connecting through VPNs or Proxies and other network devices can append extra data to the import.
Resolution:
Currently, there is no resolution.
This will require troubleshooting the network between the client deploying the OVA and vCenter to find out where the additional data is getting added.
A workaround :
Deploy the OVA from another computer and network path, or a jumpbox VM that is on the same subnet as the Center.
Thanks

Jan 28, 2021

Hi Haitao,

Thank you for replying. I was running it from Ubuntu Fusion VM on Mac. I deployed Ubuntu VM on vSphere same VLAN as host and while the OVF error is gone, I still have this error:

Error:
- Access to resource settings on the host is restricted to the server that is managing it: 'ipaddressofvcenter'.
Completed with errors

any idea why it has issues with host being managed by vCenter?

Thank you.

Jan 28, 2021

Hi Kent,
This is by design.
To work around this issue:
Stop communication between the host and the vCenter Server by stopping these services with the commands:

/etc/init.d/vpxa stop
/etc/init.d/hostd restart

When these commands have executed, the ESXi host has stopped communicating with the vCenter Server.

You can do the tests now.
After completing the tests, start the vpxa service to add the ESXi host back to vCenter by running the command:

/etc/init.d/vpxa start
Regards.

BTW,
If you meet the bug #1 TypeError: a bytes-like object is required, not 'str',
please modify the sperf.py code at line 95 as below.
proc.communicate(input=(self._passwd.encode()))
Then it may work.

Regards

Jan 29, 2021

Hi Haitao,

Thank you. Yes, I found the KB last night to do this. I now get the Ubuntu VM deployed using the sperf.py script but then when I look at the results I see results from some test that is not mine in the 1 folder. I am not seeing any performance test results for my environment. Can we get a little clearer documentation on what happens after the test VM is deployed and how to see results?

Jan 31, 2021
Feb 01, 2021

Now I am getting this error. I think I was running into bug https://flings.vmware.com/storage-performance-tester/bugs/1159. I followed modification and test VM starts to deploy. Gets 1% done and script ends with this error:

Disk progress: 1%Segmentation fault (core dumped)
Traceback (most recent call last):
File "./sperf.py", line 484, in <module>
sys.exit(main())
File "./sperf.py", line 468, in main
status = sperf.DeployVM(args.vmname, args.ovfurl, args.nosslverify)
File "./sperf.py", line 97, in DeployVM
logging.info("Deploy VM on %s Failed rc=%d." % (ds, rc))
UnboundLocalError: local variable 'rc' referenced before assignment

Jan 24, 2021

Does this tool work for a host managed by vCenter? I get this message:Error:
- Access to resource settings on the host is restricted to the server that is managing it: 'ipaddress'.

Jan 25, 2021

I have the same problem.

Dec 01, 2020

Is there any progress in this tool here? So many comments with problems but no solution can be found. Please help!

Dec 01, 2020

1. modify sperf.py at line 95:
- proc.communicate(input=self._passwd)
+ proc.communicate(input=self._passwd.encode())
2. If you found that the ovftool return errors like 'Unsupported hardware family vmx-##'.
Please modify vmx-17 at line 30 in ovftemplates/sperfVMv2.ovf to the right vmx version (etc, to test on ESXi6.7 U2, change it to vmx15). And then delete ovftemplates/sperfVMv2.mf.
18 ESXi 7.0 u1
17 ESXi 7.0 (7.0.0)
15 ESXi 6.7 U2
14 ESXi 6.7
13 ESXi 6.5

I run it in a new Linux environment. The output as below.
If you meet errors I'll help you out quickly.
haitao@haitao:~/StoragePerformanceTester/sperf$ ./sperf.py 10.110.121.73 -d nhpsa_datastore
2020-12-01 13:48:03,468 - sperf.py:451 - INFO - Using primary log sperf.log.
2020-12-01 13:48:03,469 - sperf.py:461 - INFO - The test results will be put into /home/haitao/StoragePerformanceTester/sperf/results/14
Please enter the root password for 10.110.121.73:
2020-12-01 13:48:05,548 - sperf.py:50 - INFO - Copy id_rsa.pub to the host.
Warning: Permanently added '10.110.121.73' (RSA) to the list of known hosts.
2020-12-01 13:48:06,071 - sperf.py:59 - INFO - Geting basic info on 10.110.121.73
2020-12-01 13:48:14,601 - sperf.py:80 - INFO - The sperf workloads will run on stack Plugin:NMP LS:0milliseconds Driver:nhpsa Disk:ATA ST2000LM003 HN-M 0001
2020-12-01 13:48:14,602 - sperf.py:111 - INFO - Check if the VM (nhpsa_datastore_sperfVMv1) has been deployed.
2020-12-01 13:48:15,870 - sperf.py:120 - INFO - Host 10.110.121.73 doesn't have a VM named nhpsa_datastore_sperfVMv1.
2020-12-01 13:48:15,871 - sperf.py:88 - WARNING - This connect is insecure. please try to add --nosslverify 0 in your tests.
2020-12-01 13:48:15,871 - sperf.py:94 - INFO - /home/haitao/StoragePerformanceTester/sperf/ovftool/ovftool --noSSLVerify -dm=thin --powerOn --X:waitForIp -ds=nhpsa_datastore --name='nhpsa_datastore_sperfVMv1' ./ovftemplates/sperfVMv2.ovf 'vi://root:ca$hc0w@10.110.121.73'
Opening OVF source: ./ovftemplates/sperfVMv2.ovf
Opening VI target: vi://root@10.110.121.73:443/
Warning:
- Line 178: Unable to parse 'tools.syncTimeWithHostAllowed' for attribute 'key' on element 'Config'.
Deploying to VI: vi://root@10.110.121.73:443/
Transfer Completed
Powering on VM: nhpsa_datastore_sperfVMv1
Task Completed
Received IP address: 10.110.122.13
Warning:
- No manifest file found.
- No supported manifest(sha1, sha256, sha512) entry found for: 'sperfVMv2-disk1.vmdk'.
- No supported manifest(sha1, sha256, sha512) entry found for: 'sperfVMv2-file1.nvram'.
Completed successfully
2020-12-01 13:51:38,672 - sperf.py:105 - INFO - Deploy VM on nhpsa_datastore Complete.
2020-12-01 13:51:38,673 - sperf.py:168 - INFO - SetupVM: running command vmkfstools --createvirtualdisk 2G --diskformat eagerzeroedthick /vmfs/volumes/nhpsa_datastore/nhpsa_datastore_sperfVMv1/nhpsa_datastore_sperfVMv1_2.vmdk on the host

Dec 01, 2020

Thank you for your reply but my problem is network related:

tom@SPT:~/sperf$ ./ovftool/ovftool --noSSLVerify -dm=thin --powerOn --X:waitForIp -ds=PROD-01_Vol_03 --name='PROD-01_Vol_03_sperfVMv1' ./ovftemplates/sperfVMv2.ovf 'vi://root:PASSWD@ESXi-Host'
Opening OVF source: ./ovftemplates/sperfVMv2.ovf
The manifest validates
Opening VI target: vi://root@ESXi-Host:443/
Error: No network mapping specified. OVF networks: VM Network. Target networks:
Completed with errors

Dec 01, 2020

What are your Target Networks? Did the ovftool show that?
If you setup the network with other name other than "VM Network".
Please add --network="VM Network" while running the ovftool.

Dec 01, 2020

If you don't know the name, you can go to directory of one VM on your target server. And check what is the network name by check its vmx file.
#grep -i network CoreOs3.vmx
ethernet0.networkName = "VM Network"

or you can use the below command, but I don't know if it was same as that ovftool are going to deploy.
#esxcfg-vswitch -l

Dec 01, 2020

Yes, the ovftool reported this.

We are using distributed switches. So the VM uses a distributed port group.

The ofvtool tells me the following error using the port-group ("VM_Client_VLAN_60"):

Error: Invalid target name (VM_Client_VLAN_60) specified in net mapping. OVF networks: VM Network. Target networks:
Completed with errors

Dec 04, 2020

It seems like a network setup related issue. Would you please try to run the ovftool command?
#./ovftool/ovftool -nw="VM_Client_VLAN_60" --noSSLVerify -dm=thin --powerOn --X:waitForIp -ds=NVMD1 --name='NVMD1_sperfVMv4' ./ovftemplates/ubuntuSPerfv2.ovf 'vi://root:password@Yourserver'

If it failed, please share the output of esxcfg-vswitch -l .
By the way, please make sure you are using root/password or other identities that have the authority to deploy VMs on your target.
Looking forward to your reply.

Dec 08, 2020

I have chaned the template name to "./ovftemplates/sperfVMv2.ovf" and the datstore name to "PROD-01_Vol_03" ...

I get the same error like before!

Dec 08, 2020

Hi Tom,
I don't think this is related to the datastore name.
You may find out what is your network name. You may need to run esxcfg-vswitch -l finding out what is your network port name.

The ovftool command need to add -nw="the name" if the network port name is not "VM Network" (default).

Thanks

Dec 16, 2020

I know that it is not related to the datastore name.

To repeat: we are using distributed port groups and no standard vSwitches (!!!) and I see all port-groups in vCenter (22 port-groups) and I have choosen the correct name.
So, why you are asking for the output of "esxcfg-vswitch -l"?? It gives you only the "DVS Name" and other not usefull information.

Nov 24, 2020

Hi everybody, what I can do with this:
" sperf.py:72 - ERROR - Didn't find the right hardware info based on mydatastore"

and besides this should I specify network mapping?
Thank's a lot for any answer."

Nov 24, 2020

Hi Tomek,
You don't need to config the network.
The error won't block the tests. If it blocked, please try the below command to make sure you can deploy VMs automaticly on the server.
#./ovftool/ovftool --noSSLVerify -dm=thin --powerOn --X:waitForIp -ds=NVMD1 --name='mydatastore_sperfVMv1' ./ovftemplates/sperfVMv2.ovf 'vi://root:yourpassword@yourhost'

To debug the hardware info error, would you please run the below commands and share the output?
# esxcfg-scsidevs -m |grep ' mydatastore$'
# esxcfg-scsidevs -A => I only need which hba that the device attached to
# esxcfg-scsidevs -a. => show which driver it claimed.

Thanks

Nov 29, 2020

I don't get it to run:

I tried your command with ovftool and get a network error (dv-Switch):

Opening OVF source: ./ovftemplates/sperfVMv2.ovf
The manifest validates
Opening VI target: vi://root@my_esxi_host:443/
Error: No network mapping specified. OVF networks: VM Network. Target networks:
Completed with errors

I have tried it now in 3 different vCenters. But eveywhere the same error.

Nov 24, 2020

Hi Haitao, thank a lot for answer.
I see, that I specified DS name correctly,
that's like you said. But besides this I noticed message:

"2020-11-24 15:08:28,232 - sperf.py:72 - ERROR - Didn't find the right hardware info based on "

and after that:
"Opening OVF source: ./ovftemplates/sperfVMv2.ovf
The manifest validates"

and in summary:
"2020-11-24 15:14:54,581 - sperf.py:102 - INFO - Deploy VM on MyDatastoreName Failed rc=1."

an the tests end with unsuccessful.