Re: [ovirt-users] Autostart vm's at host boot on local storage

2015-01-04 Thread Sven Kieske
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 23.12.2014 13:51, Michael Pasternak wrote:
> Brent,
> You can achieve that using oVirt "High Availability" [1], 
This does not work for local storage.

See my rejected BZ Entry:

https://bugzilla.redhat.com/show_bug.cgi?id=1113165

I also have one open to allow for some kind
of autostart flag (as qemu/libvirt are capable of this):
https://bugzilla.redhat.com/show_bug.cgi?id=1166657

kind regards

Sven
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQGcBAEBAgAGBQJUqUS7AAoJEAq0kGAWDrqlq/8L/14HigJ56dpl8OUpdQSvQq5a
zkJbdX7tCmPedmcFmA7CwGqg2m2zWMVzb0KmAu9MuY+Xz6mluxW20iEVtP1yBmB+
dCRXcv9rzqDX4E88FL81q5ceqT6lpTDN7MK/Kz1IhK2mK20H0ibdXS9NB0WrKcqY
UI3tBQVn9gCH/4qyquWH7OXiOU8f5loJ7X9e/Akyp5F9wsqGdqmCClAuI/ArewhS
/VSMqHGaM43ZViz+1EqD8l05mbD7GLcnG5K3LnIpO5jaWx1aHSBHechlLhGMH+PM
Smj4bmc00W/DD9MAgNrgQg4jG/FZ58WNxw1BFtHJ3zn1EuvcW0t3pUQsF9dZH/wI
aMqZ5195ucdfll6zSG6R9cOGYjDlYUuXccn2tWvDWQhMDCUF0rYC0JSLeB+vRVKz
OeZ2esI4ofoF21vVb8L7jFoweJoBlB81US2UUQN3Vq93BugiLPPkyGUbsYkki6k1
xPU2lMEQ2IpMOiJ+Lu28BhhDL1P5HLbLl1KOS69dPA==
=FlbA
-END PGP SIGNATURE-
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Autostart vm's at host boot on local storage

2014-12-23 Thread Blaster
There was a discussion on this list a year or so ago about this.  I 
believe one of the developers responded that oVirt has no facility to 
start VMs on a boot, and explained why


I use the following 2 scripts to start VMs automatically when my AIO 
host reboots for whatever reason.  The Python script was grabbed from 
somewhere on the net, I don't remember where anymore.

I run the first script out of cron every 15 minutes.

#!/bin/bash

VMSTART="vm1 vm2 vm"

for vm in ${VMSTART}
do
echo "Do I need to start  ${vm}"
/root/bin/vm_up ${vm}
if [ $? -eq 1 ]; then
TEXT="VM ${vm} needed starting"
echo "${TEXT}"
echo "${TEXT}" | mailx -s "${TEXT}" r...@domain.com
fi
done

#!/usr/bin/python

import sys, string
from time import sleep

from ovirtsdk.api import API
from ovirtsdk.xml import params

VERSION = params.Version(major='3', minor='0')

URL =   'https://host.domain/api'
USERNAME =  'admin@internal'
PASSWORD =  'passwd'
CA_FILE = '/etc/pki/ovirt-engine/ca.pem'

VM_NAME = sys.argv[1]

api = API(url=URL, username=USERNAME, password=PASSWORD, ca_file=CA_FILE)


try:
 if api.vms.get(VM_NAME).status.state != 'up':
 print 'Starting VM'
 api.vms.get(VM_NAME).start()
 print 'Waiting for VM to reach UP status'
 while api.vms.get(VM_NAME).status.state != 'up':
 sleep(1)
 sys,exit(1)
 else:
 print 'VM already up'
 sys.exit(0)
except Exception as e:
 print 'Failed to Start VM:\n%s' % str(e)



On 12/22/2014 10:53 PM, Brent Hartzell wrote:
Can this be done? We hit a road block with gluster and will be using 
local storage while testing gluster. Only problem, if a host reboots, 
the vm's on that host do not. Is there a way to have ovirt/libvirt 
start all vm's residing on the local storage?



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Autostart vm's at host boot on local storage

2014-12-23 Thread Michael Pasternak
Brent,
You can achieve that using oVirt "High Availability" [1], 
Also see "WatchDog" [2] (if you want your guests to bemonitored on the OS level 
for responsiveness).

[1] http://www.ovirt.org/OVirt_3.0_Feature_Guide#High_availability[2] 
http://www.ovirt.org/Features/Watchdog_engine_support
 

 On Tuesday, December 23, 2014 6:54 AM, Brent Hartzell 
 wrote:
   

  Can this be done? We hit a road block with gluster and will be using local 
storage while testing gluster. Only problem, if a host reboots, the vm's on 
that host do not. Is there a way to have ovirt/libvirt start all vm's residing 
on the local storage?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


   ___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Autostart vm's at host boot on local storage

2014-12-23 Thread Yaniv Dary
I don't think there is a way to do this via GUI. 
You can create a script to do this in boot via ovirt-cli or API. 

Yaniv 

- Original Message -

> From: "Brent Hartzell" 
> To: users@ovirt.org
> Sent: Tuesday, December 23, 2014 6:53:48 AM
> Subject: [ovirt-users] Autostart vm's at host boot on local storage

> Can this be done? We hit a road block with gluster and will be using local
> storage while testing gluster. Only problem, if a host reboots, the vm's on
> that host do not. Is there a way to have ovirt/libvirt start all vm's
> residing on the local storage?

> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Autostart vm's at host boot on local storage

2014-12-22 Thread Brent Hartzell
Can this be done? We hit a road block with gluster and will be using local 
storage while testing gluster. Only problem, if a host reboots, the vm's on 
that host do not. Is there a way to have ovirt/libvirt start all vm's residing 
on the local storage?___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users