VMware {code} Community
MDKing
Contributor
Contributor

UpdateVirtualSwitch - RestrictedVersionFault

Hi:

I'm attempting to update a virtual switch but I'm continuously getting stuck with a SOAP fault that is saying:

SOAP Fault:

-


Fault string: fault.RestrictedVersion.summary

Fault detail: RestrictedVersionFault

ESXi server API is 2.5.0 and I re-installed the VI Perl Toolkit, ver. 1.6 that is compatible with SDK 2.5. Anyone have any points? This is the first time this issue has popped up given all the Perl scripts I have written for ESXi so far.

Here's a snip' of the code

eval

{

  1. get options

my $vsName = Opts::get_option('vs');

my $vsPorts = Opts::get_option('vsports');

  1. HostNetworkTrafficShapingPolicy

my $hostNTSP = HostNetworkTrafficShapingPolicy->new(

averageBandwidth => 1,

burstSize => 1,

enabled => 1,

peakBandwidth => 1

);

  1. HostNetworkPolicy

my $hostNP = HostNetworkPolicy->new(

shapingPolicy => $hostNTSP

);

  1. HostVirtualSwitchSpec

my $hostVSS = HostVirtualSwitchSpec->new(

numPorts => $vsPorts,

policy => $hostNP

);

  1. Update switch

$netSys->UpdateVirtualSwitch(

vswitchName => $vsName,

spec => $hostVSS

);

};

Reply
0 Kudos
3 Replies
admin
Immortal
Immortal

Are you using the free version of ESXi? On the free version the APIs, for the most part, can only be used to do read-only activities like monitoring.

Reply
0 Kudos
MDKing
Contributor
Contributor

Hi:

No we have purchase licenses but I know our IT department mentioned problems with inputting the licenses itself. Is this possibly a result of it expiring or something? If so I'll have to gracefully get them to address the issue Monday.

Reply
0 Kudos
MDKing
Contributor
Contributor

I checked with the ESXi license and it is fully installed and is a paid license. Other scripts such as powering on VMs, querying the host time and setting it, along with configuring NTP all still work. It appears that configuring the virtual switch is the only function that seems to be returning a "RestrictedVersionFault" so far.

Reply
0 Kudos