Tag Archives: Parallels Desktop

How to install Parallels Tools via the Command Line in CentOS

I like setting up barebones CentOS and other flavoured VMs on my Mac via Parallels Desktop. Trouble is, for such things like time synchronisation to work properly, something called Parallels Tools needs to be installed on each VM.

This is to make sure Parallels Desktop can speak to the VM and communicate with it properly. It’s more important for GUIs so that the screen resolution and mouse handling is more accurate.

Thing is, when you have a VM with a GUI, installing Parallels Tolls is extremely easy and may even happen automatically as soon as you install the OS. But if you have a command line only interface, it just doesn’t happen, and it’s up to us to install those tools manually. Here’s how to do it in CentOS 6.

First, boot up your barebones VM and wait for it to start. Now head over to the VM’s menu and choose Actions – Install Parallels Tools. If they’re already installed, this message will change to “Reinstall Parallels Tools”.

Screen_Shot_2015-07-21_at_16_39_13

If your VM has a graphical user interface, this process will kick off the actual installation, but on barebones machines, it will merely attach the ISO image that contains the tools to your VM. In an ideal world, this tool would even mount the image for us, but sadly it doesn’t work with CentOS. Therefore we have a bit more work to do until we get to the installation part.

You’ll see the following message to confirm the attachment:

Screen-Shot-2015-07-21-at-16.29.35

Now let’s login to our VM as root using our favourite SSH client (or simply use Parallels Desktop). We’ll create a directory to which we can mount the image. As suggested in the Parallels documentation, we’ll use /media/cdrom:

With this directory in place, let’s mount the ISO image to it so we can address it:

The message is fairly self-explanatory: no writing to that ISO image. No problem! To start the installation, enter the directory and call the install script like so:

 

Help! That’ didn’t work!

Sometimes (in CentOS 7 for example) the ISO image isn’t properly mounted, and instead Parallels Desktop mounts a directory containing the ISO image. That’s no good of course. If you receive an error message along the lines of “command not found”, take a look at the CD Rom’s directory with the ls command.

If there is no file called “install”, and instead there’s something like “prl-tools-lin.iso”, you need to manually attach the ISO image to your VM. To do this, restart your VM and select Devices – CD/DVD 1 – Connect Image. Now navigate to Applications – Parallels Desktop.app – Contents – Resources – Tools and pick the appropriate ISO file.

Screen Shot 2015-08-07 at 12.49.50

 

For all Linux flavours this is prl-tools-lin.iso. Once attached, mount the device as discussed above and you should be able to run the installer.

 

Parallels Tools TUI in action

The script will greet us with a TUI and some steps we need to complete, one of which may be that some additional components (such as make and gcc) need to be installed. That’s not always the case on barebones systems. Lucky for us, the script will take care of this for us too:

Screen Shot 2015-07-21 at 16.33.51

And that’s it! The script will finish fairly quickly, and at that point, Parallels Tools is installed in your VM. Congratulations! There’s only one final step: reboot the VM. You can either do that from the VM’s menu under Actions – Restart, or by issuing the following command:

As soon as the VM is back up and running you’re all set 🙂

Screen Shot 2015-07-21 at 16.38.48

 

Further Reading:

Parallels Cloud Services changes into Odin

Odin Logo

Parallels have announced this week that they’ve changed their name to brand cloud services from Parallels to Odin. This blog post has more details:

While I dislike change for the sake of change, I believe that it makes a lot of sense in this case. I have been working with Parallels products since 2008, and when I started out I always thought there was a dissociation between the consumer products, such as Parallels Access and Parallels Desktop, and the professional products, such as Plesk.

The Odin branding will be used for the latter line of products, while the Parallels branding will continue to be used for Parallels Desktop & Co. Parallels Plesk will simply be known as “Plesk”.

The company itself will remain a single unit for now, simply operating under two brands.

In case you’re wondering what will become of all those Parallels Summits, they will be renamed to Odin Summits. The first one with this branding will be in May: http://www.odin.com/summit/2015/

Long live Odin!

How to start CentOS in Recovery Mode from Parallels Desktop

To start your Linux distribution into EFI Recovery Mode you need an installation disk. Even the smallest “minimal” image will do. Shutdown the VM if it’s running. Then mount the ISO image onto your VM (under Configuration – Hardware – CD/DVD1). Make sure the “Connected” box is ticked.

Screen Shot 2014-12-01 at 15.06.11

Next you need to tell Parallels Desktop that you want to boot into recovery mode. Head over to Configuration – Hardware – Boot Order and tick the box Use EFI Boot. The boot order does not matter, just make sure CD/DVD is ticked in this list.

Screen Shot 2014-12-01 at 15.05.56

Now restart your VM and you’ll boot into the CD image.

When you’re done here, simply shutdown the VM and untick the EFI Boot option. That’s to make sure you boot into the main installation on your next launch.

How to run Plesk on your local network and access virtual domains on your Mac

