DEV Community

Cover image for Setting up a Debian 11 virtual machine using VMware Player
Alexandre Cazalis
Alexandre Cazalis

Posted on

Setting up a Debian 11 virtual machine using VMware Player

Well, this is my first post. So don't hesitate to make some remarks on its content !

Let's try to install the famous Linux distribution Debian 11 on a virtual machine, hosted on a Windows x86 64 bit platform.
To do that, I will use VMware Workstation Player as virtualization tool (free for personal use).

A bit of context

Why using a virtual machine ? First, this Debian machine is intended to be used to develop Nintendo 64 homebrews using the old official SDK.

However, I've read that it will be sometimes necessary to use Windows only compatible tools to develop these N64 programs. I think that a dual boot machine will make things harder when switching between the two operating systems.

Why not using Wine directly on linux ?
-> I tried some years ago, and it was a pain to get it functional ... I hope it is better now.

To conclude, my OS dev environment will be :

  • A Windows 10 host machine.
  • A Debian 11 guest machine.
  • A share folder to work with common data.

Installing VM Player

Remark : if you're using an Intel CPU, you'll need to enable virtualization in the BIOS (option named Intel VT-x).

Go to this URL to download the tool : here.
The major release version right now is 16.

After the installation process succeed, you can start the tool to get the main menu :
VM Player main menu

Select a Debian installation image

Go to Debian download page here to select the adapted image file to download.
For me, I chose a 64-bit PC netinst iso file as the platform I'm currently working on is intel x86_64 CPU based.

A network install image means that the installation process will need an internet access. Moreover, the repository of Debian packets (.deb files) will be configured to be used through the Internet (nothing local here).

Configuring the virtual machine

Once the Debian iso file is downloaded, you can create a virtual machine on VM Player from the main menu :

  1. Clic on Create a New Virtual Machine.
  2. Select Installer disc image file (iso) radio button.
  3. Browse the Debian iso file you've downloaded.
  4. Clic on Next.
  5. If not automatically detected, select the operating system of the virtual machine. In our case, choose Linux for the OS, and Debian 10.x 64 bit for the version (11.x not available yet).
  6. Clic on Next.
  7. Choose a name and a location for your VM data.
  8. Clic on Next.
  9. Set the type and the size for the virtual disk. 10 Gb will be enough for my project (count 2Gb for the OS itself). I recommend also to use split files to avoid allocating all the space at the beginning (almost no impact on read/write performance).
  10. Clic on Next.
  11. Clic on Finish.

Now you can see your VM has appeared in the list :

VM in list

Installing Debian 11.x on the VM

Let's start the installation process, by launching the VM (clic on Play virtual machine).
You'll see the Debian install main menu, once the VM has started:

Debian Menu

Remark : I've provided my choices between parenthesis.

  1. Select Graphical install
  2. Select a language (English).
  3. Clic on Continue.
  4. Select your location (other >> Europe >> France).
  5. Clic on Continue.
  6. Configure locales (United Kingdom - en_GB.UTF-8).
  7. Clic on Continue.
  8. Configure the keyboard (French).
  9. Clic on Continue.
  10. At this step, the installer checks that it has an internet access, which is mandatory in our case.
  11. Set an hostname for the VM (debian-n64).
  12. Clic on Continue.
  13. Set a domain name (empty for me).
  14. Clic on Continue.
  15. Set a password for root user. Don't forget it!
  16. Clic on Continue.
  17. Set a new user (alex) and the associated password. DON'T FORGET IT, because this password will be asked when using sudo command !
  18. Clic on Continue.
  19. Select the method for partitioning file system (Guided - use entire disk). I recommend the simplest method for VM use.
  20. Clic on Continue.
  21. Select the only disk available.
  22. Clic on Continue.
  23. Select partition disk (only one partition). I do not recommend Separate /home partition which broke the installation for me.
  24. Clic on Continue.
  25. Clic on Continue.
  26. Answer yes to format the disk.
  27. Clic on Continue.
  28. At this point, the Debian base system is about to be installed.
  29. Answer no for adding more Debian repositories (the default one is sufficient).
  30. Clic on Continue.
  31. Select the Debian Mirror (France).
  32. Clic on Continue.
  33. Select the Debian Mirror (
  34. Clic on Continue.
  35. Select the proxy if needed (no proxy for me).
  36. Clic on Continue.
  37. Answer for participating to Debian packet statistics (no).
  38. Clic on Continue.
  39. Select the desktop environnement (default).
  40. Clic on Continue.
  41. Now, you'll have to wait a little when installing all the Debian packet (~1500).
  42. Answer yes to install the GRUB.
  43. Clic on Continue.
  44. Select the location of GRUB : MBR of /dev/sda1.
  45. Clic on Continue.

That's all !

The VM will reboot after that, and the log menu is displayed :

Log menu

Configuring the Debian virtual machine

Enable common alias

I use all the time the alias ll which is not directly available.
To have that, open a terminal and type : vi ~/.bashrc.
Now, uncomment the alias by removing the character #.
Start a new shell : bash

Become a sudoer

To be able to use sudo command, you've to be in the sudoers list. For that, in a terminal :

  1. Log as root : su -
  2. Type the root password, set during the installation process.
  3. Edit the sudoers file : visudo. It opens nano as default editor.
  4. Add the following line, to add your username (alex for me) :
alex     ALL=(ALL:ALL) ALL`
Enter fullscreen mode Exit fullscreen mode
  1. Save and quit the editor.
  2. quit the root session : exit.

Share a host/guest folder

On the host machine (Windows, VM is powered off), in the VMware Player main menu :

  1. Select the virtual machine, on the list.
  2. Clic on Edit virtual machine settings.
  3. Clic on Options tab.
  4. Clic on Shared Folders.
  5. Select Always enabled radio button.
  6. Add a folder, and keep in memory the name.

Now start the VM and open a terminal :

  1. Edit the fstab file which list mount configuration when the OS is launched : vi /etc/fstab
  2. Add the following line :
.host:/share    /home/alex/share    fuse.vmhgfs-fuse    allow_other,uid=1000,gid=1000    0    0
Enter fullscreen mode Exit fullscreen mode

Remarks :

  • the local folder /home/alex/share will contain the share folder on the VM. It has to be created using mkdir
  • the string after .host:/ is the name set in the VM Player configuration (for me : share).

Next episode

Ok, now I've a Debian virtual machine configured.
Next step will be to build an environnement to compile N64 programs using the official SDK!

Top comments (0)