On 07/01/2013 06:08 PM, Michael Pasternak wrote:
On 07/01/2013 02:37 PM, Vladimir Vyazmin wrote:
> There is any a via pythonSDK to put the host in maintenance mode:
> hostObject = API.hosts.get(fakeHostNames)
> ##### Turbo Maintenance Host #####
> def turboMaintenanceHost(vmObject):
> """ maintenance Host"""
> if vmObject.status.state == 'up':
> LOGGER.info(TimestampScale() + "Object '%s' maintenance." %
> LOGGER.warning(TimestampScale() + "Failed maintenance '%s'
Object." % vmObject.name)
> return True
Thanks for this piece of code. Shall give it a try.
> ----- Original Message -----
>> From: "Deepthi Dharwar" <deepthi(a)linux.vnet.ibm.com>
>> To: users(a)ovirt.org, "Michael Pasternak" <mpastern(a)redhat.com>
>> Sent: Monday, July 1, 2013 2:13:09 PM
>> Subject: [Users] Putting the host in maintenance mode via python SDK
>> I am trying to switch off Hosts in DC which are idle.
>> I wanted to know as to why start/stop of hosts options are enabled in
>> Power Mgmt tab only when the host is in Maintenance mode and not otherwise.
cause you don't want to kill all vms running on this host when switching it off,
moving host to the maintenance mode will make them migrating to other host/s in
actually there are much more scenarios where you want to be sure that you can
safely switch off the host.
So as I understand, issuing a STOP just halts the host but not migrate
VMs . This needs to be done by putting the host in the maintenance mode
where all the VMs running are migrated. Host is disconnected from the
storage pool after which one can shut-down the system.
Maintenance is per-requisite mode where u explicitly tell the engine
to migrate the VMs and disconnect host from storage and not done as part
of integral shutdown process.
>> Also, is there any way via pythonSDK to put the host in maintenance mode ?
>> Users mailing list