VMware Cloud Community
yanivamrami
Enthusiast
Enthusiast
Jump to solution

Change VM's network connection

Hi,

I am trying to find a way to change a VM's network connection from one Network Label to another.

Do you have any idea how can I do that?

The VM already exists.

Thank you

Yaniv

Please rate helpful / correct answers. Thank you
0 Kudos
1 Solution

Accepted Solutions
halr9000
Commander
Commander
Jump to solution

Here's how to do it using the toolkit:

Get-VM <vmname> | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName <new network name>






[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator

Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000

View solution in original post

0 Kudos
3 Replies
RicardoAugusto
Contributor
Contributor
Jump to solution

Just edit the settings of the VM, choose the network adapter and select another network label for this nic.

Ricardo

0 Kudos
nhvm
Contributor
Contributor
Jump to solution

Connect to the Virtual Center

Click on the VM you want to change

Click on "Edit Settings"

On the popup box click "Network Adapter"

Clear the check mark in the "connected box"

At the "Network label" box use the pull down menu to select the network connection you want and select it.

Put a check back in the "Connected box"

This will cause the VM to loose connection to the network. Be sure the network you select is the correct subnet for the VM. You may need to restart the network or reboot the VM depending on the OS.

Hope this help.

0 Kudos
halr9000
Commander
Commander
Jump to solution

Here's how to do it using the toolkit:

Get-VM <vmname> | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName <new network name>






[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator

Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos