Parallels usb switching. Combining Mac OS X and Windows using Parallels. Features for developers and IT professionals

Parallels usb switching. Combining Mac OS X and Windows using Parallels. Features for developers and IT professionals

Parallels Desktop is a program that allows you to install and work on other operating systems directly on macOS. For example, I installed Windows 10 and Kali Linux and run them when needed.

👨‍💻 Parallels Desktop 14 for Mac: download demo / buy

The advantage of Parallels Desktop is that you can install absolutely any OS, and to work with them you do not need to restart your Mac, as is the case with Boot Camp.


I use Parallels Desktop to run Windows 10 and Kali Linux

A frequently asked question is why Parallels Desktop is needed if Boot Camp is built into the system. I answer: Bootcamp is not a virtualization tool and does not exclude the use of a virtual machine. Bootcamp simply creates an additional partition on the disk for installing Windows and registers it in the system bootloader. You cannot use this Windows simultaneously with macOS; you will have to reboot.

By default, Parallels Desktop for Mac has settings that are optimal for the average person. But in our country, PD is used mainly by advanced users who have very specific requirements for the virtualization platform - performance and long battery life.

So... where should you click to make the guest Windows work faster and consume less battery?

Tip 1. Set the optimal amount of RAM for the guest OS and its applications

Eight gigabytes of RAM, which are usually included with modern Mac computers, is enough for macOS and Windows to work simultaneously at normal speed.

By default, Parallels Desktop has 2 GB of RAM allocated for the guest operating system. Oddly enough, two gigabytes may even be too much if you regularly run, for example, non-demanding applications like Office, Edge and Notepad.

Going overboard with the amount of memory for a virtual machine can slow down macOS: you will take away the necessary resources from the system, which is why it is forced to use the page file.

Ideally, you need to find out how much RAM is consumed by virtual Windows along with the applications you need running under it and assign the appropriate value in the Parallels Desktop settings.

The algorithm looks like this:

  • launch Windows in Parallels Desktop on Mac;
  • wait until the guest OS is fully loaded;
  • launch the necessary applications. In our case, this is Edge with three rather “heavy” sites, Paint and Notepad;
  • open Resource Monitor and look at the consumed amount of RAM in the Memory tab. It is this value (+10% just in case) that will need to be used to install RAM for the virtual machine;

With the applications I need, RAM consumption remains at 1.6 GB
  • Turn off the virtual machine via Parallels Desktop. Then we set the RAM limit in the settings:

Virtual Machine ▸ Configure… ▸ CPU and Memory


My machine has 16 GB of RAM, so I will allocate 4 GB for Windows 10

When stopping working with applications in the guest OS, the user closes his programs in it and stops the virtual machine. When guest applications are needed again, the process is repeated in reverse. All this takes a lot of time, which can easily be saved by using the Pause/Resume functions.

Instead of closing Parallels Desktop, choose Actions ▸ Suspend.


Virtual Windows 10 may “freeze” along with the applications open in it. This is convenient when you need to quickly resume the operation of a virtual machine with all open programs. Moreover, the system is brought out of hibernation literally in seconds, along with all previously open programs.


The memory state and state of the internal devices of the virtual computer are saved on disk as a file. This file is then “unfolded” using Parallels Desktop.

When using the Suspend/Resume function, instead of waiting one or two minutes for Windows and its applications to load, everything takes about ten seconds. The time savings are colossal.

This trick is good for 15-inch MacBook Pro owners. They have two video adapters - integrated and discrete. A discrete video card is one of the most power-hungry components. If your goal is maximum autonomy and long computer battery life, it is better to disable the discrete card in Windows 10.

MacBooks switch to discrete graphics as soon as the need arises. They will not switch back to the integrated one until the program that caused the switch is completed. Therefore, if 3D acceleration is enabled in a virtual machine, the discrete graphics adapter will remain enabled until you exit Parallels Desktop.

To set Parallels Desktop to use Eco mode, disable 3D mode in:

Virtual machine ▸ Configure… ▸ Equipment


Disabling 3D acceleration saves battery on MacBook Pro with discrete graphics

We have disabled 3D effects, but have not yet reduced the amount of video memory allocated to the virtual machine: its default value has been retained - in our case it is 256 MB. Since such a huge volume is simply not needed for graphics, it makes sense to give the “extra” memory to the host.

To render a simple Windows 10 interface, 32 MB is enough. Therefore, it is better to set this parameter to automatic mode. In this case, PD will use the minimum amount of video adapter memory.


And in “automatic” mode, Parallels Desktop uses the minimum required amount of video memory

