Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 246801

Re: Change VM's video card settings

$
0
0

Joerg,

 

I'm not the greatest with Arrays. The error I received confirms that. ha! Here's what I came up with:

 

 

var spec = new VcVirtualMachineConfigSpec();
spec.deviceChange = new Array(VcVirtualDeviceConfigSpec, 1);
var myDeviceChange = new Array();
var configSpec = new VcVirtualDeviceConfigSpec();
configSpec[0].operation = VcVirtualDeviceConfigSpecOperation.edit;
configSpec[0].device = new VcVirtualMachineVideoCard();
configSpec[0].device.useAutoDetect = true;
configSpec[0].device.enable3DSupport = false;
myDeviceChange.push(configSpec);
spec.deviceChange = myDeviceChange;
vm.reconfigVM_Task(spec);  

 

The exception that it spat out is:

Cannot convert org.mozilla.javascript.NativeArray@704646e2 to com.vmware.vim.vi4.VirtualDeviceConfigSpec[] (Dynamic Script Module name : changeVideoCard3DEnable_1_1#13)

 

Thanks again for your assistance.


Viewing all articles
Browse latest Browse all 246801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>