VMware Cloud Community
adomszent
Contributor
Contributor
Jump to solution

Change Video Card setting on next reboot

Hi,

Can someone show me how to use orchestrator to change the Video Card Setting of a VM to "Auto-detect settings" the next time the VM reboots?

I tryed myself, but i think i need a lot more time with orchestrator to understand how it works.

Thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
tschoergez
Leadership
Leadership
Jump to solution

Hi!

Use Onyx to figure it out....

What you get in short:

var managedObject = vm;
// ------- ReconfigVM_Task -------
var spec = new VcVirtualMachineConfigSpec();
spec.deviceChange = System.getModule("com.vmware.onyx").array(VcVirtualDeviceConfigSpec, 1);
spec.deviceChange[0] = new VcVirtualDeviceConfigSpec();
spec.deviceChange[0].operation = VcVirtualDeviceConfigSpecOperation.edit;
spec.deviceChange[0].device = new VcVirtualMachineVideoCard();
spec.deviceChange[0].device.key = 500;
//spec.deviceChange[0].device.deviceInfo = new VcDescription();
//spec.deviceChange[0].device.deviceInfo.label = "Video card ";
//spec.deviceChange[0].device.deviceInfo.summary = "Video card";
//spec.deviceChange[0].device.controllerKey = 100;
//spec.deviceChange[0].device.unitNumber = 0;
//spec.deviceChange[0].device.videoRamSizeInKB = 4096;
//spec.deviceChange[0].device.numDisplays = 1;
spec.deviceChange[0].device.useAutoDetect = true;
//spec.deviceChange[0].device.enable3DSupport = false;
task = managedObject.reconfigVM_Task(spec);  // VirtualMachine

What you get in a whole: See attached Workflow Smiley Happy.

How to get there: See this video (created just for you :smileylaugh:):

https://vimeo.com/41911520

and be patient: I plan to create a blog-post on this, and update the video with audio explanations.....

Regards,

Joerg

View solution in original post

Reply
0 Kudos
2 Replies
tschoergez
Leadership
Leadership
Jump to solution

Hi!

Use Onyx to figure it out....

What you get in short:

var managedObject = vm;
// ------- ReconfigVM_Task -------
var spec = new VcVirtualMachineConfigSpec();
spec.deviceChange = System.getModule("com.vmware.onyx").array(VcVirtualDeviceConfigSpec, 1);
spec.deviceChange[0] = new VcVirtualDeviceConfigSpec();
spec.deviceChange[0].operation = VcVirtualDeviceConfigSpecOperation.edit;
spec.deviceChange[0].device = new VcVirtualMachineVideoCard();
spec.deviceChange[0].device.key = 500;
//spec.deviceChange[0].device.deviceInfo = new VcDescription();
//spec.deviceChange[0].device.deviceInfo.label = "Video card ";
//spec.deviceChange[0].device.deviceInfo.summary = "Video card";
//spec.deviceChange[0].device.controllerKey = 100;
//spec.deviceChange[0].device.unitNumber = 0;
//spec.deviceChange[0].device.videoRamSizeInKB = 4096;
//spec.deviceChange[0].device.numDisplays = 1;
spec.deviceChange[0].device.useAutoDetect = true;
//spec.deviceChange[0].device.enable3DSupport = false;
task = managedObject.reconfigVM_Task(spec);  // VirtualMachine

What you get in a whole: See attached Workflow Smiley Happy.

How to get there: See this video (created just for you :smileylaugh:):

https://vimeo.com/41911520

and be patient: I plan to create a blog-post on this, and update the video with audio explanations.....

Regards,

Joerg

Reply
0 Kudos
adomszent
Contributor
Contributor
Jump to solution

Thanks, you're awesome.

It's really pretty simple, thank for the video to show me how it works.

Reply
0 Kudos