3 tips for using Linux under VMware workstation

  • 2020-05-17 07:11:28
  • OfStack

Many people say that virtual machines are difficult to manage because we don't have a good grasp of how to use virtualization. Today, we will look at three Linux VMware workstation skills.

1. VMWare is no longer limited to NAT

Environment: the host is UBUNTU8.04_amd64, VMware workstation 6.0.x

Using VMWare1 under UBUNTU (actually LINUX as the host) has two recognized problems. 2 is the problem of bridging the wireless network card. There has been a lot of discussion about the solution online, but I haven't been able to solve it according to the online method for a long time (so I have been using NAT to share the wireless network with the host for a long time, but some applications have problems). The problem of bridging the wireless network card has finally been solved by me today. Let me write it here so as not to waste more time for others.

Problem description: VMWare is used under LINUX. If the host is using a wireless network card, the client network card cannot be connected if it is using a bridge. According to the discussion results of VMWare forum, if the host is windows, there is no problem, because the driver supports the wireless network card to work as AP mode, which is not 99% under LINUX. After practice, I found that it can be solved, which requires two steps:

1. Modify one of the files and recompile. The relevant patch file is attached.

2. The network card configuration of the client does not choose bridge. Instead, according to the prompt when VMWare runs config, which device is to bridge the wireless network card to, custom is selected accordingly (note: Bridged bridge mode is not selected, otherwise it is impossible to connect. It was a mistake I Shared with others in the past. , and then select the corresponding device from the drop-down list. For example, on my machine, vmnet2 is bridged to wlan0, so vmnet2.

2. If the host is LINUX and the client is LINUX, how to switch the virtual terminal in the client?

If both host and client are LINUX, what do you do if you want to switch virtual terminals in the client? If you still use Ctrl+Alt+ F1-F7, you will find that you can only switch the host. If you want to switch in the client, you need to use Ctrl+Alt+ space. After releasing the space, press F1-F7 (note: Ctrl+Alt cannot be loosened), then you can switch to the corresponding virtual terminal in the client.

3. How to add virtual network card?

When LINUX is the host, instead of WINDOWS, it will automatically build all the virtual network CARDS. Instead, it will only build 2-3 virtual network CARDS, such as vmnet0, vmnet1, vmnet8, and vmnet2 if there are two Bridges. What if it's often not enough to build experimental networks and you need other virtual network CARDS?

Here's how :(add vmnet5 as an example)

Modify /etc/vmware/locations file, at the beginning of the file:

answer NETWORKING yes
answer VNET_0_INTERFACE eth0
answer VNET_8_NAT yes
answer VNET_8_HOSTONLY_HOSTADDR 192.168.63.1
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_HOSTADDR 192.168.95.1
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0

Add the other vmnet. If you need nat service, define it as answer VMNET_5_nat yes. If you don't need nat, add:

answer VNET_5_HOSTONLY_HOSTADDR 192.168.64.1
answer VNET_5_HOSTONLY_NETMASK 255.255.255.0

/ etc/init d/vmware restart, can find/dev/vmnet5 already exist, and also can discover new vmnet5 after ifconfig interface.


Related articles: