Rate This Document
Findability
Accuracy
Completeness
Readability

Testing the I/Os of Multiple VMs

Procedure

  1. Create a bridge.
    brctl addbr br2
    ip addr add 192.168.100.100/24 dev br2
    ip link set br2 up

    You are advised to write the bridge configuration to the network configuration directory /etc/sysconfig/net.. to ensure that the bridge exists when the host is restarted.

  2. Modify the VM XML settings.
    Add the following content to the file:
    1
    2
    3
    4
    5
        <interface type='bridge'>
          <mac address='11:22:33:44:55:66'/>
          <source bridge='br2'/>
          <model type='virtio'/>
        </interface>
    

    Create a virtual network port for each VM in bridge mode and configure the network for each VM. The preceding bridge IP address is used as an example. The IP address of a VM also needs to be set to 192.168.100.*. You can configure the IP address based on your requirements. Ensure that each VM is on the same network segment, but the MAC addresses of the VMs must be different. The purpose is to ensure that the VMs can ping each other.

  3. Start VMs.
    Run the following command on each VM:
    taskset -c 0 fio --server &
  4. Start the I/O test.
    Assume that there are eight VMs and they each have been configured with an IP address in the same network segment. Run the following command to perform the I/O test on the VMs:
    fio --client=192.168.3.10 dev.fio --client=192.168.3.11 dev.fio --client=192.168.3.12 dev.fio --client=192.168.3.13 dev.fio --client=192.168.3.14 dev.fio --client=192.168.3.15 dev.fio --client=192.168.3.16 dev.fio --client=192.168.3.17 dev.fio

    For the test result, see Testing the I/Os of a Single VM for reference.