ESXi

 View Only
  • 1.  Add Static route or Default Gateway without logging into VM

    Posted Feb 05, 2015 12:34 PM

    Hi,

    I am relatively new to VMWare products and I am developing a software solution for a client that requires us to add either

    1. Default Gateway to the Virtual Machines.

    Or

    2. Static route to the Virtual Machines

    The solution we need requires us to do this without logging in to the Virtual Machine.

    A networking expert has suggested us to look into 3 possibilities:

    1. Using some VMWare tool to achieve the above task

    2. Writing directly to the Virtual Machine image file and editing it's Windows registry to add default gateway or static route

    3. Use an Api/SDK to do the above.

    Can this be done suing VMWare workstation tools or vSphere Web services SDK.

    Please suggest.

    Regards,

    Gagan



  • 2.  RE: Add Static route or Default Gateway without logging into VM

    Posted Feb 05, 2015 02:00 PM

    We can modify NIC settings using Set-VMGuestNetworkInterface PowerCLI cmdlet, but it still requires Guest credentials (i.e. logging is required). This is like running any guest based tool to configure routing. That is indeed desirable, to prevent host side hacking of a Guest VM. Will continue to look for more options.

    Option 2 should work. Like running post install scripts after the OS is installed and Network is configured.



  • 3.  RE: Add Static route or Default Gateway without logging into VM

    Posted Feb 06, 2015 02:20 PM

    Thanks for suggesting the Power CLI cmdlet.

    Is there any equivalent api in VSphere web Service SDK.

    I tried to find this out but haven't met with success as yet.

    Regards,

    Gagan



  • 4.  RE: Add Static route or Default Gateway without logging into VM

    Posted Feb 05, 2015 05:13 PM

    Could you not use DHCP & DHCP reservations with the VM clients?  (The MAC address is on listed on the NIC properties on ESX.)

    Alternative you could use a login script to configure these settings when you deploy the windows VM.

    Hope this helps.

    Rob