Crunching in a Virtual Machine

Logforme
Logforme
Joined: 13 Aug 10
Posts: 332
Credit: 1,714,373,961
RAC: 0

From what I read Nvidia seem

From what I read Nvidia seem to prevent (or not bother with) VGA passthrough in their drivers unless you have a high-end GPU (e.g. Quadro)
Read about patches that make your GForce report it's a Quadro to make it work, sounds risky.
AMD have submitted patches to Xen for years to make VGA passthrough work. Nvidia is not stellar in their open-source relationships.

I never got my GTX580 to work in the XenServer. I ended up using my AMD 7970 and moved the GTX to my workstation.

Why rebuild your windows VM when switching GPU? just uninstall the driver, swap the card and install new drivers.

robl
robl
Joined: 2 Jan 13
Posts: 1,701
Credit: 1,423,579,323
RAC: 8,245

RE: From what I read Nvidia

Quote:
From what I read Nvidia seem to prevent (or not bother with) VGA passthrough in their drivers unless you have a high-end GPU (e.g. Quadro)
Read about patches that make your GForce report it's a Quadro to make it work, sounds risky.
AMD have submitted patches to Xen for years to make VGA passthrough work. Nvidia is not stellar in their open-source relationships.

I looked at some of the "convert to Quadro" solutions too and I am not comfortable with some of the suggested solutions. I agree it seems a bit risky. As long as you know NVIDIA is a problem then it would be best to avoid NVIDIA in a Virtualized world and pursue the use of ATI products. But do your homework because not all ATI products are guaranteed to work in a virtualized world. I make this comment as a "heads up" to those who like myself are new to virtualization and might want to tackle it.

My quess is that with NVIDIA pursuing a vGPX hardware path they have no desire to steel customers from this effort by supporting their "cheaper" GPUs in a virtualized world.

Quote:

I never got my GTX580 to work in the XenServer. I ended up using my AMD 7970 and moved the GTX to my workstation.

Why rebuild your windows VM when switching GPU? just uninstall the driver, swap the card and install new drivers.

I had stopped all VM and shudown the xenserver. replaced the ati card with the 650 ti. powered up. enabled all vm but because pass-through had been with an ATI which was no longer present I could not login to the win 7 box either through the xen console window or with VNC. Hence the rebuild. Probably a procedural issue on my part.

Logforme
Logforme
Joined: 13 Aug 10
Posts: 332
Credit: 1,714,373,961
RAC: 0

RE: I had stopped all VM

Quote:
I had stopped all VM and shudown the xenserver. replaced the ati card with the 650 ti. powered up. enabled all vm but because pass-through had been with an ATI which was no longer present I could not login to the win 7 box either through the xen console window or with VNC. Hence the rebuild. Probably a procedural issue on my part.


Ah, I did the exact same thing. Forget to un-assign the GPU from the VM and that VM is toast if you remove the GPU from the host. Most annoying, but XenCenter does have a warning about it when you assign a GPU. But who reads warnings :)

robl
robl
Joined: 2 Jan 13
Posts: 1,701
Credit: 1,423,579,323
RAC: 8,245

RE: Guess you installed a

Quote:
Guess you installed a single CPU version of windows. Did it only have one vCPU when you installed windows?
Look at this thread

Revisiting this "problem" I decided to install another Windows VM using Win7 Ultimate. I am currently running this product on a PC that supports 4 CPUs and in a non-virtualized world Win Ultimate recognized all 4 CPUs. After the installation of this product into a VM on xenserver it recognized only 1 CPU even though I had defined 2 in the VM definition. Now I am thinking this is quite strange. Googling. I found that others in Win 7 VMs were having similar problems. One had suggested using msconfig and changing the cpu count there. I tried it and was successful in causing Win 7's task manager to recognize a 2nd cpu. More reading indicated this was not the way to go so I deleted this VM of Win 7 ultimate.

I came across a Citrix document id: CTX126524 which discussed "How to Set Cores-Per-Socket Parameter for a Virtual Machine". Confusion. It said that the procedures that follows would not be applicable to the free version of XenServer, but this was a dated "fix". I tried it and it worked. My original Windows 7 Home Premium edition is now displaying 2 vCPUs in task manager after applying the procedure in this fix.

here is what this fix said to do (note the VM is in a "halt" state)

1. xe vm-list name-label=win764
uuid ( RO) : 79c9794d-fda9-9a8c-c5d7-c19b929bd1d8
name-label ( RW): win764
power-state ( RO): halted

2. xe vm-param-set platform:cores-per-socket=4 uuid=id-from_step_1_above

3. xe vm-param-set VCPUs-max=8 uuid=79c9794d-fda9-9a8c-c5d7-c19b929bd1d8

