Introduction
Parallels Workstation Extreme allows you to assign PCI devices of the host computer directly to virtual machines. For example, if you have two video adapters, you can assign one of them to virtual machines. The other will be used by the host computer and won't be available to Parallels Workstation. If you have only one video adapter, it is used by the host computer and not available to Parallels Workstation. However, you can still make it invisible to the host operating system and available to virtual machines. This article describes how to assign the primary video adapter to virtual machines running on Linux host computers.Guidelines
The way to assign the primary video adapter to virtual machines depends on the Linux distribution. In our example, we will show how to do it in Red Hat Enterprise Linux 6. You can use these general guidelines to assign the primary video adapter to virtual machines in any Linux host operating system supported by Parallels Workstation.- Make sure your Linux host computer is accessible via SSH and write down its IP address. You will need it later.
- Make sure the host computer has a USB mouse and keyboard connected. You will need them later to be able to work with the virtual machine with the primary video adapter assigned.
- Enable remote desktop connections to the virtual machine to which you're going to connect the primary video adapter. Write down this virtual machine's IP address. You will need it later.
- Start Parallels Workstation and click File > Preferences > Intel VT-d. If you don't see any video adapter, it means that there is only one video adapter on your host computer. If you see a video adapter, remeber its name. It is your secondary video adapter. The primary will appear in this pane in step 16.
- In the host operating system, open Terminal and stop the Parallels Workstation service by executing the following command:
sudo /etc/init.d/parallels-workstation stop
- Make the primary video adapter visible to Parallels Workstation by editing the dispatcher.workstation.xml file:
sudo vim /etc/parallels/dispatcher.workstation.xml
- In the dispatcher.workstation.xml file, change the <PrimaryVgaAllowed>0</PrimaryVgaAllowed> line to <PrimaryVgaAllowed>1</PrimaryVgaAllowed>.
- Start the Parallels Workstation service by executing the following command:
sudo /etc/init.d/parallels-workstation start
- Make the primary video adapter invisible to the host operating system by editing the grub.conf file:
sudo vim /boot/grub/grub.conf
- In the grub.conf file, add the following kernel flag to the end of the "kernel" line:
console=0,9600n8
- Disable the nouveau driver in the Linux host OS by editing the grub.conf file:
sudo vim /boot/grub/grub.conf
- In the grub.conf file, add the following parameter to the end of the "kernel" line:
rdblacklist=nouveau
- Edit the blacklist.conf file:
sudo vim /etc/modprobe.d/blacklist.conf
- In the blacklist.conf file, add the following line:
blacklist nouveau
- Open Parallels Workstation, click File > Preferences > General, and select Manage remotely with Parallels Management Console. You will need it later to connect the host computer's USB keyboard and mouse to the virtual machine with the primary video adapter assigned.
- In Parallels Workstation Preferences, select the Intel VT-d pane and assign the newly appeared primary video adapter to virtual machines. For more detailed information on how to do it, please refer to Parallels Workstation User's Guide.
- Restart the host computer. After restart, the host operating system won't be able to use the primary video adapter. Now you can work with this host computer and its virtual machines only remotely.
- Go to the computer from which you're going to manage the host computer remotely. If it is a Windows computer, connect to the host computer using any third-party utility. If it is a Linux computer, open Terminal and connect to the host computer via ssh by executing the following command:
ssh <the_host_computer_IP_address>
- Get the list of virtual machines residing on the host computer by executing the following command (you must execute it as a non-root user):
prlctl list -a
The output of this command may be as follows:
UUID STATUS IP_ADDR NAME\
{b10046ea-ddbe-46ae-ab1f-34af21e655d6\} stopped - Windows 7
The output shows that we have one virtual machine residing on the host computer and it is stopped.
- In the next step, check what PCI devices are available on the host computer by executing the following command:
prlsrvctl info | grep assignment
The output of this command may be as follows:
pci nVidia Quadro FX 3800 (3-0-0) '3:0:0:10de.05ff' assignment=vm
pci nVidia Quadro 5000 (4-0-0) '4:0:0:10de.06d9' assignment=vm
pci nVidia GF100 High Definition Audio Controller (4-0-1) '4:0:1:10de.0be5' assignment=vm
pci Intel 82801JI (ICH10 Family) HD Audio Controller (0-27-0) '0:27:0:8086.3a3e' assignment=host
In our example, nVidia Quadro FX 3800 (3-0-0) is the primary video adapter. The output shows that it is assigned to vm (virtual machines).
- After that, assign the video adapter to the virtual machine by executing the following command:
prlctl set <"virtual_machine_name"> --device-add pci --device <your_primary_adapter_technical_details>
In our example, this command looks like as follows:
prlctl set "Windows 7" --device-add pci --device 3:0:0:10de.05ff
- The video adapter has been successfully assigned to the virtual machine. Now you need to start the virtual machine by executing the following command:
prlctl start <"virtual_machine_name">
In our example, this command looks like as follows:
prlctl start "Windows 7"
- Now you can turn on the host computer's monitor and you will see how the virtual machine is booting. In this step, you need to connect the host computer's USB mouse and keyboard directly to the virtual machine to be able to work with it. To do it, you need to download Parallels Management Console (this application is free of charge) from here and install it on the computer you're using to remotely manage the host computer. After that, you need to connect to the host computer via Parallels Management Console and connect the host computer's USB keyboard and mouse directly to the virtual machine using the USB Controller icon available in the status bar. For more detailed information on how to use the status bar icons, please refer to Parallels Management Console User's Guide available here.
- In the very last step, you need to install the latest primary video adapter driver in the guest operating system. The driver is available at the NVIDIA web site.
How to return the primary video adapter back to the Linux host computer
If you need to return the primary video adapter back to your Linux host computer, do the following:- Go to the computer you're using to manage the host computer remotely and connect to the host computer via ssh by executing the following command:
ssh <the_host_computer_IP_address>- Get the list of virtual machines residing on the host computer by executing the following command (you must execute it as a non-root user):
prlctl list -aThe output of this command may be as follows:
UUID STATUS IP_ADDR NAME\
{b10046ea-ddbe-46ae-ab1f-34af21e655d6\} running - Windows 7
The output shows that we have one virtual machine residing on the host computer and it is running.
- Stop all running virtual machines by executing the following command:
prlctl stop <"virtual_machine_name">
In our example, this command looks like:
prlctl stop "Windows 7"
- Next, you need to select the virtual machine with the primary video adapter assigned and find this adapter's description:
prlctl list <"virtual_machine_name"> --info
In our example, this command looks like as follows:
prlctl list "Windows 7" --info
In the output, you need to find the line describing the primary video adapter. For example:
pci0 (+) 'nVidia Quadro FX 3800 (4-0-0)' '4:0:0:10de.05ff'
- After that, remove the primary video adapter from the virtual machine configuration by executing the following command:
prlctl set <"virtual_machine_name"> --device-del <pci>
In our example, this command looks like as follows:
prlctl set "Windows 7" --device-del pci0
- Make the primary video adapter available to the host operating system:
prlsrvctl set --device <your_primary_adapter_technical_details> --assignment hostIn our example, this command looks like as follows:
prlsrvctl set --device 4:0:0:10de.05ff --assignment host
- Edit the /etc/modprobe.d/blacklist.conf file by removing the following line:
blacklist nouveau
- Edit the /boot/grub/grub.conf file by removing the following:
console=0,9600n8 rdblacklist=nouveau
- Restart the host computer. After restart, the host operating system will be able to use the primary video adapter.
- If you want to make the primary video adapter invisible to Parallels Workstation, you need to stop the Parallels Workstation service. To learn how to do it, see step 5 in the Guidelines section.
- After that, change the <PrimaryVgaAllowed>1</PrimaryVgaAllowed> line to <PrimaryVgaAllowed>0</PrimaryVgaAllowed> in the dispatcher.workstation.xml file. To learn how to do it, see steps 6 and 7 in the Guidelines section.
- And in the very last step, you need to start the Parallels Workstation service again. To learn how to do it, see step 8 in the Guidelines section.
No
Yes