Vhtforums
AI Assistant
is it possible to u...
 
Notifications
Clear all

is it possible to use esxcli to attach the host to new VLAN add new IP , mask gateway and new DNS in one command from the console

1 Posts
1 Users
0 Reactions
1,260 Views
Brandon Lee
Posts: 691
Admin
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@brandon-lee)
Member
Joined: 16 years ago
[#21]

I had this question in the comments on my post about changing the ESXi management IP and VLAN. I will need to so some more testing to validate everything and see how to properly string this together. Just some initial thoughts:

esxcli network ip interface add --interface-name=vmkX --portgroup-name=portgroup
esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=IP --netmask=NETMASK --type=static
esxcli network ip interface tag add -i vmk0 -t Management

Change ESXi Management IP Address and VLAN on vSphere Distributed Switches VDS - Virtualization Howto