Search

Language:  
Search for:

Available article translations:

How to assign the Linux host computer's primary video adapter to virtual machines.

APPLIES TO:
  • Parallels Workstation 6.x Extreme

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.

  1. Make sure your Linux host computer is accessible via SSH and write down its IP address. You will need it later.
  2. 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.
  3. 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.
  4. 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.
  5. 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
  1. Make the primary video adapter visible to Parallels Workstation by editing the dispatcher.workstation.xml file:
sudo vim /etc/parallels/dispatcher.workstation.xml
  1. In the dispatcher.workstation.xml file, change the <PrimaryVgaAllowed>0</PrimaryVgaAllowed> line to <PrimaryVgaAllowed>1</PrimaryVgaAllowed>.
  2. Start the Parallels Workstation service by executing the following command:
sudo /etc/init.d/parallels-workstation start
  1. Make the primary video adapter invisible to the host operating system by editing the grub.conf file:
sudo vim /boot/grub/grub.conf
  1. In the grub.conf file, add the following  kernel flag to the end of the "kernel" line:
console=0,9600n8 
  1. Disable the nouveau driver in the Linux host OS by editing the grub.conf file:
sudo vim /boot/grub/grub.conf
  1. In the grub.conf file, add the following parameter to the end of the "kernel" line:
rdblacklist=nouveau
  1. Edit the blacklist.conf file:
sudo vim /etc/modprobe.d/blacklist.conf
  1. In the blacklist.conf file, add the following ne. line.  liline:
blacklist nouveau
  1. Open Parallels Workstation, click File > PreferencesGeneral, 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.
  2. 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.
  3. 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.
  4. 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>
  1. 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.
The outpu

  1. 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).

  1. 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
  1. 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"
  1. 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 .
  2. And in the very last step 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:

  1. 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>
 

  1. 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\}              running      -               Windows 7


The output shows that we have one virtual machine residing on the host computer and it is running.

  1. 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 "
  1. 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'
  1. 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
  1. Make the primary video adapter available to the host operating system:

prlsrvctl set --device <your_primary_adapter_technical_details> --assignment host

In our example, this command looks like as follows:

prlsrvctl set --device 4:0:0:10de.05ff --assignment host
  1. Edit the /etc/modprobe.d/blacklist.conf  file by removing the following line:
blacklist nouveau
  1. Edit the /boot/grub/grub.conf file by removing the following:
console=0,9600n8    rdblacklist=nouveau
  1. Restart the host computer. After restart, the host operating system will be able to use the primary video adapter.
  2. 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.
  3. 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.
  4. 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. 

The outpu




ba5e5f45418176e248ce4e6944a9768b f7e98a499afbac57211faff7cc433d12 147b9e14b9c9ab8c2e7cd2a7443fe1f8

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Desktop Virtualization
- Parallels Desktop 9 for Mac
- Parallels Transporter
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac Enterprise Edition
- Parallels Management-Mac for Microsoft SCCM
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0 Beta
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification