1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

added libvirt readonly for readonly calls (#307)

This commit is contained in:
Jaime Melis 2010-08-25 12:54:11 +02:00
parent e1931a4047
commit c5ae345e7b
3 changed files with 3 additions and 12 deletions

View File

@ -21,7 +21,7 @@
# TODO : use virsh freecell when available
######
nodeinfo_text = `virsh -c qemu:///system nodeinfo`
nodeinfo_text = `virsh -c qemu:///system nodeinfo --readonly`
nodeinfo_text.split(/\n/).each{|line|
if line.match('^CPU\(s\)')

View File

@ -18,9 +18,6 @@
source $(dirname $0)/kvmrc
# Execution example
# virsh dominfo one-108 | awk "`cat poll.awk`" | tr '\n' ' '
AWK_SCRIPT='
BEGIN { FS=":" };
@ -48,15 +45,9 @@ $1=="State" {
deploy_id=$1
virsh_cmd="virsh dominfo $deploy_id"
virsh_cmd="virsh --connect $LIBVIRT_URI --readonly dominfo $deploy_id"
awk_cmd="awk \'$AWK_SCRIPT\'"
info=`$virsh_cmd 2>/dev/null | awk "$AWK_SCRIPT"`
echo $info
#virsh_info=`virsh dominfo $deploy_id`

View File

@ -32,7 +32,7 @@ if [ "$exit_code" != "0" ]; then
fi
count=0
while [ $(virsh --connect $LIBVIRT_URI dominfo $deploy_id > /dev/null 2>&1; echo $?) = "0" ]
while [ $(virsh --connect $LIBVIRT_URI --readonly dominfo $deploy_id > /dev/null 2>&1; echo $?) = "0" ]
do
sleep $POLL_INTERVAL
if [ "$count" -gt "$TIMEOUT" ]