If you have a Mac with only an integrated video card(13-inch models), then just go to the tab Optimization and reduce the amount of resources that the virtual machine consumes.

The default value is “No restrictions”. I recommend setting it to “Medium”.


Determine how many resources a virtual machine can consume

These steps will help you gain 1.5-2 hours of battery life. True, it will no longer be possible to launch anything “heavy” with such settings. But there are special settings for applications that use 3D (see Tip 5).

A guest OS running under macOS is, as a rule, used to work with a number of very specific applications - all other tasks are successfully solved by macOS tools. In this regard, Windows can get by with a very modest amount of memory on the hard drive. By default, the maximum disk space is allocated to the “guest” in PD.

If you don't want the guest system to take up all the free space at some point, then set a limit.

Virtual machine ▸ Hardware ▸ Hard disk


Limits the maximum virtual disk size under Windows 10 to 32 GB

If you later need to increase the disk size for the virtual machine, you can always do this through the settings here.

Parallels Desktop can be configured so that the guest Windows displays maximum performance in games.

New Mac processors have 4-6 cores. If you are going to play in a virtual machine, you need to switch all existing kernels to support the guest OS.

To do this, just enable the “Games Only” profile.

Virtual Machine ▸ General ▸ Configuration ▸ Edit


Switching virtual Windows 10 to "game mode"

You can use as many processors as you see fit for games. This option will have the greatest effect in games that support multithreading.


"Game Mode" enables all processor cores and increases the amount of RAM up to 8 GB

Allocated but unused space for a virtual machine can always be returned back to macOS. To do this, just click the Release button.

Virtual Machine ▸ General ▸ Release


Transferring all virtual machine resources back to macOS

Snapshots are a great tool for developers and experimenters, but for the average user they are not particularly interesting, and a forgotten snapshot is a lot of wasted space.

By default, automatic creation of snapshots is disabled, but it’s better to make sure of this again.

Virtual Machine ▸ Backup ▸ SmartGuard

If snapshots are occasionally needed, you can immediately configure the rules for their creation.


Disable snapshots to save disk space

Seeing programs familiar from Windows in the Mac OS X dock is at least strange, and seeing the Internet Explorer window next to Mail and Finder is generally surprising. The secret, of course, is simple: the computer runs Parallels Desktop 5 in Crystal mode - a virtual machine that hides the Windows interface out of sight and “pulls” the programs running inside it into the Mac OS X environment.

Deciding to switch from Windows to Mac OS X is not so easy for many: it would seem that they like the new system, but there is no necessary application. And you can’t even dream of getting it: you never know if there’s a lot of professional software in the world whose developer is not going to port the program to a Mac, or has even abandoned support a long time ago. This is exactly where Parallels Desktop comes to the rescue.

Installation

Installing the application is as painless as possible - the installer is completely normal, although it requires the user to enter an administrator password.

The next thing to do is install Windows. To do this, select the appropriate item from the menu and insert the disk with the system. After this point, all you have to do is watch the indicator - installation occurs with virtually no questions asked. Perhaps this is even easier than installing Windows on a blank disk (especially considering that at this time you can continue to do your business, from which even reboots will not distract you).

By the way, the disk does not need to be partitioned. That is, you can, of course, do this first and install the system on a new partition using Boot Camp - then it will be possible to boot Windows normally and start the system from Parallels Desktop. But if our goal is to work with a couple of applications, then it is enough to save the image of the virtual machine in the Mac OS X file system. This way it will take up exactly as much space as necessary.


If you look closely, you can see that the background on the screen of the switched off virtual machine is a screenshot taken before the suspension

After the first boot of the virtual machine, the user will be prompted to install the Parallels Tools set of utilities. You shouldn't refuse - without them, the most valuable Parallels features won't work.

Operating modes

Once the installation process and subsequent reboot are complete, you can finally move on to the fun part - switching Parallels to Coherence or Crystal mode. The first of them was present in previous versions, the second is new and improved.

In both modes, the Windows desktop and taskbar will be removed, and instead, icons for programs running inside the virtual machine will begin to appear in the Mac OS X dock. Unfortunately, this is done not like in Mac OS X, where all the windows of one program are collected under one icon, but like in Windows with the window grouping mode disabled - there is an icon for each window.

You can also launch programs directly from Mac OS X - a folder will be created in the application directory that reflects the contents of the Start menu in Windows. That is, you can, for example, launch Windows Media Player from there, and it will appear among the Mac windows.

The icons usually displayed in Windows in the system tray will move to where they should be in Mac OS X - on the left side of the menu bar - the top menu bar.

