var spec = new VcVMwareDVSConfigSpec();
spec.configVersion = dvs.config.configVersion;
...
dvs.reconfigureDvs_Task(spec);
...
dvs.reconfigureDvs_Task(spec);
it failed as the spec version has not changed.
error:can not complete operation due to concurrent modification by another operation.
if I get the new spec version before execute dvs.reconfigureDvs_Task(spec) it can work.
namely it can work with the following scripts:
var spec = new VcVMwareDVSConfigSpec();
spec.configVersion = dvs.config.configVersion;
...
dvs.reconfigureDvs_Task(spec);
...
spec.configVersion = dvs.config.configVersion;
dvs.reconfigureDvs_Task(spec);
But the issue it that I must do some operation in the old spec. So must recofigueDvs in the same spec version twice.
Is anyone familiar with it? Waiting for your help.