Connect to a remote Linux (VMWare) VM using Windows 10

11,091

VMware Workstation has a mode for virtual machines called 'Shared'. It allows another instance of Workstation to connect to a host via the network, and effectively take full control over the virtual machines that the server - in this case your windows 10 machine - has shared.

This mode was added in Workstation 9; so I would imagine your version is at least that high. I've been using this since version 10, and the configuration hasn't changed much at all.

When I refer to host below, I am referring to the machine running VMware Workstation that has the guest operating system running locally in it; windows 10 and Linux, respectively, in your case. I caught myself mixing terms and want to make sure that's clear.

With the Workstation sharingcapability your connections are not to the guest (e.g. Linux) operating system directly, but to the the host computer and the vmware workstation server application. I prefer this over 'native' connection methods such as VNC, RDP, ssh, etc., because it doesn't matter if the virtual machine is on, has network connectivity, or has appropriate routing configured so that you can remotely reach it. No matter how many virtual machines you have on the host, you only need to be to reach the host - from the internet you can use port forwarding to the host computer, a VPN connection to your home network, etc.

Performance is good; on par with the other methods (although ssh without x forwarding will win that race every time).

Configuring it is straightforward. Each step, for both client (remote computer running vmware workstation but not hosting the virtual machine) and server (the host) are well documented on their website: VMware Workstation 12

The process to make your local VM a shared VM is essentially this (going by version 12 here; earlier versions may have slight differences)

Server Side

  1. On the windows 10 machine, open VMware Workstation. If the Linux guest is running, shut it down (don't pause it, fully power it down).
  2. Make sure that sharing is enabled: On the menu bar, click edit, and select preferences. Select 'Shared VMs' in the selection list on the left, then make sure that 'Enable Virtual machine sharing and remote access' is selected. Select it if it is not, and hit close. You may need to get temporary admin (UAC) to make the selection, but on the windows version there is a button to click to request it.
  3. Now go to the main screen, find your linux virtual machine, and right click it. Select Manage, then sharing.
  4. A sharing 'wizard' will open, and walk you through the rest.

Caveats - it defaults to port 443; I have no idea why as I always get an error when I leave it at the default (step 2 above). If you do get a 'port in use' error, change it to port 444. Besides, if you need to configure port forwarding to connect to the windows 10 machine from outside of your LAN, its best not to route all port 443 traffic to your windows machine; others in your house may not be thrilled that https stopped working.

For some reason, VMware disables cut and paste support between guest and host when the VM is shared, and 'shared drives' between local guest and local host are also disabled. I just use NFS or Samba shares to do Linux / Windows file transfers.

Client side

  1. Once it's configured on the server side, open workstation on the laptop. Make sure the laptop is on the same network as your windows machine.
  2. Click File, then 'Connect to Server'
  3. In the connection dialog, enter either the ip address of the windows machine or it's machine name (on a LAN netbios between two windows machines allows hostname lookup).
  4. If you changed the port from 443 in the server setup, enter it like this (without the < > symbols) : If you left it with the default port, you don't have to enter it, just the machine name. THe user name and password are the credentials you use to login to the windows 10 'host' machine.

Once connected you can open the virtual machine in exactly the same way you do locally on the windows host - you can also turn it on, off, configure it, add remove devices etc. in the same way.

Check out the documentation I linked to if its not clear. I'd suggest you try this method; its typically easier than working out the required settings to get RDP or other methods to get through to the guest OS. If you do go down that road (RDP / VNC / etc), I strongly encourage you to configure the network for the guest in 'bridged' mode; it will make it significantly easier.

Share:
11,091

Related videos on Youtube

argamanza
Author by

argamanza

Updated on September 18, 2022

Comments

  • argamanza
    argamanza over 1 year

    Well it seems like a very simple thing to do but i couldn't find anything online that simply explain how to do this:

    I have a Desktop PC running Windows 10 which i installed "VMWare Workstation" and created a virtual machine that runs Linux (Distribution doesn't matter), and i want to be able to use that virtual machine via my Laptop which also runs Win 10 and has "VMWare Workstation" installed.

    Can i do it? If yes how?

    • Brian Duke
      Brian Duke almost 8 years
      What are you trying to "use" on the virtual machine, remote desktop, SSH?
    • argamanza
      argamanza almost 8 years
      @user3623501 I prefer a remote desktop bust SSH would be OK
    • David H
      David H almost 8 years
      What type of networking did you configure for the VM? NAT, bridged, host only?