Saturday, December 9, 2017

Installing Debian 9 in a VMWare virtual machine using Raspberry-Pi-Desktop

Installing the guest OS itself is pretty straight forward. Just boot from the ISO of the raspberry-pi-desktop installer.

https://www.raspberrypi.org/downloads/raspberry-pi-desktop/

Raspbian is the Raspberry Pi Foundation’s official supported operating system, based on Debian with the latest version running Debian 9 code-named Stretch.

https://www.raspberrypi.org/downloads/raspbian/

After the guest OS has been installed, it is customary to update the OS with the latest files by running two commands.

sudo apt-get update

sudo apt-get upgrade

This only updates the OS itself but does not install any specific drivers for the virtual hardware that is VMWare Player or Workstation. These specific drivers plus other extra enhancement features are called VMWare Tools. For example, with VMWare Tools installed in the Raspbian OS guest, the guest can share a folder on the host side, basically creating a network between guest and host for the purpose of sharing files.

http://partnerweb.vmware.com/GOSIG/Debian_9.html

Open VM Tools is the open source implementation of VMware Tools. As stated in the support page, VMware recommends using the Open VM Tools included with Debian 9 instead of using its own VMware Tools for Linux which I suspect is designed for the generic Linux kernel as oppose to the specific distribution.

The support page says to add the following line to the /etc/apt/sources.list file.
deb http://ftp.debian.org/debian/ stretch main contrib

However, given that the Debian 9 used for Raspian OS (i.e raspberry-pi-desktop) is customized for the Raspberry Pi devices, this deb http://ftp.debian.org/debian/ stretch main contrib line has already been added to the /etc/apt/sources.list file.

Therefore, within Raspbian, you would only need to run the following command:

$ sudo apt-get update 
$ sudo apt-get install open-vm-tools

Raspbian will go to the online depository to grab the Debian 9 Open VM Tools and install it automatically!

One of the things you can do after VMWare Tools has been installed is the ability to share a folder between the guest Raspbian OS and the host OS such as Windows. After you have specified where the shared folder is on the host, go to /mnt/hgfs folder on the Raspbian side and you will see this shared folder on the host.

A good video on how to install VMWare Tools is this:

https://www.youtube.com/watch?v=hJPqM9QYeR0

The help page that the author of the video uses is this:

https://communities.vmware.com/message/2682930#2682930

If this page is not found, below is a copy of the instructions

You can just install VMware Tools in a terminal window in Jessie, you can stay in graphical mode, no need to switch.

It sounds like that the vmware host guest share drivers are broken in the open vmtools variant of Jessie, this is also an issue in a few versions of ubuntu.
Guess they might share some code there.

The easiest solution is to install the vmware tools version that comes with VMware Fusion.
But before you do, completely remove the open vm tools variant from debian.

sudo apt-get purge open-vm-tools
sudo apt-get purge open-vm-tools-desktop

then select install VMware Tools from the virtual machine menu in Fusion. Note that this just presents a CDrom to the guest, so you will have to install

If you're not sure on how-to do that, then here's a script I've used in the past:


#!/bin/bash 
 
sudo apt-get update 
sudo apt-get upgrade 
echo "Do go and mount your cdrom from the VMware menu" 
echo "press any key to continue" 
read -n 1 -s 
mount /dev/cdrom 
cd /media/cdrom0 
cp VMwareTools-*.tar.gz /tmp 
cd /tmp 
tar xvzf VMwareTools-*.tar.gz 
cd vmware-tools-distrib/ 
sudo apt-get install --no-install-recommends libglib2.0-0 
sudo apt-get install --no-install-recommends build-essential 
sudo apt-get install --no-install-recommends gcc-4.3 linux-headers-`uname -r` 
sudo ./vmware-install.pl --default 
 
sudo /etc/init.d/networking stop 
sudo rmmod pcnet32 
sudo rmmod vmxnet 
sudo modprobe vmxnet 
sudo /etc/init.d/networking start 















No comments:

Post a Comment