To install SBC on a virtual machine (VM) with PCI pass-through device, you must first create a VM and allocate its resources (for example CPU, memory, and NICs), as well as configure a datastore to contain the SBC operating system and application software.
- The instance is created on Linux Vanilla flavor version 7.0, and the screens listed here may vary in the latest Linux Vanilla flavor versions.
- Intel I350 Ethernet adapter is recommended for configuring as PCI pass-through device.
Configuring Host With PCI Pass-Through Device
You must configure the host system with PCI pass-through device before creating a new SBC SWe instance.
You must follow the BIOS settings recommendations for the particular server. Refer to BIOS Settings Recommendations section for guidance.
To configure the host:
- Log onto the host system.
Navigate to the following directory path:
cd /etc/default/
- Open the
grub
file invi
editor. Search for
GRUB_CMDLINE_LINUX
orlinuxefi/vmlinuz
and append the following:intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci=realloc For example: GRUB_CMDLINE_LINUX="vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci=realloc" GRUB_DISABLE_RECOVERY="true"
- Save and exit the file.
Enter the following command to update the
grub.cfg
file:grub2-mkconfig --output=/boot/<DIR_PATH>/grub.cfg
Note:Based on your BIOS settings
<DIR_PATH>
can either be/efi/EFI/redhat/
or/grub2/
.Enter the following command to reboot the host system.
reboot
Log onto the host system after reboot.
Enter the following command to verify the grub update:
# cat /proc/cmdline - BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 root=UUID=9ab5f45b-8b74-4620-ae67-4d48eea55273 ro vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci=realloc
Enter the following command to enable VFIO.
modprobe vfio-pci
Enter the following command to list IOMMU groups with the interfaces.
find /sys/kernel/iommu_groups/ -type l
The command executes with the list of IOMMU groups.
/sys/kernel/iommu_groups/15/devices/0000:0a:00.0 /sys/kernel/iommu_groups/15/devices/0000:0a:00.1 /sys/kernel/iommu_groups/16/devices/0000:00:1d.0 /sys/kernel/iommu_groups/17/devices/0000:00:1e.0 /sys/kernel/iommu_groups/18/devices/0000:00:1f.0 /sys/kernel/iommu_groups/18/devices/0000:00:1f.2 /sys/kernel/iommu_groups/19/devices/0000:02:00.0 /sys/kernel/iommu_groups/20/devices/0000:03:00.0 /sys/kernel/iommu_groups/20/devices/0000:03:00.1
Enter the following command to list interfaces.
lspci | grep -i ether
The command executes listing the interfaces.
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 03:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 03:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 03:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 0a:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 0a:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
Note:Only Intel I350 Ethernet adapter is supported for configuring as PCI pass-through device.
Enter the following command to know the PCI ID of the interface.
lspci -n -s 0000:<interface_id> For example, lspci -n -s 0000:0a:00.0
The command executes to list the PCI ID.
0a:00.0 0200: 8086:1521 (rev 01)
Enter the following command to unbind the interface.
echo 0000:0a:00.0 >/sys/bus/pci/devices/0000\:0a\:00.0/driver/unbind
Enter the following command to add this new interface to the VFIO-PCI list.
echo 8086 1521 > /sys/bus/pci/drivers/vfio-pci/new_id
Repeat steps 10 through 12 to add another interface to the VFIO-PCI list.
Creating an SBC SWe Instance with PCI Pass-Through Device
To install SBC on a virtual machine (VM), first create a VM and allocate resources (such as CPU, memory, and NICs), as well as configure a datastore that contains SBC operating system and application software.
To create a new SBC SWe KVM instance:
The instance is created on Linux Vanilla flavor version 7.0, and the screens listed here may vary in the latest Linux Vanilla flavor versions.
Perform the following to export the display on your desktop if you are remotely accessing the KVM host system.
Log onto KVM host system through SSH and telnet client such as PuTTY.
Enter the following command to export the display:
export DISPLAY=<system_IP>:0.0
where <system_IP> is the system IP address where GUI is exported for display.
Enter the following command to launch the virtual machine manager (virt manager) on your system.
virt-manager
Note:Ensure Xserver is running on the host system to import the display on your desktop.
The Virtual Machine Manager window displays.
Click New to create a new VM.
The Create a new virtual machine window displays.NoteThe figures shown in this procedure are intended as examples of the user interface and might not match the presented images exactly.
- In Step 1 of Create a new virtual machine window:
Enter the name for the virtual machine in the Name field.
- Select Local install media (ISO image or CDROM).
Click Forward.
The locate your install media window displays.
In Step 2 of the Create a new virtual machine window:
Select Use ISO image and click Browse.
The Locate ISO media volume window displays.Click Browse Local.
The Locate ISO media window displays.Navigate to the folder containing the media file; select the ISO file and click Open.
The directory path of the selected ISO is displayed in Use ISO image field.
- In Step 2 of the Create a new virtual machine window:
- Click the OS type drop-down list and select Linux.
- Click the Version drop-down list and select Debian Jessie.
Click Forward.
The memory and CPU settings window displays.
- In Step 3 of the Create a new virtual machine window:
- In the Memory (RAM) field, enter 17408 MB as the RAM size.
- In the CPUs field, enter 4 as the number of vCPUs.
Click Forward.
The storage details window displays.
- In Step 4 of the Create a new virtual machine window:
Select the Enable storage for this virtual machine option.
Select the Create a disk image on the computer's hard drive option and enter 100 GB as the hard drive space.
- Select the Allocate entire disk now checkbox.
Click Forward.
The ready to begin installation window displays.
In Step 5 of the Create a new virtual machine window:
Select the Customize configuration before install checkbox.
Click Finish.
The VM configuration screen displays.NoteThe figures shown in this procedure are intended as examples of the user interface and might not match the presented images exactly.
- Perform the following steps to configure the VM settings:
In the left pane, click Processor. The corresponding processor options displays.
- Click Configuration to expand the section.
Click Copy host CPU configuration.
The Model field displays the host CPU configuration running on the host system.
- Click Topology to expand the section.
- Select Manually set CPU topology checkbox.
- In the Sockets field, enter 1 as number of sockets required for the instance.
- In the Cores field, enter 2 as the number of cores required for the instance.
In the Threads field, enter 2 as the number of threads required for the instance.
Click Apply.
Note:Refer to table 5 on For KVM Hypervisor for minimum configuration requirements.
- In the left pane, click Disk 1. The corresponding disk options displays.
Click Advanced options to expand the section and select the IDE from the drop-down list as the Disk bus value.
Click Apply.
In the left pane, click NIC. The corresponding network interface options displays.
Click Source device drop-down list and select a device for MGT interface.
- Click Device Model drop-down list and select virtio.
Click Apply.
Click Add Hardware to add a NIC for HA interface.
The Add New Virtual Hardware window displays.
- In the left pane, click Network.
Click the Host device drop-down list and select a device for HA interface.
By default, the MAC address for the selected host device is displayed in the MAC address field. Do not uncheck the MAC address checkbox.
- Click Device Model drop-down list and select virtio.
Click Finish.
The new NIC is listed in the left pane.
Select the new NIC.
Click Source mode drop-down list and select Bridge.
Click Apply.
- In the left pane, click Processor. The corresponding processor options displays.
- Click Add Hardware.
Add New Virtual Hardware window displays. - In the left pane, click PCI Host Device. The PCI host devices options displays.
- Scroll through the list and select the interface added to the PCI list.
Click Finish.
The added PCI device for PKT0 is listed in the left pane.
Repeat steps 9 (d) [i] through 9 (d) [iv] to add another PCI device for PKT1.
- Click Add Hardware.
Configure the VM for CPU pinning to optimize performance. Complete the following steps:
- Force off the instance.
- Complete the CPU pinning procedure.
Return to the VM Configuration screen and select Boot Options in the left pane.
Update the Boot device order so that IDE CDROM1 is first, followed by VirtIO Disk 1.
Click Apply.
Click Begin Installation.
The ConnexIP Installer Boot Menu displays.