The Start menu itself is also accessible from the Mac OS X interface: it appears when you click on the Parallels icon in the dock. Crystal mode goes even further: in it, the Parallels logo is not displayed in the dock, and is also hidden in the menu bar. “Start” and virtual machine settings open from there in the same way as in Coherence.


You can exit full-screen mode by hovering your mouse over a corner of the screen. It immediately becomes obvious that Mac OS X is hidden somewhere under Windows.

Go to full screen mode. If you allow Parallels Tools to connect Mac folders as network folders, then Windows will be practically habitable: on the desktop there are the same files as in Mac OS X, in documents there are Mac documents, divided into subdirectories with downloaded files, pictures, music and films . Parallels links each of these directories to similar directories in Mac OS X, and all changes made in one system are immediately reflected in the other.

Other amenities

Windows windows surrounded by Mac programs look, frankly, out of place, but you can try to fix this too. We select the “use MacLook” option in the Parallels menu and Parallels will change Windows into something vaguely reminiscent of the Mac’s gray-metallic theme. It won’t be difficult to distinguish a Windows window (by fonts, for example, or by a noticeable stripe under the window title), but at least they don’t stand out from the general style so much.


Who would have thought that Windows Explorer could look so Mac-like? Almost a wolf in sheep's clothing

Even file opening can be configured so that the desired document types are transferred to Windows programs. And vice versa: with Parallels Tools installed, the “Open on Mac” option will appear in the Windows Explorer context menu. We select it, and the file will open in Mac OS X - in the program to which the corresponding type is associated.


When the virtual machine is running, the contents of the Windows disk are visible from Mac OS X


Voice commands are supported - they will work along with the built-in commands in Mac OS X. We have not tested this feature

Data transfer via the clipboard is also supported: lines or even pictures copied from Mac OS X can be pasted into Windows and vice versa. Files cannot be copied via the clipboard, but drag-and-drop is supported. True, only in one direction: from Mac OS X - to Windows windows or program icons. You can, for example, drag a picture from a Mac desktop onto the Windows Paint icon in the dock and it will open there.


When a new device or removable media appears in the system, Parallels will offer to connect it to the virtual machine

In Windows, you can now use Mac OS X "gestures" - this is useful if you are using a MacBook with a multi-touch trackpad, Magic Mouse or Magic Trackpad. The Apple Remote is also easy to use and control, say, PowerPoint presentations for Windows.

Usually, when switching between systems (in other virtualization tools or simply when there are two computers), all sorts of typical difficulties arise: those who are used to switching keyboard layouts using the Cmd-Space combination in Mac OS X will find it inconvenient to use Ctrl- or Alt-Shift in Windows. The same is with keyboard shortcuts: they are similar in both systems, but in Windows they are executed with Ctrl, and in Mac with Cmd.

Even this issue has been thought through in Parallels. In the program settings, you can specify which combinations used on Mac should be translated into Windows commands. Most of the standard settings, such as translating Mac copy and paste commands and the like into the corresponding Windows commands, are already configured by default. Of course, for complete comfort you will have to reassign a much larger number of combinations, but providing yourself with minimal convenience will not be difficult.

Results

Parallels Desktop 5 has many more features that may be useful to advanced users: there is, for example, video recording, memory snapshot management, importing VMWare and VirtualBox virtual machine files and many more interesting things. It is even possible to access the operating system running inside Parallels from an iOS device - there is a free program for this in the Apple App Store.

In general, Parallels has reached unprecedented heights in merging Windows with Mac OS X. If you use it constantly, over time you stop paying attention to the fact that one operating system is running the second. It only takes significant time to launch Parallels and Windows, but if there is enough memory, you can simply leave them on if necessary.


When minimized, Parallels does not take up much RAM, but the disk should have several gigabytes free for the swap file

You can even install DirectX and any games (even Crysis) into a virtual machine, but you can comfortably play something modern only on the most powerful computers. However, in the next version of Parallels the emphasis will be on performance. Which, of course, will not prevent the list of functions from growing even more.

There are now 75 new features in our latest version of Parallels Desktop 9 for Mac. Of these, 33 are somehow related to the integration of OS X and Windows. And in the very first versions of the product, these functions were simply basic. Today, especially for Habr, we are writing about what and how it was invented to make Windows and Mac live together happily ever after, why they “infiltrated” Explorer and how they deceived the mouse.
Alexander Grechishkin, head of the Integration Team at Parallels

- How did it all start?
A.G.:
First, we needed to take advantage of the technologies that were already on the market at that time. Virtualization and emulation have existed since the 1990s, and there were even solutions for running one OS on computers running another OS. Therefore, our tasks in the first versions were as follows: first, to make the technologies and basic functions exactly the same as in existing solutions. Secondly, come up with something of your own, original. Its unique features include Coherence mode (the ability to see and work with Windows programs on Mac as if they were native OS X applications) and Shared applications (Windows program icons in the Dock application tray).

