Create and Deploy on KVM

For complete KVM documentation, refer to https://www.linux-kvm.org/page/Documents.

Set the following options in the BIOS of your Oracle Server:
  • Under IO Virtualization, enable virtualization (VT-d)
  • Under CPU Power Management, disable C3 and C6 reporting.
  • Under CPU Power Management, set the Energy option to Performance
  1. Disable irqbalance.
    sudo systemctl disable --now irqbalance
  2. (Optional) Isolate CPU cores from kernel scheduling.
    On a system with 96 cores, if you want to isolate cores 2 through 47 and cores 50 through 95, use this command to add the appropriate boot parameters.
    sudo grubby --update-kernel=ALL --args=""isolcpus=2-47,50-95 nohz_full=2-47,50-95 rcu_nocbs=2-47,50-95 intel_iommu=on iommu=pt
  3. Install the Virtualization Host group and virt-install.
    # yum groupinstall "Virtualization Host"
    # yum install virt-install
  4. Extract the image.
    # tar xvf nnSCZ739.64-img-vm_kvm.tar
    nnSCZ739.64-img-vm_kvm.ovf
    nnSCZ739.64-img-vm_kvm.qcow2
    legal.txt
  5. Use virt-manager to create the management and media network interfaces.
    • Create a virtual bridged network for management interfaces.
    • Create virtual networks for media interfaces.
  6. Provision a new virtual machine.
    # virt-install \
        --name SBC739 \
        --description "nnSCZ739 KVM" \
        --os-type=Linux \
        --os-variant=rhel7 \
        --ram=8192 \
        --vcpus=4 \
        --disk path=/opt/nnSCZ739.64-img-vm_kvm.qcow2,bus=virtio,size=10,format=qcow2 \
        --network bridge=br-Mgmt \
        --network bridge=br-Mgmt \
        --network bridge=br-Mgmt \
        --network bridge=br-Mgmt \
        --network network=media1 \
        --network network=media2 \
        --import \
        --cpu host

    Note:

    Use interface-mapping to pin the four br-Mgmt network interfaces to wancom0, wancom1, wancom2, and spare.
    --name
    Identify a unique name for the virtual machine on this hypervisor.
    --description
    Describe this virtual machine.
    --os-type
    Specify the operating system type.
    --os-variant
    Optimize the configuration for a specific operating system.
    --ram
    Allocate a specific amount of RAM to this virtual machine.
    --vcpus
    Allocate a specific number of virtual CPUs to this virtual machine.
    --disk
    Specify the path to the disk image.
    --network
    Connect the virtual machine to a host network.
    --import
    Skip the operating system installation process and build a guest around the disk image specified with --disk.
    --cpu
    Configure the CPU model and CPU features exposed to the virtual machine.

    See man virt-install for more information.

    Note:

    The --cpuset and --numatune options may be used to establish CPU affinity and socket pinning.

To maintain performance when using PV mode, you must pre-allocate cores to the Open vSwitch (OVS) for each forwarding core in the VM. For example, if the VM requires four forwarding cores, then four CPU cores should be allocated to the OVS.