Verfied versions: libvirt-2.0.0-6.el7.x86_64 qemu-kvm-rhev-2.6.0-22.el7.x86_64
Steps: 1. Prepare a NFS storage, mount the NFS storage then start a guest which image located in the NFS storage.
# virsh list --all Id Name State ---------------------------------------------------- 11 vm1 running
# virsh domblklist vm1 Target Source ------------------------------------------------ hdc - vda /tmp/zp/beaker/r73q2-1.img
check the guest is working well
2. disconnect the NFS server # iptables -A OUTPUT -d $IP -p tcp --dport 2049 -j DROP
3. In termial 1, check IO throttlling using blkdeviotune
# virsh blkdeviotune vm1 vda ...... It will hange for a few minutes here
4. In the terminal 2, check domstats for the running guest using domstas It also needs few minutes to get a return. But it won't hang forever.
# virsh domstats Domain: 'vm1' state.state=1 state.reason=1 cpu.time=30014234910 cpu.user=1760000000 cpu.system=8750000000 balloon.current=1048576 balloon.maximum=1048576 vcpu.current=1 vcpu.maximum=8 vcpu.0.state=1 vcpu.0.time=26690000000 vcpu.0.wait=0 net.count=0 block.count=2 block.0.name=hdc block.1.name=vda block.1.path=/tmp/zp/beaker/r73q2-1.img
check terminal 1 agian, blkdeviotune also has a return.
# virsh blkdeviotune vm1 vda total_bytes_sec: 0 read_bytes_sec : 0 write_bytes_sec: 0 total_iops_sec : 0 read_iops_sec : 0 write_iops_sec : 0 total_bytes_sec_max: 0 read_bytes_sec_max: 0 write_bytes_sec_max: 0 total_iops_sec_max: 0 read_iops_sec_max: 0 write_iops_sec_max: 0 size_iops_sec : 0
5. check virsh list, it also won't hang. # virsh list Id Name State ---------------------------------------------------- 11 vm1 running
As above, domstats can get a return, it won't hang and it won't block other commands. From libvirt, it has been fixed.
Verfied versions: 2.0.0-6. el7.x86_ 64 rhev-2. 6.0-22. el7.x86_ 64
libvirt-
qemu-kvm-
Steps:
1. Prepare a NFS storage, mount the NFS storage
then start a guest which image located in the NFS storage.
# virsh list --all ------- ------- ------- ------- ------- ------- ---
Id Name State
-------
11 vm1 running
# virsh domblklist vm1 ------- ------- ------- ------- ------- ------ beaker/ r73q2-1. img
Target Source
-------
hdc -
vda /tmp/zp/
check the guest is working well
2. disconnect the NFS server
# iptables -A OUTPUT -d $IP -p tcp --dport 2049 -j DROP
3. In termial 1, check IO throttlling using blkdeviotune
# virsh blkdeviotune vm1 vda
...... It will hange for a few minutes here
4. In the terminal 2, check domstats for the running guest using domstas
It also needs few minutes to get a return. But it won't hang forever.
# virsh domstats 30014234910 1760000000 8750000000 current= 1048576 maximum= 1048576 0.time= 26690000000 1.path= /tmp/zp/ beaker/ r73q2-1. img
Domain: 'vm1'
state.state=1
state.reason=1
cpu.time=
cpu.user=
cpu.system=
balloon.
balloon.
vcpu.current=1
vcpu.maximum=8
vcpu.0.state=1
vcpu.
vcpu.0.wait=0
net.count=0
block.count=2
block.0.name=hdc
block.1.name=vda
block.
check terminal 1 agian, blkdeviotune also has a return.
# virsh blkdeviotune vm1 vda sec_max: 0 sec_max: 0
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec : 0
write_iops_sec : 0
total_bytes_
read_bytes_sec_max: 0
write_bytes_
total_iops_sec_max: 0
read_iops_sec_max: 0
write_iops_sec_max: 0
size_iops_sec : 0
5. check virsh list, it also won't hang. ------- ------- ------- ------- ------- ------- ---
# virsh list
Id Name State
-------
11 vm1 running
As above, domstats can get a return, it won't hang and it won't block other commands. From libvirt, it has been fixed.