The Coherence feature allows you to completely hide Windows itself, leaving only the application itself. In common parlance this mode is called “Do not show Windows desktop”. It sounds very simple, but it took a lot of effort for us to realize this opportunity. This is a very difficult technology associated with many software problems and the need to solve them in non-standard ways. It is also difficult to maintain. And by the way, it is still developing.
Of course, then - with each new version - we had to come up with and implement more and more new things that had no analogues. But initially, we did half of the basic integration such as Mouse Synchronization, Shared folders, Copy-Paste, Drag&Drop, Time synchronization by analogy with what already existed in some form. For example, there were quite a lot of virtualization emulators (for different platforms) with their own set of functions. It would be simply pointless to release a new product without this set.
Of course, we could create an emulator without any integration at all, something like DOSbox (which has no integration functions, but it runs old DOS games perfectly). By the way, we still have a number of users who work with Parallels Desktop according to the same principle: they launch a virtual machine, Windows runs in it in a window, and they don’t need anything else.
But, of course, the development path for the vast majority of software products is evolutionary: first you need to create basic functionality, and then gradually expand it. The user needs to be motivated to switch to the new version (especially if it is paid). And not only due to increased speed, support for new technologies (for example, the new Direct X), improved stability and other things, but also to attract with interesting and useful features. In our case, such customization - “tuning” of a product - very often comes from integration - first it happened with Windows, and then with other operating systems.

- And what did you focus on among the existing technologies?
A.G.:
In general, the idea was this: to implement virtualization technology the way Apple does it. In 2005, Steve Jobs announced Apple's plans to “finish off” PowerPC on its computers and switch to Intel chips. In 2009, OS X 10.6 Snow Leopard arrived, the first Apple operating system to no longer support PowerPC. But, most likely, it all started for them ten and a half years ago, when Apple began to draw up a schedule for upgrading its Mac OS and a plan for transition to x86.
They had to switch from Mac OS 9, designed for old hardware, to Mac OS X, and write their own emulator to support all existing programs. They did this quite efficiently, with high performance, and, importantly, this technology turned out to be very transparent and “invisible” to the user. The user clicks on a program written for PowerPC on his computer, and the same Coherence opens, the same window for this program. The only thing is that not two different operating systems coexist in it, but two Mac OS - old and new. In general, very similar to us.
Unfortunately, at that time, the Parallels Desktop developers did not know about the existence of Rosetta technology in Mac OS X - a dynamic translator for running PowerPC applications on computers with Intel processors. I even had to bring my computer from home to show them. He brought it, showed it, and the developers recognized our Coherence technology, although implemented differently: something between Wine and a simple emulator. And as a result, we crystallized the idea of ​​doing like Apple in the sense that the user would not be shown any boot images or virtual shells from Parallels Desktop. For example, so that Word would immediately open, and the average user would not even realize that this application is not in the Application folder, but somewhere else.

- How was Coherence developed?
A.G.:
The author of the idea was Sergei Belousov (note - founder of Parallels), he then walked around the office and told everyone that there was a brilliant idea - to remove the desktop so that all Windows windows would look exactly the same as Mac windows. We immediately realized that this idea was very good and we needed to work on it. We were able to “cut out a window and remove the desktop” quite quickly and simply. And then the entire Coherence presentation technology was written by one single person who still works for us - Sergei Kontsov. It took years of painstaking work to achieve the point where users would notice virtually no differences between Windows and Mac applications.
The proof that the idea was really good was that it was then copied by everyone from us. But at the beginning of our journey, we were not sure that the technology would become revolutionary. And although Belousov assured us that everyone would work on it, we were still embarrassed to set it by default when loading the virtual machine in the first version (note - on the left - screenshot from version 2.5). But as soon as they realized that it works and is popular, they immediately set it as the default (from version 3.0). And this mode is still in the lead; almost 80% of users use it in Parallels Desktop.
We also implemented a simple installation of Windows through the Wizard, so that the user simply presses a couple of buttons and gets his virtual OS. This technology was borrowed from OEM installers, but for the first time it was implemented in our product for end users.
We have worked with Coherence for so long also because this one-word name actually combines many technologies. In particular, it includes such a large feature as Shared Applications, which makes the user see the same Microsoft Word as a native application on the Mac. This is the most difficult thing. Externally, the function looks simple, but there is a lot of logic hidden “inside”, which we are still working on.
15 man-years were invested in Coherence - an entire programming career. And this code makes up about 8% of all Parallels Desktop sources - it is such a large and complex product.

