---
title: "Installing vNIOS Virtual Appliance in the KVM Environment"
canonical: "https://docs.infoblox.com/space/NKHOIG/35483517/Installing%20vNIOS%20Virtual%20Appliance%20in%20the%20KVM%20Environment"
format: markdown
---
To deploy the virtual appliance, complete the following steps:

1. Depending on which KVM Hypervisor you are using, upload the qcow2 file to the KVM/libvirt environment.   
For supported appliance models, see *[vNIOS for KVM X6 Series](https://docs.infoblox.com/space/vniosspec/1488552080/vNIOS+for+KVM+X6+Series)* and *[vNIOS for KVM X5 Series](https://docs.infoblox.com/space/vniosspec/1488683067/vNIOS+for+KVM+X5+Series)*.
2. Set up the networks MGMT_network, LAN1_network, and LAN2_network for your KVM environment.  
You may need to manually modify certain files to suit your environment. Sample XML files for defining MGMT and LAN1 interfaces are given below. For more information, refer to the respective documentation for your KVM Hypervisor.
  - Sample XML File for MGMT  
`<network>`  
`    <name>MGMT</name>`  
`    <forward mode='bridge'/>`  
`    <bridge name='virbr0' />`  
` </network>`
  - Sample XML File for LAN1  
`<network>`  
`    <name>LAN1</name>`  
`    <forward mode='bridge'/>`  
`    <bridge name='virbr0' />`  
` </network>`
3. Deploy the virtual appliance using one of the following methods:
  - *[Deploying the Virtual Appliance from the CLI](#CLI_deployment)*
  - *[Deploying the Virtual Appliance Using XML files](#XML_Deployment)*

# > Macro (anchor)

Deploying the Virtual Appliance from the CLI

1. Open the KVM console.
2. Use the following command to deploy a virtual appliance:  
`virt-install --name <name_of_the_vm> --ram=<memory in MBs> --vcpus=<no._of_cpu_cores> --disk path<path_to_NIOS_qcow2_image>,size=<primary_disk_size_in_GBs> --boot hd --import --network network:<mgmt._network> --network network:<lan1_network> --network network:<ha_network> --network network:<lan2_network> --os-type=<operating_system_type> --os-variant=<operating_system_variant>`  
  
Example:
  `virt-install --name NIOS-IB-v926 --ram=32768 --vcpus=4 --disk path=/var/lib/libvirt/images/nios-9.0.5-fixed-500G.qcow2,size=500 --boot hd --import --network network:mgmt_eno2np0_mellanox --network network:lan_eno3np1_mellanox --network network:lan_eno3np1_mellanox --network network:lan2_eno3np2_mellanox --os-type=linux --os-variant=rhel9.3`
3. (Optional) If you are deploying a reporting appliance, use the following command:  
`virt-install --name <name_of_the_vm> --ram=<memory in MBs> --vcpus=<no._of_cpu_cores> --disk path<path_to_NIOS_qcow2_image>,size=<primary_disk_size_in_GBs> --disk size=<secondary_disk_size_in_GBs> --boot hd --import --network network:<mgmt._network> --network network:<lan1_network> --network network:<ha_network> --network network:<lan2_network> --os-type=<operating_system_type> --os-variant=<operating_system_variant>`  
  
Example:  
`virt-install --name NIOS-IB-v805 --ram=32768 --vcpus=4 --disk path=/var/lib/libvirt/images/nios-9.0.5-fixed-500G.qcow2,size=500 --disk size=250 --boot hd --import --network network:mgmt_eno2np0_mellanox --network network:lan_eno3np1_mellanox --network network:lan_eno3np1_mellanox --network network:lan2_eno3np2_mellanox --os-type=linux --os-variant=rhel9.3`
4. Configure the vNIOS instance as described in <span style="color: #000000">*[Configuring](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[the](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[vNIOS](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[Instance](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[in](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[the](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[KVM](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[Environment](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">.</span>

# > Macro (anchor)

Deploying the Virtual Appliance Using XML files

Instead of deploying a vNIOS virtual appliance through the GUI, you can create the following XML files for the appliance and then execute commands to define and start the appliance in KVM.

> ⚠️ **Note**
> ⚠️ 
> ⚠️ If you are deploying the virtual appliance on Red Hat Enterprise Linux specify the following in the XML file:
> ⚠️ 
> ⚠️ - The emulator compatible with the host that is running the KVM.  
> ⚠️ For example, for RHEL 9.4 one of the supported emulators is `qemu-kvm`.
> ⚠️ - The supported machine type according to the operating system.  
> ⚠️ For example, for RHEL 9.4 the machine type is `pc-q35-rhel9.4.0`.

1. Create an XML file required to deploy the vNIOS instance in KVM. For details, see the *Defining XML files for vNIOS Appliances* section. You can download sample XML files from the *Downloads* page for specific vNIOS versions from the Infoblox Support web site. For supported appliance models, see *[vNIOS for KVM X6 Series](https://docs.infoblox.com/space/vniosspec/1488552080/vNIOS+for+KVM+X6+Series)* and *[vNIOS for KVM X5 Series](https://docs.infoblox.com/space/vniosspec/1488683067/vNIOS+for+KVM+X5+Series)*.
2. Open the KVM console and run the following commands to define and start the vNIOS virtual appliance.  
Include the path to the directory that stores the XML file.  
`virsh define <Name of the vnios XML file> `   
`virsh start <VM Name>`
3. (Optional) If you are deploying a vNIOS reporting server, complete the following:
  1. Create a secondary disk for the reporting appliance by using the following command:  
`qemu-img create -f qcow2 /var/lib/libvirt/images/secondary-disk-250G.qcow2 250G`
  2. Create an XML file as described in the *Defining an XML File for Reporting Servers* section[,](https://infoblox-docs.atlassian.net/wiki/pages/resumedraft.action?draftId=27721764#InstallingvNIOSVirtualApplianceintheKVMEnvironment-bookmark21) and then open the KVM console and execute the following commands to define and start the vNIOS reporting instance:  
`chown -R qemu.qemu <the directory to which you uploaded the qcow2 files>` (For example, if you store the qcow2 files in */storage/vm/reporting800*, enter `/storage/vm/reporting800`.)  
`virsh define <XML file>` (Include the path to the directory that stores the XML file.)  
`virsh start <VM Name>`
4. Configure the vNIOS instance. For more information, see <span style="color: #000000">*[Configuring](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[the](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[vNIOS](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[Instance](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[in](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[the](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[KVM](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000">[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)</span><span style="color: #000000">*[Environment](https://infoblox-docs.atlassian.net/wiki/spaces/NKHOIG/pages/1174208659)*</span><span style="color: #000000"> section.</span>

## Defining XML files for vNIOS Appliances

You can define vNIOS information such as the name of the VM, memory size, number of CPUs, location of the qcow2 files, and file format in an XML file as shown in the *Sample XML File for a vNIOS Appliance* section.

### Sample XML File for a vNIOS Appliance

The section has a sample XML file for defining a vNIOS virtual appliance in KVM. The values of VM name, memory, vCPU, and the location of the qcow2 file may vary according to your deployment.

  
`<domain type='kvm' >`  
`  <name>IB-appliance</name>`  
`  <memory unit='KiB'>36700160</memory>`  
`  <vcpu placement='static'>8</vcpu>`  
`  <resource>`  
`    <partition>/machine</partition>`  
`  </resource>`  
`  <os>`  
`    <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>`  
`    <boot dev='hd'/>`  
`  </os>`  
`  <features>`  
`    <acpi/>`  
`    <apic/>`  
`    <vmport state='off'/>`  
`  </features>`  
`  <clock offset='utc'>`  
`    <timer name='rtc' tickpolicy='catchup'/>`  
`    <timer name='pit' tickpolicy='delay'/>`  
`    <timer name='hpet' present='no'/>`  
`  </clock>`  
`  <on_poweroff>destroy</on_poweroff>`  
`  <on_reboot>restart</on_reboot>`  
`  <on_crash>destroy</on_crash>`  
`  <pm>`  
`    <suspend-to-mem enabled='no'/>`  
`    <suspend-to-disk enabled='no'/>`  
`  </pm>`  
`  <devices>`  
`    <emulator>/usr/bin/qemu-system-x86_64</emulator>`  
`    <disk type='file' device='disk'>`  
`      <driver name='qemu' type='qcow2'/>`  
`      <source file='<path to NIOS qcow2 file' index='1'/>`  
`      <backingStore/>`  
`      <target dev='vda' bus='virtio'/>`  
`      <alias name='virtio-disk0'/>`  
`      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>`  
`    </disk>`  
`    <interface type='bridge'>`  
`      <source network='lan1' bridge='br1'/>`  
`      <target dev='vnet0'/>`  
`      <model type='virtio'/>`  
`      <alias name='net0'/>`  
`      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>`  
`    </interface>`  
`    <interface type='bridge'>`  
`      <source network='lan1' bridge='br1'/>`  
`      <target dev='vnet1'/>`  
`      <model type='virtio'/>`  
`      <alias name='net1'/>`  
`      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>`  
`    </interface>`  
`    <interface type='bridge'>`  
`      <source network='lan1' bridge='br1'/>`  
`      <target dev='vnet2'/>`  
`      <model type='virtio'/>`  
`      <alias name='net2'/>`  
`      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>`  
`    </interface>`  
`    <interface type='bridge'>`  
`      <source network='lan1' bridge='br1'/>`  
`      <target dev='vnet3'/>`  
`      <model type='virtio'/>`  
`      <alias name='net3'/>`  
`      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>`  
`    </interface>`  
`    <serial type='pty'>`  
`      <source path='/dev/pts/2'/>`  
`      <target type='isa-serial' port='0'>`  
`        <model name='isa-serial'/>`  
`      </target>`  
`      <alias name='serial0'/>`  
`    </serial>`  
`    <console type='pty' tty='/dev/pts/2'>`  
`      <source path='/dev/pts/2'/>`  
`      <target type='serial' port='0'/>`  
`      <alias name='serial0'/>`  
`    </console>`  
`    <video>`  
`      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>`  
`      <alias name='video0'/>`  
`      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>`  
`    </video>`  
`    <memballoon model='virtio'>`  
`      <alias name='balloon0'/>`  
`      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>`  
`    </memballoon>`  
`  </devices>`  
`</domain>`

## Defining an XML File for Reporting Servers

If you are deploying a reporting server in KVM, you must define an XML file that includes information such as the name of the VM, memory size, number of CPUs, location of the qcow2 files, and file format before you can spin up the vNIOS instance.  
Following is a sample XML file for defining a reporting server in KVM. Note that the VM name, memory, vCPU, and location of the qcow2 files may vary according to your deployment.  
Depending on the KVM tool you are using to deploy the reporting server, you can use the following sample file as a reference to create your own XML file:  
`<domain type='kvm'>
  <name>Reporting-appliance</name>
  <memory unit='KiB'>36700160</memory>
  <vcpu placement='static'>8</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state='off'/>
  </features>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='<Path to NIOS qcow2 file' index='1'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </disk>
    
    <!-- New Secondary Disk of 250GB -->
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='<Path to Reporting disk'/>
      <target dev='vdb' bus='virtio'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    </disk>
    
    <interface type='bridge'>
      <source network='lan1' bridge='br1'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <source network='lan1' bridge='br1'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <source network='lan1' bridge='br1'/>
      <target dev='vnet2'/>
      <model type='virtio'/>
      <alias name='net2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <source network='lan1' bridge='br1'/>
      <target dev='vnet3'/>
      <model type='virtio'/>
      <alias name='net3'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/2'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
</domain>`