jvdwege(a)xs4all.nl writes:
> Yes, it's still available. It will be dropped in 4.4.
OK, good to know, time to polish up my ansible or start writing api scripts.
Now that 4.4 popped up, how is that going?
I looked a bit at the Gerrit yesterday and right now and see that el8
builds are being done now, great work!
Yeah. I've got a startup script that I use to start all my VMs (see
below). I'll need to figure out how to migrate that script to SDK4.
It really sucks that there's no SDK4 version of ovirt-shell. I suspect
my script will expand by an order of magnitude, and everyone who has
written a script around ovirt-shell will have to duplicate effort.
I know there is a feature for the engine to autostart VMs (which I
believe will be in 4.4), but AFAIK it doesn't do ordering. I need at
least one specific VM to start up before everything else.
Thanks,
-derek
#!/bin/bash
[ -f /etc/sysconfig/vm_list ] || exit 0
. /etc/sysconfig/vm_list
echo -n "Starting at "
date
# Wait for the engine to respond
while [ `ovirt-shell -I -c -F -T 50 -E ping 2>/dev/null | grep -c success` != 1 ]
do
echo "Not ready... Sleeping..."
sleep 60
done
# Now wait for the storage domain to appear active
echo -n "Engine up. Searching for disks at "
date
total_disks=`ovirt-shell -I -c -E summary | grep storage_domains-total | sed -e 's/.*:
//'`
# subtract one because we know we're not using the image-repository
total_disks=`expr $total_disks - 1`
active_disks=`ovirt-shell -I -c -E summary | grep storage_domains-active | sed -e
's/.*: //'`
while [ $active_disks -lt $total_disks ]
do
echo "Storage Domains not active yet. Only found $active_disks/$total_disks.
Waiting..."
sleep 60
active_disks=`ovirt-shell -I -c -E summary | grep storage_domains-active | sed -e
's/.*: //'`
done
# Now start all of the VMs in the requested order.
echo -n "All storage mounted. Starting VMs at "
date
for vm in "${vm_list[@]}"
do
timeout=${vm_timeout[$vm]:-$default_timeout}
ovirt-shell -I -c -E "action vm $vm start"
sleep "$timeout"
done
--
Derek Atkins 617-623-3745
derek(a)ihtfp.com
www.ihtfp.com
Computer and Internet Security Consultant