Creating A Lubuntu Virtual Machine With Parallels For Mac

среда 11 мартаadmin

How to install & set up Linux on a Mac. Apple Macs make great Linux machines. Parallels, VMware, VirtualBox and Boot Camp compared. Apr 09, 2019  How to Delete a Virtual Machine in Parallels on Mac or Windows. Note that if you simply move the virtual machine to the Trash but don’t empty the Trash on the Mac, that VM can be recovered anytime before the Trash is emptied by simply going to the Trash, locating the vm file (usually labeled as the OS with the file extension “.pvm” like ‘Debian Linux.pvm’) and adding that VM file.

This tutorial will show you how to create a Ubuntu Desktop 18.04 virtual machine and run it on macOS with QEMU and hardware acceleration.

Before we begin, I suggest you create a folder on your Mac to store the virtual machine disk image, the Ubuntu ISO and startup script. You don’t have to do this but it will make following this tutorial easier.

I’ll be storing everything in ~/QEMU.

Step 1: Install QEMU

We’re gonna use Homebrew to install QEMU, so if you haven’t got Homebrew installed on your machine. You’ll need to do that first by following the Homebrew installation guide.

With Homebrew installed, run the following command to install QEMU.

Once the install is finished, run the following command to make sure QEMU is installed and ready for the next steps:

Output:

As you can see, as of writing, the latest version is 4.1.0.

Step 2: Download Ubuntu ISO

Go to the Ubuntu website and download the Ubuntu Desktop 18.04 ISO. Move the ISO to the ~/QEMU folder as it will make the QEMU command easier.

Step 3: Create a Disk Image

Run the following command to create an 10 GB hard disk (or adjust to your needs) for the virtual machine.

You should now have a folder containing the Ubuntu ISO and the hard disk which Ubuntu will be installed on.

Step 4: Launch QEMU with Ubuntu ISO attached

Run the following command to launch a QEMU virtual machine with the Ubuntu ISO and hard disk we created in the previous step attached.

Creating a lubuntu virtual machine with parallels for mac windows 10

Step 5: Install Ubuntu

Hopefully if everything went to plan with the above command you should be presented with the Ubuntu installer. Click on Install Ubuntu.

Select your language and keyboard layout. Software for scientific programming in python for mac.

Select Minimal installation and then click Continue.

Select Erase disk and install Ubuntu then click Install Now.

Specify your username, machine name and password then click Continue.

Wait for the installation to complete then click Restart Now.

When asked to remove the installation medium, power off the machine and in the next step we’ll adjust the command to power on the VM without the CD-ROM attached.

Step 6: Reboot without Ubuntu ISO attached

Once the machine is powered off. Run the command below to power it back on without the CD-ROM attached.

Note:

You can increase or decrease the memory with the -m option. The command above assigns 2 GB to the virtual machine.

Conclusion

Ubuntu should now be installed and it should run fast on macOS since we enabled hardware acceleration by specifying the -accel hvf option.

Tips

  • Create a script to run the command above. Call it run.sh and make it executable then you can just type ./run.sh to start the VM.
  • On first boot after installing Ubuntu, the screen resolution might be too low. Right click on the desktop and open a terminal then run sudo apt update and sudo apt upgrade to install updates. Restart the system and the screen should then be big enough to increase the resolution in the Devices section of settings. 1440x900 works best for my MacBook Pro (2017 13.3-inch 2560 x 1600).
  • If you need to SSH onto the system, you can add the following settings to the QEMU command: -net user,hostfwd=tcp::2222-:22 -net nic. Then you can connect via ssh user@loclhost -p 2222.
  • You can enter and leave full screen by pressing Command + F when the mouse cursor is at the very top of the screen.