4. xe vm-param-set VCPUs-at-startup=2 uuid=79c9794d-fda9-9a8c-c5d7-c19b929bd1d8

5. start the VM

Before doing the above steps device manager would show that 2 processors were defined but task manager would only show 1 vCPU. An "echo" of the %number_of_active_processors% (not the exact value-I can't remember now what it was) would show 1 which would agree with task manager. Now after the above steps Device manager shows 2 processors and task manager shows 2 vCPUs.

This is/has been most frustrating. I feel that XenCenter should handle this without the need for command line interpretation. I know Logforme did not have an issue with this so I am wondering if it is an issue with the type CPU hardware being used. Mine is an Intel Core I7-4770.

[Edit] XenCenter shows that I have installed all outstanding "hotfixes" and that there are none pending. Conclusion: my Xen environment is current.

Thought this would be of interest to the thread going forward should others who venture into this arena have the same problem.

Logforme
Logforme
Joined: 13 Aug 10
Posts: 332
Credit: 1,714,373,961
RAC: 0

Excellent detective work. I

Excellent detective work. I agree this should be better documented, or even integrated into the XenCenter GUI tool.

Quote:
I know Logforme did not have an issue with this so I am wondering if it is an issue with the type CPU hardware being used. Mine is an Intel Core I7-4770


I do run a Xeon CPU which is more geared to servers, but I think the number of CPUs/Cores are handled the same way as in the Desktop CPUs.
I believe the reason my windows see all the vCPU I assigned to the VM is that I run Windows 2008 Server. Guess Microsoft don't use any artificial limits on the number of CPUs that can be used in the server versions.

ExtraTerrestrial Apes
ExtraTerrestria...
Joined: 10 Nov 04
Posts: 770
Credit: 427,431,026
RAC: 2,500

Yes, Server supports way more

Yes, Server supports way more CPU sockets. Not sure about the limits, but it's quite a bit.

MrS

Scanning for our furry friends since Jan 2002

robl
robl
Joined: 2 Jan 13
Posts: 1,701
Credit: 1,423,579,323
RAC: 8,245

FYI: I have successfully

FYI:

I have successfully passed through an AMD Radeon R9 270X Series graphics card.

It is showing as:

CAL AMD Radeon HD 7850/7870 series (Pitcairn) (2048MB) driver: 1.4.1848

in E@H's "Your Computers" view.

robl
robl
Joined: 2 Jan 13
Posts: 1,701
Credit: 1,423,579,323
RAC: 8,245

The first 3 WUs for Binary

The first 3 WUs for Binary Radio Pulsar Search (Arecibo, GPU) v1.39 (BRP4G-opencl-ati) completed with run times of ~5500 sec. This seems like a respectable time to me. I do not have any non-virtualized times to compare to however for this GPU.

robl
robl
Joined: 2 Jan 13
Posts: 1,701
Credit: 1,423,579,323
RAC: 8,245

FYI this example is to

FYI

this example is to pass through a pci audio device to a Linux VM

I need to note that this is a compilation from a couple of websites where those before me have done the same. I have used their information to assemble this "readme" with some direct cut/paste from their websites.

login to your Linux virtual host

lspci | grep -i Audio
nothing should be returned
exit

login to your XenServer Host as root

lspci | grep -i Audio
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
02:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series]

I am going to pass through the audio device with the address of: 00:1b.0

Now notice that we need to expand this address to: 0000:00:1b.0

Get a list of your all virtual machines on the XenServer HOST
a lot of output follows but this is the VM I want:

xe vm-list
o
o
o

uuid ( RO) : 8e7a5486-515d-34c8-60e5-1c6c9bc41d24
name-label ( RW): ubuntu1204_HVM
power-state ( RO): running

Now pass through the audio device:
xe vm-param-set other-config:pci=0/0000:00:1b.0 uuid=8e7a5486-515d-34c8-60e5-1c6c9bc41d24

in the above note the: 0/0000:00:1b.0
each PCI address starts with a “#/â€, with each address separated by a comma if passing multiple devices.
so if I were going to pass through two devices it would look like the following:

Start the counter at 0 and increase by one for each device you add. Here is the string I would use for multiple devices use:
0/0000:06:00.0,1/0000:00:1a.0
Note the 0/ and 1/ separated by a comma

you can do this while the virtual machine is running but it will not take effect until you do
a "stop/shutdown" followed by a "start". This is NOT the same as a "restart".

In the event you need to remove the device above do the following:
xe vm-param-remove param-name=other-config param-key=pci uuid="UUID of selected VM"
shutdown the VM
start the vm

login to the VM node

lspci | grep -i Audio

00:05.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)

test:
aplay {path_to_some_wav_file}
speaker should respond.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.