How to Configure QEMU with SupremeRAID RAID as a Datastore for Virtual Machines #

How to Configure QEMU with SupremeRAID RAID as a Datastore for Virtual Machines #

Environment

RAID Model: All Supreme RAID model
Host Hardware: AMD/Intel
Operating System: Linux RHEL
QEMU

Description

Virtualization has become an essential tool for modern computing, enabling multiple virtual machines (VMs) to operate on a single physical machine. QEMU, an open-source virtualization platform, is widely used to create and manage VMs across various platforms, including Linux. To ensure optimal performance of your QEMU environment, it's crucial to select a reliable and high-performance storage solution for your VMs. In this article, we will explore the process of configuring QEMU on Linux to use SupremeRAID RAID as a datastore for your virtual machines.

Resolution

Note: The IOMMU(AMD) or Vd-t (Intel) need to enable in the BIOS to enable the Virtualization

Step1: Install the Qemu KVM dependency

$ sudo yum install qemu-kvm virt-install virt-viewer

Step2: Attach VD to the virtual machine.

  1. Create an VD with specific size
            To create a RAID-5 virtual drive with 5 NVMe SSDs:
            1. Create a physical drive.
$ sudo graidctl create physical_drive /dev/nvme0-4
            2. Create a drive group.
$ sudo graidctl create drive_group raid5 0-4 
            3. Create a virtual drive.
$ sudo graidctl create virtual_drive 0
            4. Check the device path of the new virtual drive.
$ sudo graidctl list virtual_drive --dg-id=0
  1. Set the VD path into the kvm disk parameter
    1. use text mode to install VM

      1. execute virt-install
      $ sudo virt-install \
      --virt-type=kvm \
      --name=graid-demo-kvm \
      --vcpus=16 \
      --memory=102400 \
      --location=/home/graid/ubuntu-20.04.3-live-server-amd64.iso \
      --disk path=/dev/gvd0n1 \
      --graphics none \
      --extra-args='console=ttyS0'
      

      Detail parameter description:

      location: the ISO's filepath

      extra-args: extra configuration, the "location" parameter must be if using this parameter.

      disk: the graid's vd path (/dev/gvd<#>n1)

      1. start to install VM

Output example:

  1. use GUI mode via VNC to install VM

    1. execute virt-install
    $ sudo virt-install \
    --virt-type=kvm \
    --name=graid-demo-kvm \
    --vcpus=16 \
    --memory=102400 \
    --cdrom=/home/graid/ubuntu-20.04.3-live-server-amd64.iso \
    --disk path=/dev/gvd0n1 \
    --graphics vnc,listen=0.0.0.0,password=<your password>\
    

    Detail parameter description:

    cdrom: the ISO's filepath

    disk: the graid's vd path (/dev/gvd<#>n1)

    1. check the VNC connection port
      After execute the virt-install check the VNC connection port
      $ virsh vncdisplay graid-demo-kvm
      
    2. trun-off firewall
    $ sudo systemctl stop firewalld
    
    1. execute VNC to install VM


  1. Start using