Skip to content

Commit a3ac6f1

Browse files
committed
add clear vcpu quota period shares script
1 parent efb537a commit a3ac6f1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clear_vcpu_quota_period_shares.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#! /bin/bash
2+
for ins in `sudo virsh list --all | grep instance | awk '{print $2}'`
3+
do
4+
echo "clearing instance ${ins}"
5+
sudo virsh schedinfo ${ins} --set cpu_shares=0 vcpu_period=0 vcpu_quota=0 --config
6+
sudo virsh schedinfo ${ins} --set cpu_shares=1024 vcpu_period=0 vcpu_quota=-1 --live
7+
sleep 1
8+
done

0 commit comments

Comments
 (0)