XenServer Basics#
To install and configure NVIDIA vGPU software and optimize XenServer operation with vGPU, some basic operations on XenServer are needed.
Opening a dom0 shell#
Most configuration commands must be run in a command shell in the XenServer dom0 domain. You can open a shell in the XenServer dom0 domain in any of the following ways:
Using the console window in XenCenter
Using a standalone secure shell (SSH) client
Accessing the dom0 shell through XenCenter#
In the left pane of the XenCenter window, select the XenServer host that you want to connect to.
Click on the Console tab to open the XenServer console.
Press Enter to start a shell prompt.
Figure 31 Connecting to the dom0 shell by using XenCenter#
Accessing the dom0 shell through an SSH client#
Ensure that you have an SSH client suite such as PuTTY on Windows, or the SSH client from OpenSSH on Linux.
Connect your SSH client to the management IP address of the XenServer host.
Log in as the root user.
Copying files to dom0#
You can copy files to and from XenServer dom0 by mounting a CIFS/SMB file share from dom0.
The following example shows how to mount a network share \\myserver.example.com\myshare at /mnt/myshare on dom0 and how to copy files to and from the share. The example assumes that the file share is part of an Active Directory domain called example.com and that user myuser has permissions to access the share.
Create the directory
/mnt/myshareon dom0.[root@xenserver ~]# mkdir /mnt/myshare
Mount the network share
\\myserver.example.com\myshareat/mnt/myshareon dom0.[root@xenserver ~]# mount -t cifs -o username=myuser,workgroup=example.com //myserver.example.com/myshare /mnt/myshare Password: [root@xenserver ~]#
When prompted for a password, enter the password for
myuserin theexample.comdomain.After the share has been mounted, copy files to and from the file share by using the
cpcommand to copy them to and from/mnt/myshare:[root@xenserver ~]# cp /mnt/myshare/NVIDIA-vGPU-NVIDIA-vGPU-CitrixHypervisor-8.2-595.112.08.x86_64.rpm . [root@xenserver ~]#
Determining a VM’s UUID#
You can determine a virtual machine’s UUID in any of the following ways:
Using the
xe vm-listcommand in a dom0 shellUsing XenCenter
Determining a VM’s UUID by using xe vm-list#
Use the xe vm-list command to list all VMs and their associated UUIDs or to find the UUID of a specific named VM.
To list all VMs and their associated UUIDs, use
xe vm-listwithout any parameters:[root@xenserver ~]# xe vm-list uuid ( RO) : 6b5585f6-bd74-2e3e-0e11-03b9281c3ade name-label ( RW): vgx-base-image-wind-64 power-state ( RO): halted uuid ( RO) : fa3d15c7-7e88-4886-c36a-cdb23ed8e275 name-label ( RW): test-image-wind-64 power-state ( RO): halted uuid ( RO) : 501bb598-a9b3-4afc-9143-ff85635d5dc3 name-label ( RW): Control domain on host: xenserver power-state ( RO): running uuid ( RO) : 8495adf7-be9d-eee1-327f-02e4f40714fc name-label ( RW): vgx-base-image-wind-64 power-state ( RO): halted
To find the UUID of a specific named VM, use the
name-labelparameter toxe vm-list:[root@xenserver ~]# xe vm-list name-label=test-image-wind-64 uuid ( RO) : fa3d15c7-7e88-4886-c36a-cdb23ed8e275 name-label ( RW): test-image-wind-64 power-state ( RO): halted
Determining a VM’s UUID by using XenCenter#
In the left pane of the XenCenter window, select the VM whose UUID you want to determine.
In the right pane of the XenCenter window, click the General tab.
The UUID is listed in the VM’s General Properties.
Figure 32 Using XenCenter to determine a VM’s UUID#
Using more than two vCPUs with Windows client VMs#
Windows client operating systems support a maximum of two CPU sockets. When allocating vCPUs to virtual sockets within a guest VM, XenServer defaults to allocating one vCPU per socket. Any more than two vCPUs allocated to the VM won’t be recognized by the Windows client OS.
To ensure that all allocated vCPUs are recognized, set platform:cores-per-socket to the number of vCPUs that are allocated to the VM:
[root@xenserver ~]# xe vm-param-set uuid=<vm-uuid> platform:cores-per-socket=4 VCPUs-max=4 VCPUs-at-startup=4
<vm-uuid> is the VM’s UUID, which you can obtain as explained in Determining a VM’s UUID.
How GPU locality is determined#
As noted in NUMA Considerations, current multi-socket servers typically implement PCIe expansion slots local to each CPU socket and it is advantageous for VMs to run on the same CPU socket as the physical GPU to which they are connected.
For current Intel platforms, CPU socket 0 typically has its PCIe root ports located on bus 0, so any GPU below a root port located on bus 0 is connected to socket 0. CPU socket 1 has its root ports on a higher bus number, typically bus 0x20 or bus 0x80 depending on the specific server platform.