VM Share Host VPN Connection on VMware Workstation

You may need to access the internet with a VPN for privacy or performance. The most popular VPN solution is Shadowsocks. If you are an IT Pro, you may face a similar issue that I’m facing: How does VM share host VPN connection?

My home lab is running on top of VMware Workstation on a Windows 10 computer. The virtual machines use the NAT network to communicate outside. It goes over the internet through my ISP directly. The performance of AWS or Azure is slow.

I tried Shadowsocks on the Windows 10 computer. The performance is good. But Shadowsocks is not like other VPN solutions. Its only functions for the host computer (The Windows 10 computer). I had to run Shadowsocks client on each virtual machine to get the better speed.

I read an article that is talking about how to share host VPN with VirtualBox. It gave me some ideas. The solution is actully similar:

  1. Make sure the “Allow Clients from LAN” option is checked in the Shadowsocks client.
  2. Find out the IP address of the NAT network on VMware Workstation on the Windows 10 computer. (The NIC name is “VMware Network Adapter VMnet8” by default)
  3. Configure the proxy in a virtual machine. The IP address is the same to step 2’s. And the port is 1080 by default.

You don’t have to disable the firewall on the host or guest machine. This is a very straightforward configuration to allow VM share host VPN connection.

vCenter is not sending email alerts

It’s useful to get email notification when there is an alarm raised in vCenter Server. To configure the function. You need a valid SMTP server. And configure the SMTP server on vCenter Server. If there is a problem that vCenter Server is not sending email alerts. We need to isolate is it a vCenter Server side issue, or an SMTP server problem. Therefore how to identify problem source is important.

VMware moved vCenter Server to a customized Linux based platform since 5.5. It’s easy for administration, but limited ability in troubleshooting. You may notice that the telnet command is not available when troubleshooting the SMTP issue.

The following is how to troubleshoot such an issue on the vCenter Server virtual appliance.

Firstly, you need to ping the IP address and FQDN of the SMTP server. Make sure the basic connectivity between the vCenter Server and SMTP server is working.

Second, try to reach out to SMTP service on the vCenter Server to make sure the SMTP protocol can be established. Since the telnet command is unavailable on the vCenter Server virtual appliance. We use curl command as a workaround:

curl -v telnet://SMTP SERVER:SMTP PORT

For example:

curl -v telnet://zhengwu.org:25

You should see the keyword “Connected to zhengwu.org….” if the connection is successful. That means the basic connectivity between the vCenter Server and the SMTP server is working.

Then you can try sending an email manually on the vCenter Server shell. The following are the commands. Please note there is a . at the end of the command. It indicates the end of the mail.

MAIL FROM:sender@zhengwu.org
RCPT TO:Reception@zhengwu.org
DATA
Subject: This is a testing mail
This is testing content
.

If SMTP is working fine. You should see following message:

250 2.0.0 xxxxxx Message accepted for delivery

If all of these testing are passed. Then it maybe indicate it’s a SMTP server issue.

Following are some articles for your reference:

Emails are not sent from vCenter Server Appliance 6.5 or 6.7 after an Alert/Event is triggered.

Diagnosing why VMware vCenter Server is not sending email alerts

How to reset Azure Migrate Appliance

Azure Migrate appliance is a simple tool to move VMware virtual machines to Azure. But it has limitation to migrate VMs on multiple vCenter servers. In other words, you have to deploy multiple appliances to support multi-vCenter. This is a time-consuming task. In fact, there is a way to reset the Azure Migrate Appliance.

There is a file appliance.json in Azure Migrate appliance. It stores the key information of the Azure Migrate project. The credentials, vCenter server, and key vault information are all stored in the file. Also the registration status.

The file is located in C:\ProgramData\Microsoft Azure\Config\. It’s a JSON file. The variable IsApplianceRegistered indicates if the appliance registered or not.

Change the value from True to False will reset Azure Migrate appliance status. Of course, you still need to reboot the appliance.

This reset is no impact to stored credential and vCenter server data.

Connectivity check failed on Azure Migrate Appliance

Azure Migrate is a straightforward method to migrate VMware virtual machines to Azure. You just deploy an Azure Migrate Appliance on the on-premise data center. And then replicate VMware virtual machines to Azure. The Azure Migrate Appliance upgrades to the latest version in launching. You may see the connectivity check failed in the “Set up prerequisites” step after the updating.

The connectivity check to Azure is failing

If the connectivity check failed error is related to “https://www.office.com/login“. Then the reason is the undocumented URL. “*.office.com” should be whitelisted on the firewall. The URL is presented in prerequisites recently. In addition, Microsoft is not yet updating it in their document at this moment.