(if you are using esxi 6.5)
If your VM is not connected to the internet, please follow these step
Log into your esxi and navigate to your VM Click on “Action” button
Click on “Action” button
From the drop down, menu click the “Edit settings”
Click on “Connect “and click on save button