- What else was as difficult to do?
A.G.:
Difficulty may vary. Software complexity, algorithmic complexity, the difficulty of understanding how to implement a thing or how it will work. Often we had to take a completely non-trivial path.
For example, I’ll tell you about a function for which I had to delve into the insides of Windows. We have such a technology - SmartMount. This is the essence of it: when a user inserts a flash drive into a Mac computer, it appears only on the Mac desktop. A person working in Coherence mode wants full integration - that is, to see the contents of his flash drive in Windows. But in order for it to appear there, it needs to be reconnected to a virtual machine, and doing this every time is very inconvenient. We decided to use Shared Folders. Since this function is a network file system driver and is shown in Windows as a network drive, when the flash drive connects to the Mac, we forward it through Shared Folders in Windows. Then it automatically goes to the Network location. But it is not clear to the user that he should find his flash drive in the Network location: he is used to the fact that it is a USB device that looks a certain way and is shown exactly where all the removable media is. Using standard methods, it is impossible to make a network share appear in the list of devices as a connected device and at the same time be reflected as USB. And so our developer Vasily Zhdanov “infiltrated” (let’s call it that) into “Explorer”, and clearly “explained” to this program that this thing should be shown exactly like this. And now SmartMount shows USB flash drives as external drives.


Inserted a flash drive


We saw a flash drive

Or you can give an example of an original way to solve the Smart Mouse problem - a technology that allows a computer mouse to adapt to the application with which the user is currently working. If it is an office application, it behaves one way, if it is a toy, it behaves differently.
Parallels Desktop has two mouse modes - absolute pointing device, which allows the cursor in both Windows and Mac to move the same way - with the same speed and movement. In this case, only the host mouse is used. And there is a relative mouse mode, in which the mouse operates inside the virtual machine at its own speed. The last mode is used in computer games, since they are not at all designed for absolute pointing devices. Previously, the cursor in games began to move at breakneck speed and it was impossible to play. We came up with a way to detect the desired mode without any connection to the names of programs, libraries or files. Everything is very simple: if a cursor is visually visible on its screen while the program is running, then an absolute pointing device is needed. In games, the standard cursor is almost always turned off and the game draws it itself, therefore, in this type of program a relative mode is needed. Selecting a mouse mode using this principle ended up working correctly 95% of the time.

- What kind of team does all the integration?
A.G.:
Now the Integration team has 6 people, and these are very different people. Somewhat similar, but not the same. I recruited almost the entire team myself. The only one who was already working when I arrived was the already mentioned “father of Coherence” Sergei Kontsov. So I became the head of a one-person department, where I myself acted as a player-coach.
All integration in the first version was done by these two people - Shared folders, mouse work, copy-paste, drag&drop, and Coherence - almost all the basic integration. A little later Vasily Zhdanov appeared. Then - Andrey Pokrovsky, who made Shared applications for the first version. And what’s interesting is that he did it very quickly. When we finished the product and wanted to sell it, we realized that without icons in the Dock, the core coherence looked unfinished. Kolya came (note - Nikolay Dobrovolsky, vice president for PC virtualization) and asked if we could implement this quickly. And Andrey did it in one weekend, writing and debugging about 2000 lines of code. Applications were shown where needed, they could be launched from the Dock. This can be called truly productive work.
But, for example, Vasily Zhdanov, whom we have already talked about, is very good at reverse engineering. He quickly delves into the internals of programs, which is very necessary for implementing integration, since in this process a lot of things simply cannot be done using standard methods. And Vasily loves to do this: he just comes to work and works hard, without being distracted by hunger and well-being. He doesn't see or hear anything at all. Often he doesn’t even know the status of the project, he is only interested in its specific task at the moment.
In general, they all can do different things, and their productivity is different. But they are a TEAM. They know absolutely everything and want to work, they all have extensive and deep knowledge (which over the years of work has become VERY great knowledge), and they have a very high level of programming. In seven years, their level has risen so much that they can do almost any task you give them.

- So six is ​​enough?
A.G.:
At this stage no longer. We have very short development cycles and, as I said, we have about 30 integration features every year. It turns out that you need to do about 3 features per month. It should be noted here that there are many integration features, but not all of them are made by our team.
In general, I now need 3 people for the Integration team. These vacancies are for those who want to program for all platforms and understand Windows, Mac and Linux (or at least one of these OSes). The main languages ​​are C++ and Objective C.
So those who want to work in Parallels in the OS Integration team can write to me personally at [email protected]. I can promise one thing for sure – interesting non-standard tasks are guaranteed. We'll discuss the rest on the spot.