Plesk-LogoWhether you’re running Plesk on a dedicated machine on your network or in a virtual environment, you’ll want to setup test domains and work with them as if they were live – just like it was running in a data centre. It’s not as easy as I thought, which is why I took some notes on how to do it.

In this example I’ve got a dedicated CentOS instance on my local network. This can be my trusty old NC10 netbook, or a virtual machine running on Parallels Desktop on your Mac (I’ve explained how to set this up here: https://wpguru.co.uk/2014/02/how-to-ssh-into-a-virtual-machine-in-parallels-desktop/).

Plesk is already installed and ready to rock – all I need is a way to gain web access and setup domains that need to resolve properly. Out of the box all I get is a blank screen when I access the Plesk GUI using https://11.22.33.44:8443 or http://11.22.33.44. Let’s fix this.

Preparing CentOS to accept web requests

Thanks to Ivan from Parallels and Jamie from Urtechs for this tip: All we need to do here is to switch off iptables. Those are on and will filter many requests that look fishy and should be left running on a production server. Since I’m on my local network without evildoers attached, let’s switch it off:

The second line will make it stick on subsequent boots we can use. You can easily switch it back on with the same command.

Tweaking your Mac’s hosts file

By default your Mac will reach out to its default DNS server to resolve domains. That’s how it finds which IP to connect with so that it can display websites. Plesk in turn would receive such a request and return the relevant website data.

To override your own local server’s IP address we can tweak /etc/hosts and define anything we like. For our example, I’d like example.com resolve to my own IP address (say 11.22.33.44). Here’s how I’d do that in a local Terminal session:

This will request your Mac’s root password and show you a default configuration. Make sure you leave what you have in place and add the following lines to the bottom of this file:

Obviously replace 11.22.33.44 with the IP of your actual server. If you’re not familiar with vi: hit “a” to enter edit mode, hit “esc” to stop editing and enter “SHIFT Z Z” to save the file.

Now make your Mac reload this configuration with the following command:

Thanks to Manski for this tip – read his detailed article here.

Now when you try to visit http://example.com it will resolve to your local server and display the Plesk default page. Test this by pinging the domain in the terminal session – it should return your server’s IP. You can add as many of your own domains as you like to the bottom of this file, including other IP addresses for other servers on your network.

There’s a handy tool called Hostbuddy which makes editing and flushing the file a breeze – check it out:

Setup a domain in Plesk and enjoy

All that remains is to setup example.com as a domain in Plesk and install some content – as if it was a real server on the real internet. You can now test websites with the power of Plesk without having to buy real server resources.

Troubleshooting

If a domain exists in the real world (like example.com) your tweaked configuration will override this and display your server instead. However, if your server isn’t running, or the IP has changed then you’ll receive a blank page instead. Check with ifconfig what your IP address is and tweak /etc/hosts accordingly.

If you only see the Plesk default page make sure your subscription is setup to point at the correct IP address.

Make sure that your URL is correct: since NGINX automatic redirects are no longer working. You must specify exactly what you’d like to access (such as “http://test.test” rather than “test.test”)

Have fun 😉

How to SSH into a Virtual Machine in Parallels Desktop

I was pulling my hair out the other day trying to connect to a VM in Parallels Desktop. It’s fairly straightforward, yet rather complex at the same time. Here’s how to do it step by step.

In this example I’m running Parallels Desktop 8 under Mac OS X 10.9 Mavericks, and my Guest OS CentOS 6.5.

Configuring your VM

Before starting the VM, start Parallels Desktop and head over to

  • Virtual Machine
  • Configure
  • Hardware
  • Network

You’ll get to a screen like this:

Screen Shot 2014-02-12 at 17.21.16

Make sure the tick box is “Connected”. Under Type you get a drop-down menu with three options:

  • Shared Network: gives your VM access to your internet/network connection, much like a “split”
  • Bridged Network (with several options): creates a new IP address for your VM and attaches it to whichever device you choose. Stick to the “Default Adapter” here unless you know what you’re doing. This will let other devices on your network connect to the VM.
  • Host-Only Network: also creates a new IP address for your VM, but only lets your Mac connect to the instance. Other devices on the network won’t be able to connect (more secure).

Pick Bridged (Default Adapter) or Host-Only, then start your VM.

Read the full article

Workaround: Parallels Desktop is not seeing my DVD Drive in Mountain Lion

Today I wanted to install Windows 7 using Parallels Desktop 7 on my Mac, but sadly I always got an error message every time I tried. It was saying it could not connect to my DVD drive – which clearly my Mac could.

Doing some research it turns out that several people had this problem, however I didn’t understand the instructions given by Parallels very well. Getting frustrated I decided to write my own, and give you some pointers where else to look for help.

For this scenario I’m using a DVD copy of Windows 7 Home Premium and the latest version of Parallels Desktop 7.0.15107. Parallels Desktop 8 is already out but I’ve decided not to upgrade at this point.

Continue reading Workaround: Parallels Desktop is not seeing my DVD Drive in Mountain Lion