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

create_dvs_and_dvport_group - example for MTU adjustment pls? #12

Open
ghost opened this issue Feb 9, 2017 · 3 comments
Open

create_dvs_and_dvport_group - example for MTU adjustment pls? #12

ghost opened this issue Feb 9, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 9, 2017

interested in adding to the code, so maxMtu and lacpApiVersion can be set to a non default value

https://pubs.vmware.com/vsphere-65/index.jsp#com.vmware.wssdk.smssdk.doc/vim.dvs.VmwareDistributedVirtualSwitch.ConfigSpec.html

thx

@reubenur-rahman
Copy link
Owner

@markchuman

Try the given below code for configSpec

dvs_config_spec = vim.dvs.VmwareDistributedVirtualSwitch.ConfigSpec()
dvs_config_spec.name = "testDVS"
dvs_config_spec.maxMtu = 6000        #1500-9000
dvs_config_spec.lacpApiVersion = vim.dvs.VmwareDistributedVirtualSwitch.LacpApiVersion.multipleLag

@ghost
Copy link
Author

ghost commented Feb 10, 2017

Thank you & sorry for noob status right now, but where would you insert this block at?

def create_dvSwitch(si, content, network_folder, cluster):
pnic_specs = []
dvs_host_configs = []
uplink_port_names = []
dvs_create_spec = vim.DistributedVirtualSwitch.CreateSpec()
dvs_config_spec = vim.DistributedVirtualSwitch.ConfigSpec()
dvs_config_spec.name = inputs['dvs_name']
dvs_config_spec.uplinkPortPolicy = vim.DistributedVirtualSwitch.NameArrayUplinkPortPolicy()
dvs_config_spec = vim.dvs.VmwareDistributedVirtualSwitch.ConfigSpec()
dvs_config_spec.name = inputs['dvs_name']
dvs_config_spec.maxMtu = 9000
dvs_config_spec.lacpApiVersion = vim.dvs.VmwareDistributedVirtualSwitch.LacpApiVersion.multipleLag

hosts = cluster.host
for x in range(len(hosts)):
uplink_port_names.append("dvUplink%d" % x)

@tkrausjr
Copy link

tkrausjr commented May 8, 2020

I am trying to configure an MTU also on a DVS and having an issue. It looks like VMwareDistributed VirtualSwitch can be used which is different than how I configured my switch as a vim.DistributedVirtualSwitch.

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