Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Nic config sample #5

Open
ecornely opened this issue Feb 2, 2017 · 4 comments
Open

Edit Nic config sample #5

ecornely opened this issue Feb 2, 2017 · 4 comments

Comments

@ecornely
Copy link
Contributor

ecornely commented Feb 2, 2017

Hello,

I'm looking for a working sample that would show me how to change the VLAN connected to a nic.

I tried by getting the card, changed the backing to the VirtualEthernetCardDistributedVirtualPortBackingInfo I'd like to set and perform a edit operation.
Though I receive success nothing happens.

Is there any sample that perform an edit anywhere ?

@michaelrice
Copy link
Member

Are you looking for something with a DVS or a Standard VirtualSwitch?

@ecornely
Copy link
Contributor Author

ecornely commented Feb 3, 2017

Right now DVS but any kind of edit could help. I can't even switch the connected at startup checkbox or anything.

@ecornely
Copy link
Contributor Author

ecornely commented Feb 9, 2017

This is the code I use to create a new nic on an existing VM : addNic method

When I try to use VirtualDeviceConfigSpecOperation.edit and change the backing of the existing device nothing happens. I'd like to have any example that use the edit operation to see what I'm supposed to provide as info to this kind of stuff.

@michaelrice
Copy link
Member

I found this: https://gist.github.com/grier/1814534 Can you let me know if it works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants