Re: [ovirt-users] Can't Add Host To New Hosted Engine - "Server is already part of another cluster"

2018-03-22 Thread Adam Chesterton
Hi Sahina and Yedidyah,

Thanks for the information and offers of help. I am pleased to report that
I've resolved the issue I had, thanks to the prompting your requests gave
me, and everything is functional. I shall attempt to explain what happened
and how I fixed it.

When I looked at the Gluster peer status, the Host01 was rejected by Host02
and Host03 (I did check this back at the start, but didn't check it again
and things had changed). I followed the Gluster docs to fix the rejected
peer (
http://gluster-documentations.readthedocs.io/en/latest/Administrator%20Guide/Resolving%20Peer%20Rejected/
).

This then gave me a different error message when trying to add Host02 or
Host03, "no available server in the cluster to probe the new server", which
only further confirmed that it was a Gluster issue, as was suggested.

After some hair-pulling and wondering, I finally discovered that, in
Compute > Hosts > Host01 under the General tab, it was complaining that
Gluster was not active (even though it was running). I clicked the action
item link to resolve that, and oVirt appeared to start actually managing
the Gluster service. I could then add my other hosts, import the existing
storage domains, and everything appears good now.

Thanks again for the assistance and prompting me towards the right places
to help me resolve it.

Regards,
Adam


On Thu, 22 Mar 2018 at 20:48 Sahina Bose  wrote:

> On Wed, Mar 21, 2018 at 12:33 PM, Yedidyah Bar David 
> wrote:
>
>> On Wed, Mar 21, 2018 at 8:17 AM, Adam Chesterton
>>  wrote:
>> > Hi Everyone,
>> >
>> > I'm running a 3-host hyperconverged Gluster setup for testing (on some
>> old
>> > desktops), and recently the hosted engine died on me, so I have
>> attempted to
>> > just clean up my existing hosts, leaving Gluster configured, and
>> re-deploy a
>> > fresh hosted engine setup on them.
>> >
>> > I have successfully got the first host setup and the hosted engine is
>> > running on that host. However, when I try to add the other two hosts
>> via the
>> > web GUI (as I can no longer add them via CLI) I get this error: "Error
>> while
>> > executing action: Server X is already part of another cluster."
>>
>> This message might be a result of the host's participation in a gluster
>> cluster,
>> not hosted-engine cluster. Please share engine.log from the engine.
>>
>> Adding Sahina.
>>
>
> Yes, it does look like that.
>
> Can you share details of
> # gluster peer status
> from your 3 nodes
>
> And also the address of the first host in the oVirt engine and below from
> the HE engine:
>
> # su - postgres -c "psql -d engine -c \"select * from gluster_server; \""
>
>
>> >
>> > I've tried to find where this would still be configured on the two other
>> > hosts, but I cannot find anywhere.
>>
>> If it's only about hosted-engine, you can check /etc/ovirt-hosted-engine .
>>
>> You might try using ovirt-hosted-engine-cleanup, although it was not
>> designed
>> for such cases.
>>
>> >
>> > Does anyone know how I can stop these two hosts from thinking they are
>> still
>> > in a cluster? Or, does anyone have some information that might help, or
>> am I
>> > going to just have to start a fresh CentOS install?
>>
>> If you do not need the data, a reinstall might be simplest.
>> If you do, not sure what's your exact plan.
>> You intend to rely on the replication? So that you reinstall one host,
>> add it,
>> wait until syncing finished, then reinstall the other? Might work, no
>> idea.
>>
>> Best regards,
>> --
>> Didi
>>
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Query for moving Ovirt Engine...

2018-03-22 Thread Nasrum Minallah Manzoor
Thank you Yedidyah,

Let me clearify it more that i have 2 ovirt nodes in a cluster. Ovirt engine is 
on seperate machine on vmware workstation. Now i want to move this ovirt engine 
to one of my nodes (which are in a cluster). I need help with the above so that 
i could complete my task.

Thanks in advance!

Regards,




From: Yedidyah Bar David 
Sent: Thursday, March 22, 2018 7:40:27 PM
To: Nasrum Minallah Manzoor
Cc: users@ovirt.org
Subject: Re: [ovirt-users] Query for moving Ovirt Engine...

On Thu, Mar 22, 2018 at 8:54 AM, Nasrum Minallah Manzoor
 wrote:
> Hello Every one,
>
>
>
> I want to move ovirt engine from one of my machine to node installed on
> another machine! What steps I should take to accomplish the query!
>
>
>
> Help would be appreciated!

Not sure what exactly you mean:

1. You want to copy the engine to another machine and remove from the first?

Use engine-backup

2. It's a hosted-engine and you want to migrate the engine vm to another host?

You can use the gui and migrate it like any other vm

3. Something else?

Best regards,
--
Didi
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Authentication

2018-03-22 Thread Bryan Sockel
Hey Guys, 
 
Was working on switching my authentication over to TLS, and during the process 
I have lost the Internal Authentication option on my drop down list.  Need to 
Know how to add it back it back to the list of drop down items.
 
Thanks
 ___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] FCP storage domain wiped, recovery process

2018-03-22 Thread aduckers
I have not tried to destroy it yet - I didn’t want to try that without 
understanding how that would affect all the other objects that are related 
(vms, templates, etc..).
If destroying it will also clean those up, or allow me to delete them, then 
that sounds like it might be the way to go.


> On Mar 22, 2018, at 2:00 PM, Alex K  wrote:
> 
> Hi,
> 
> Did you try to put it into maintenance then destroy it? 
> 
> On Mar 22, 2018 19:18, "aduckers"  > wrote:
> I’ve got an environment with:
> 13 servers in the oVirt default cluster
> Hosted Engine 4.1.3.5-1.el7.centos
> Storage provided by FC san
> 
> One of the FC LUNs, being used as a Data Domain, was wiped/reformatted 
> through a confluence of events.
> 
> How can I clean this up and re-add this LUN back?  I can’t Detach it, as 
> there are VMs/Templates attached to it.  When I try to remove the Templates, 
> it tells me it can’t since the storage domain is inactive.
> 
> What’s the best way to clean up from this?
> 
> Thanks
> 
> 
> ___
> 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] FCP storage domain wiped, recovery process

2018-03-22 Thread Alex K
Hi,

Did you try to put it into maintenance then destroy it?

On Mar 22, 2018 19:18, "aduckers"  wrote:

> I’ve got an environment with:
> 13 servers in the oVirt default cluster
> Hosted Engine 4.1.3.5-1.el7.centos
> Storage provided by FC san
>
> One of the FC LUNs, being used as a Data Domain, was wiped/reformatted
> through a confluence of events.
>
> How can I clean this up and re-add this LUN back?  I can’t Detach it, as
> there are VMs/Templates attached to it.  When I try to remove the
> Templates, it tells me it can’t since the storage domain is inactive.
>
> What’s the best way to clean up from this?
>
> Thanks
>
>
> ___
> 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] create a cloned virtual machine based on a template with SDK API python

2018-03-22 Thread Nicolas Vaye
ok, got it !
just add clone parameter for add function.


vm = vms_service.add(
types.Vm(
name=vm_name,
cluster=types.Cluster(
name=vm_cluster_name
),
stateless=False,
type=types.VmType('server'),
comment='cloned from template '+template_name+' version 
'+str(template_version),
template=types.Template(
id=template_id
),
disk_attachments=template_disk_attachments,
),
clone=True,
)

 Message initial 

Date: Thu, 22 Mar 2018 07:09:33 +
Objet: [ovirt-users] create a cloned virtual machine based on a template with 
SDK API python
À: users@ovirt.org 
>
Reply-to: Nicolas Vaye 
De: Nicolas Vaye 
>

Hi,

I want to create a cloned virtual machine based on a template with SDK API 
python and i don't find the parameter to indicate the clone action for the disk

here is my code :

#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# Copyright (c) 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from pprint import pprint
import logging
import time

import ovirtsdk4 as sdk
import ovirtsdk4.types as types



template_name='test_debian_9.4'
template_version=1
cluster_name='nico-cluster'
data_domain_name='OVIRT-TEST2'



logging.basicConfig(level=logging.DEBUG, filename='example.log')

# This example will connect to the server and start a virtual machine
# with cloud-init, in order to automatically configure the network and
# the password of the `root` user.

# Create the connection to the server:
connection = sdk.Connection(
url='https://ocenter.province-sud.prod/ovirt-engine/api',
username='admin@internal',
password='admin',
ca_file='CA_ocenter.pem',
debug=True,
log=logging.getLogger(),
)



##
 TEMPLATE 
##

# Get the reference to the root of the tree of services:
system_service = connection.system_service()

# Get the reference to the service that manages the storage domains:
storage_domains_service = system_service.storage_domains_service()

# Find the storage domain we want to be used for virtual machine disks:
storage_domain = 
storage_domains_service.list(search='name='+data_domain_name)[0]


# Get the reference to the service that manages the templates:
templates_service = system_service.templates_service()

# When a template has multiple versions they all have the same name, so
# we need to explicitly find the one that has the version name or
# version number that we want to use. In this case we want to use
# version 1 of the template.
templates = templates_service.list(search='name='+template_name)
template_id = None
for template in templates:
if template.version.version_number == template_version:
template_id = template.id
break

if template_id == None:
print "ERREUR le template "+template_name+"en version 
"+str(template_version)+" n'a pas été trouvé!!"

# Find the template disk we want be created on specific storage domain
# for our virtual machine:
template_service = templates_service.template_service(template_id)
disk_attachments = 
connection.follow_link(template_service.get().disk_attachments)

print "disk_attachments=" + str(len(disk_attachments))

template_disk_attachments = []
for disk in disk_attachments:
template_disk_attachments.append(types.DiskAttachment(
disk=types.Disk(
id=disk.id,
format=types.DiskFormat.COW,
storage_domains=[
types.StorageDomain(
id=storage_domain.id,
),
],
),
)
)



# Get the reference to the service that manages the virtual machines:
vms_service = system_service.vms_service()

# Add a new virtual machine explicitly indicating the identifier of the
# template version that we want to use and indicating that template disk
# should be created on specific storage domain for the virtual machine:
vm = vms_service.add(
types.Vm(
name='myvm',
cluster=types.Cluster(
name=cluster_name
),
stateless=False,
type=types.VmType('server'),

Re: [ovirt-users] Any monitoring tool provided?

2018-03-22 Thread Christopher Cox

On 03/21/2018 10:41 PM, Terry hey wrote:

Dear all,

Now, we can just read how many storage used, cpu usage on ovirt dashboard.
But is there any monitoring tool for monitoring virtual machine time to 
time?

If yes, could you guys give me the procedure?


A possible option, for a full OS with network connectivity, is to 
monitor the VM like you would any other host.


We use omd/check_mk.

Right now there isn't an oVirt specific monitor plugin for check_mk.

I know what I said is probably pretty obvious, but just in case.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Ovirt vm's paused due to storage error

2018-03-22 Thread Darrell Budic
I’ve also encounter something similar on my setup, ovirt 3.1.9 with a gluster 
3.12.3 storage cluster. All the storage domains in question are setup as 
gluster volumes & sharded, and I’ve enabled libgfapi support in the engine. 
It’s happened primarily to VMs that haven’t been restarted to switch to gfapi 
yet (still have fuse mounts for these), but one or two VMs that have been 
switched to gfapi mounts as well.

I started updating the storage cluster to gluster 3.12.6 yesterday and got more 
annoying/bad behavior as well. Many VMs that were “high disk use” VMs 
experienced hangs, but not as storage related pauses. Instead, they hang and 
their watchdogs eventually reported CPU hangs. All did eventually resume normal 
operation, but it was annoying, to be sure. The Ovirt Engine also lost contact 
with all of my VMs (unknown status, ? in GUI), even though it still had contact 
with the hosts. My gluster cluster reported no errors, volume status was 
normal, and all peers and bricks were connected. Didn’t see anything in the 
gluster logs that indicated problems, but there were reports of failed heals 
that eventually went away. 

Seems like something in vdsm and/or libgfapi isn’t handling the gfapi mounts 
well during healing and the related locks, but I can’t tell what it is. I’ve 
got two more servers in the cluster to upgrade to 3.12.6 yet, and I’ll keep an 
eye on more logs while I’m doing it, will report on it after I get more info.

  -Darrell
> From: Sahina Bose 
> Subject: Re: [ovirt-users] Ovirt vm's paused due to storage error
> Date: March 22, 2018 at 4:56:13 AM CDT
> To: Endre Karlson
> Cc: users
> 
> Can you provide "gluster volume info" and  the mount logs of the data volume 
> (I assume that this hosts the vdisks for the VM's with storage error).
> 
> Also vdsm.log at the corresponding time.
> 
> On Fri, Mar 16, 2018 at 3:45 AM, Endre Karlson  > wrote:
> Hi, this is is here again and we are getting several vm's going into storage 
> error in our 4 node cluster running on centos 7.4 with gluster and ovirt 
> 4.2.1.
> 
> Gluster version: 3.12.6
> 
> volume status
> [root@ovirt3 ~]# gluster volume status
> Status of volume: data
> Gluster process TCP Port  RDMA Port  Online  Pid
> --
> Brick ovirt0:/gluster/brick3/data   49152 0  Y   9102 
> Brick ovirt2:/gluster/brick3/data   49152 0  Y   28063
> Brick ovirt3:/gluster/brick3/data   49152 0  Y   28379
> Brick ovirt0:/gluster/brick4/data   49153 0  Y   9111 
> Brick ovirt2:/gluster/brick4/data   49153 0  Y   28069
> Brick ovirt3:/gluster/brick4/data   49153 0  Y   28388
> Brick ovirt0:/gluster/brick5/data   49154 0  Y   9120 
> Brick ovirt2:/gluster/brick5/data   49154 0  Y   28075
> Brick ovirt3:/gluster/brick5/data   49154 0  Y   28397
> Brick ovirt0:/gluster/brick6/data   49155 0  Y   9129 
> Brick ovirt2:/gluster/brick6_1/data 49155 0  Y   28081
> Brick ovirt3:/gluster/brick6/data   49155 0  Y   28404
> Brick ovirt0:/gluster/brick7/data   49156 0  Y   9138 
> Brick ovirt2:/gluster/brick7/data   49156 0  Y   28089
> Brick ovirt3:/gluster/brick7/data   49156 0  Y   28411
> Brick ovirt0:/gluster/brick8/data   49157 0  Y   9145 
> Brick ovirt2:/gluster/brick8/data   49157 0  Y   28095
> Brick ovirt3:/gluster/brick8/data   49157 0  Y   28418
> Brick ovirt1:/gluster/brick3/data   49152 0  Y   23139
> Brick ovirt1:/gluster/brick4/data   49153 0  Y   23145
> Brick ovirt1:/gluster/brick5/data   49154 0  Y   23152
> Brick ovirt1:/gluster/brick6/data   49155 0  Y   23159
> Brick ovirt1:/gluster/brick7/data   49156 0  Y   23166
> Brick ovirt1:/gluster/brick8/data   49157 0  Y   23173
> Self-heal Daemon on localhost   N/A   N/AY   7757 
> Bitrot Daemon on localhost  N/A   N/AY   7766 
> Scrubber Daemon on localhostN/A   N/AY   7785 
> Self-heal Daemon on ovirt2  N/A   N/AY   8205 
> Bitrot Daemon on ovirt2 N/A   N/AY   8216 
> Scrubber Daemon on ovirt2   N/A   N/AY   8227 
> Self-heal Daemon on ovirt0  N/A   N/AY   32665
> Bitrot Daemon on ovirt0 N/A   N/AY  

[ovirt-users] FCP storage domain wiped, recovery process

2018-03-22 Thread aduckers
I’ve got an environment with:
13 servers in the oVirt default cluster
Hosted Engine 4.1.3.5-1.el7.centos
Storage provided by FC san

One of the FC LUNs, being used as a Data Domain, was wiped/reformatted through 
a confluence of events.

How can I clean this up and re-add this LUN back?  I can’t Detach it, as there 
are VMs/Templates attached to it.  When I try to remove the Templates, it tells 
me it can’t since the storage domain is inactive.

What’s the best way to clean up from this?

Thanks


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


[ovirt-users] can't select network in network section of initial run

2018-03-22 Thread Nathanaël Blanchet

Hi all,

In ovirt 4.1.9, the "select network above" is blank when I want to add a 
network with cloud-init.


Is it a known bug corrected in the 4.2.x branch?

--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr

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


Re: [ovirt-users] virtual machine actual size is not right

2018-03-22 Thread Terry hey
Hello~
i type this command on the running vm, not the hypervisor ( ovirt node).
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Disk upload cancel/remove

2018-03-22 Thread Alex K
After 48 hours it seems the issue has been resolved.
No disks are shown with status "Transferring via API"

Alex

On Wed, Mar 21, 2018 at 9:33 AM, Alex K  wrote:

> Even after rebooting the engine the disks are still there with same status
> "Transferring via API"
>
> Alex
>
> On Tue, Mar 20, 2018 at 11:49 AM, Eyal Shenitzky 
> wrote:
>
>> Idan/Daniel,
>>
>> Can you please take a look?
>>
>> Thanks,
>>
>> On Tue, Mar 20, 2018 at 11:44 AM, Alex K  wrote:
>>
>>> Hi All,
>>>
>>> I was trying to upload a VM disk at data storage domain using a python
>>> script.
>>> I did cancel the upload twice and at the third time the upload was
>>> successful, but I see two disks from the previous attempts with status
>>> "transferring via API" (see attached). This status of for more then 8 hours
>>> and I cannot remove them.
>>>
>>> Is there any way to clean them from the disks inventory?
>>>
>>>
>>>
>>> I am using ovirt 4.1.9.1-1.el7.centos with self hosted engine on 3
>>> nodes.
>>>
>>> Thanx,
>>> Alex
>>>
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>>
>>>
>>
>>
>> --
>> Regards,
>> Eyal Shenitzky
>>
>
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Ovirt nodes NFS connection

2018-03-22 Thread FERNANDO FREDIANI
Hello Tal

It seems you have a very big overkill on your environment. I would say that
normally 2 x 10Gb interfaces can do A LOT for nodes with proper redundancy.
Just creating Vlans you can separate traffic and apply, if necessary, QoS
per Vlan to guarantee which one is more priority.

If you have 2 x 10Gb in a LACP 802.3ad Aggregation in theory you can do
20Gbps of aggregated traffic. If you have 10Gb of constant storage traffic
it is already huge, so I normally consider that Storage will not go over a
few Gbps and VMs another few Gb which fit perfectly within even 10Gb

The only exception I would make is if you have a very intensive (and I am
not talking about IOPS, but throughput) from your storage then may be worth
to have 2 x 10Gb for Storage and 2 x 10Gb for all other networks
(Managment, VMs Traffic, Migration(with cap on traffic), etc).

Regards
Fernando

2018-03-21 16:41 GMT-03:00 Yaniv Kaul :

>
>
> On Wed, Mar 21, 2018 at 12:41 PM, Tal Bar-Or  wrote:
>
>> Hello All,
>>
>> I am about to deploy a new Ovirt platform, the platform  will consist 4
>> Ovirt nodes including management, all servers nodes and storage will have
>> the following config:
>>
>> *nodes server*
>> 4x10G ports network cards
>> 2x10G will be used for VM network.
>> 2x10G will be used for storage connection
>> 2x1Ge 1xGe for nodes management
>>
>>
>> *Storage *4x10G ports network cards
>> 3 x10G for NFS storage mount Ovirt nodes
>>
>> Now given above network configuration layout, what is best practices in
>> terms of nodes for storage NFS connection, throughput and path resilience
>> suggested to use
>> First option each node 2x 10G lacp and on storage side 3x10G lacp?
>>
>
> I'm not sure how you'd get more throughout than you can get in a single
> physical link. You will get redundancy.
>
> Of course, on the storage side you might benefit from multiple bonded
> interfaces.
>
>
>> The second option creates 3 VLAN's assign each node on that 3 VLAN's
>> across 2 nic, and on storage, side assigns 3 nice across 3 VLANs?
>>
>
> Interesting - but I assume it'll still stick to a single physical link.
> Y.
>
> Thanks
>>
>>
>>
>>
>>
>> --
>> Tal Bar-or
>>
>> ___
>> 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
>
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Query for moving Ovirt Engine...

2018-03-22 Thread Yedidyah Bar David
On Thu, Mar 22, 2018 at 5:07 PM, Nasrum Minallah Manzoor
 wrote:
> Thank you Yedidyah,
>
> Let me clearify it more that i have 2 ovirt nodes in a cluster. Ovirt engine 
> is on seperate machine on vmware workstation. Now i want to move this ovirt 
> engine to one of my nodes (which are in a cluster). I need help with the 
> above so that i could complete my task.
>
> Thanks in advance!

Please see the link I sent before for migrating to hosted-engine.

Another option is to simply install the engine on one of the machines.

I didn't try this myself, but people reported that it works.

This will be simpler than hosted-engine, but will not provide the HA
that hosted-engine does.
If you want to do this, you should do something like:

on the existing engine machine:
1. engine-backup --mode=backup --file=b1 --log=l1
2. Stop and disable the engine and dwh on this machine
3. Copy b1 to the host you want to install it on

On the host you want the engine on:
4. Install ovirt-release package (same as you installed on the engine machine)
5. Install the package ovirt-engine
6. engine-backup --mode=restore --file=f1 --log=r1 --provision-db
--provision-dwh-db
7. engine-setup
8. Make sure the name of the old engine now resolves to the IP address
of the new host,
by updating your DNS (e.g. add a CNAME record) or /etc/hosts

For more details check engine backup/restore documentation.

Best regards,

>
> Regards,
>
>
>
> 
> From: Yedidyah Bar David 
> Sent: Thursday, March 22, 2018 7:40:27 PM
> To: Nasrum Minallah Manzoor
> Cc: users@ovirt.org
> Subject: Re: [ovirt-users] Query for moving Ovirt Engine...
>
> On Thu, Mar 22, 2018 at 8:54 AM, Nasrum Minallah Manzoor
>  wrote:
>> Hello Every one,
>>
>>
>>
>> I want to move ovirt engine from one of my machine to node installed on
>> another machine! What steps I should take to accomplish the query!
>>
>>
>>
>> Help would be appreciated!
>
> Not sure what exactly you mean:
>
> 1. You want to copy the engine to another machine and remove from the first?
>
> Use engine-backup
>
> 2. It's a hosted-engine and you want to migrate the engine vm to another host?
>
> You can use the gui and migrate it like any other vm
>
> 3. Something else?
>
> Best regards,
> --
> Didi



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


Re: [ovirt-users] Query for moving Ovirt Engine...

2018-03-22 Thread Yedidyah Bar David
On Thu, Mar 22, 2018 at 4:45 PM, Junaid Jadoon  wrote:
> Hi yedidyah,
> below is our main objective
>
>
>
> To make it more clear I am revising my query!
>
>
>
> We have installed 2 nodes  in a cluster and ovirt engine is installed on
> separate machine on Vmware workstation. Now I want to move ovirt engine to
> one of my any nodes. What process  should I go through. Need solution from
> experts!

Thanks for the clarification. I suggest to start with:

https://www.ovirt.org/documentation/self-hosted/chap-Migrating_from_Bare_Metal_to_an_EL-Based_Self-Hosted_Environment/

Best regards,

>
>
>
> On Thu 22 Mar 2018 7:40 pm Yedidyah Bar David,  wrote:
>>
>> On Thu, Mar 22, 2018 at 8:54 AM, Nasrum Minallah Manzoor
>>  wrote:
>> > Hello Every one,
>> >
>> >
>> >
>> > I want to move ovirt engine from one of my machine to node installed on
>> > another machine! What steps I should take to accomplish the query!
>> >
>> >
>> >
>> > Help would be appreciated!
>>
>> Not sure what exactly you mean:
>>
>> 1. You want to copy the engine to another machine and remove from the
>> first?
>>
>> Use engine-backup
>>
>> 2. It's a hosted-engine and you want to migrate the engine vm to another
>> host?
>>
>> You can use the gui and migrate it like any other vm
>>
>> 3. Something else?
>>
>> Best regards,
>> --
>> Didi
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users



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


Re: [ovirt-users] Query for moving Ovirt Engine...

2018-03-22 Thread Yedidyah Bar David
On Thu, Mar 22, 2018 at 8:54 AM, Nasrum Minallah Manzoor
 wrote:
> Hello Every one,
>
>
>
> I want to move ovirt engine from one of my machine to node installed on
> another machine! What steps I should take to accomplish the query!
>
>
>
> Help would be appreciated!

Not sure what exactly you mean:

1. You want to copy the engine to another machine and remove from the first?

Use engine-backup

2. It's a hosted-engine and you want to migrate the engine vm to another host?

You can use the gui and migrate it like any other vm

3. Something else?

Best regards,
-- 
Didi
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] [ANN] oVirt 4.2.2 FifthRelease Candidate is now available

2018-03-22 Thread Lev Veyde
The oVirt Project is pleased to announce the availability of the oVirt
4.2.2 Fifth
Release Candidate, as of March 22nd, 2018

This update is a release candidate of the second in a series of
stabilization updates to the 4.2
series.
This is pre-release software. This pre-release should not to be used in
production.

This release is available now for:
* Red Hat Enterprise Linux 7.4 or later
* CentOS Linux (or similar) 7.4 or later

This release supports Hypervisor Hosts running:
* Red Hat Enterprise Linux 7.4 or later
* CentOS Linux (or similar) 7.4 or later
* oVirt Node 4.2

See the release notes [1] for installation / upgrade instructions and
a list of new features and bugs fixed.

Notes:
- oVirt Appliance is available
- oVirt Node will be available soon [2]

Additional Resources:
* Read more about the oVirt 4.2.2 release highlights:
http://www.ovirt.org/release/4. 2
. 
2 /

* Get more oVirt Project updates on Twitter: https://twitter.com/ovirt
* Check out the latest project news on the oVirt blog:
http://www.ovirt.org/blog/

[1] http://www.ovirt.org/release/4. 2
. 
2 /

[2] http://resources.ovirt.org/pub/ovirt-4.
2-pre
/iso/


-- 

Lev Veyde

Software Engineer, RHCE | RHCVA | MCITP

Red Hat Israel



l...@redhat.com | lve...@redhat.com

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


[ovirt-users] Query for moving Ovirt Engine...

2018-03-22 Thread Nasrum Minallah Manzoor
Hello Every one,

I want to move ovirt engine from one of my machine to node installed on another 
machine! What steps I should take to accomplish the query!

Help would be appreciated!



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


Re: [ovirt-users] HostedEngine with HA

2018-03-22 Thread Hanson Turner

Hi Carlos,

If you're using shared storage across the nodes/hypervisors, the 
HostedEngine VM should already be HA.


Sometimes this allows the engine to drop while restarting it on another 
node. Usually when this happens the rest of the nodes running VMs stay 
up, and things resync when the downed node comes back.


IE the only one to lose pings is the Hosted-Engine. Unless ofcourse 
there were VM's on the same node, in which case, if they were HA VMs 
they will be restarted/resumed depending on your settings.



Thanks,

Hanson


On 08/17/2016 05:06 AM, Carlos Rodrigues wrote:

Anyone can help me to build HA on HostedEngine VM?

How can i guarantee that if host with HostedEngine VM goes down, the
HostedEngine VM moves to another host?

Regards,
Carlos Rodrigues

On Tue, 2016-08-16 at 11:53 +0100, Carlos Rodrigues wrote:

On Sun, 2016-08-14 at 14:22 +0300, Roy Golan wrote:



On 12 August 2016 at 20:23, Carlos Rodrigues 
wrote:

Hello,

I have one cluster with two hosts with power management correctly
configured and one virtual machine with HostedEngine over shared
storage with FiberChannel.

When i shutdown the network of host with HostedEngine VM,  it
should be
possible the HostedEngine VM migrate automatically to another
host?


migrate on which network?
  

What is the expected behaviour on this HA scenario?

After a few minutes your vm will be shutdown by the High
Availability
agent, as it can't see network, and started on another host.


I'm testing this scenario and after shutdown network, it should be
expected that agent shutdown ha and started on another host, but
after
couple minutes nothing happens and on host with network we getting
the
following messages:

Aug 16 11:44:08 ied-blade11.install.eurotux.local ovirt-ha-
agent[2779]:
ovirt-ha-agent
ovirt_hosted_engine_ha.agent.hosted_engine.HostedEngine.config ERROR
Unable to get vm.conf from OVF_STORE, falling back to initial vm.conf

I think the HA agent its trying to get vm configuration but some how
it
can't get vm.conf to start VM.

Regards,
Carlos Rodrigues




Regards,

--
Carlos Rodrigues

Engenheiro de Software Sénior

Eurotux Informática, S.A. | www.eurotux.com
(t) +351 253 680 300 (m) +351 911 926 110

___
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] VDSM SSL validity

2018-03-22 Thread Yedidyah Bar David
On Thu, Mar 22, 2018 at 11:58 AM, Sahina Bose  wrote:
> Didi, Sandro - Do you know if this option VdsCertificateValidityInYears is
> present in 4.2?

I do not think it ever was exposed to engine-config - I think it's a
bug in that page.

You should be able to update it with psql, if needed - something like this:

select fn_db_update_config_value('VdsCertificateValidityInYears','2','general');

I didn't try this myself.

To get an sql prompt, you can use engine-psql, which should be
available in 4.2.2,
or simply copy the script from the patch page:

https://gerrit.ovirt.org/#/q/I4d9737ea72df0d7e654776a1085901284a523b7f

Also, some people claim that the use of certificates for communication between
the engine and the hosts is an internal implementation detail, which should not
be relevant to PCI DSS requirements. See e.g.:

https://ovirt.org/develop/release-management/features/infra/pkireduce/

>
> On Mon, Mar 19, 2018 at 4:43 AM, Punaatua PAINT-KOUI 
> wrote:
>>
>> Up
>>
>> 2018-02-17 2:57 GMT-10:00 Punaatua PAINT-KOUI :
>>>
>>> Any idea someone ?
>>>
>>> Le 14 févr. 2018 23:19, "Punaatua PAINT-KOUI"  a
>>> écrit :

 Hi,

 I setup an hyperconverged solution with 3 nodes, hosted engine on
 glusterfs.
 We run this setup in a PCI-DSS environment. According to PCI-DSS
 requirements, we are required to reduce the validity of any certificate
 under 39 months.

 I saw in this link
 https://www.ovirt.org/develop/release-management/features/infra/pki/ that i
 can use the option VdsCertificateValidityInYears at engine-config.

 I'm running ovirt engine 4.2.1 and i checked when i was on 4.2 how to
 edit the option with engine-config --all and engine-config --list but the
 option is not listed

 Am i missing something ?

 I thing i can regenerate a VDSM certificate with openssl and the CA conf
 in /etc/pki/ovirt-engine on the hosted-engine but i would rather modifiy 
 the
 option for future host that I will add.

 --
 -
 PAINT-KOUI Punaatua
>>
>>
>>
>>
>> --
>> -
>> PAINT-KOUI Punaatua
>> Licence Pro Réseaux et Télecom IAR
>> Université du Sud Toulon Var
>> La Garde France
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
>



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


Re: [ovirt-users] GlusterFS performance with only one drive per host?

2018-03-22 Thread Sahina Bose
On Mon, Mar 19, 2018 at 5:57 PM, Jayme  wrote:

> I'm spec'ing a new oVirt build using three Dell R720's w/ 256GB.  I'm
> considering storage options.  I don't have a requirement for high amounts
> of storage, I have a little over 1TB to store but want some overhead so I'm
> thinking 2TB of usable space would be sufficient.
>
> I've been doing some research on Micron 1100 2TB ssd's and they seem to
> offer a lot of value for the money.  I'm considering using smaller cheaper
> SSDs for boot drives and using one 2TB micron SSD in each host for a
> glusterFS replica 3 setup (on the fence about using an arbiter, I like the
> extra redundancy replicate 3 will give me).
>
> My question is, would I see a performance hit using only one drive in each
> host with glusterFS or should I try to add more physical disks.  Such as 6
> 1TB drives instead of 3 2TB drives?
>

[Adding gluster-users for inputs here]


> Also one other question.  I've read that gluster can only be done in
> groups of three.  Meaning you need 3, 6, or 9 hosts.  Is this true?  If I
> had an operational replicate 3 glusterFS setup and wanted to add more
> capacity I would have to add 3 more hosts, or is it possible for me to add
> a 4th host in to the mix for extra processing power down the road?
>

In oVirt, we support replica 3 or replica 3 with arbiter (where one of the
3 bricks is a low storage arbiter brick). To expand storage, you would need
to add in multiples of 3 bricks. However if you only want to expand compute
capacity in your HC environment, you can add a 4th node.


> Thanks!
>
>
> ___
> 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] How to generate Swagger specification of the oVirt API?

2018-03-22 Thread Shao-Da Huang
Got it, thank you for your information!

2018-03-22 17:33 GMT+08:00 Juan Hernández :

> On 03/22/2018 04:40 AM, Shao-Da Huang wrote:
>
>> Hi Juan,
>>
>> I saw the discussion in users-list:
>> http://lists.ovirt.org/pipermail/users/2017-April/081618.html
>> and I'm curious about how to generate the Swagger specfication of existing
>> oVirt API (or maybe can generate by ovirt-engine-api-model?).
>> Could you give me some advices on the generating tools or maybe some
>> points
>> to change during the procedure of building ovirt-engine?
>>
>> Michael
>>
>>
> The JSON file that I mentioned in that mail was generated using I tool
> that I started to write, but that I never finished. I just have uploaded
> the patch that adds it to the ovirt-engine-api-metamodel project:
>
>   [WIP] Generate Swagger specification
>   https://gerrit.ovirt.org/89337
>
> Note that it is by no means complete, it is just an experiment. Take a
> look if you are curious.
>
> Truth is that I don't plan to work on that. Would be nice if you can take
> it and complete it. If you complete it, then it could be integrated in the
> build process of the ovirt-engine-api-model project, so that it is
> generated automatically.
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] VDSM SSL validity

2018-03-22 Thread Sahina Bose
Didi, Sandro - Do you know if this option VdsCertificateValidityInYears is
present in 4.2?

On Mon, Mar 19, 2018 at 4:43 AM, Punaatua PAINT-KOUI 
wrote:

> Up
>
> 2018-02-17 2:57 GMT-10:00 Punaatua PAINT-KOUI :
>
>> Any idea someone ?
>>
>> Le 14 févr. 2018 23:19, "Punaatua PAINT-KOUI"  a
>> écrit :
>>
>>> Hi,
>>>
>>> I setup an hyperconverged solution with 3 nodes, hosted engine on
>>> glusterfs.
>>> We run this setup in a PCI-DSS environment. According to PCI-DSS
>>> requirements, we are required to reduce the validity of any certificate
>>> under 39 months.
>>>
>>> I saw in this link https://www.ovirt.org/dev
>>> elop/release-management/features/infra/pki/ that i can use the option
>>> VdsCertificateValidityInYears at engine-config.
>>>
>>> I'm running ovirt engine 4.2.1 and i checked when i was on 4.2 how to
>>> edit the option with engine-config --all and engine-config --list but the
>>> option is not listed
>>>
>>> Am i missing something ?
>>>
>>> I thing i can regenerate a VDSM certificate with openssl and the CA conf
>>> in /etc/pki/ovirt-engine on the hosted-engine but i would rather modifiy
>>> the option for future host that I will add.
>>>
>>> --
>>> -
>>> PAINT-KOUI Punaatua
>>>
>>
>
>
> --
> -
> PAINT-KOUI Punaatua
> Licence Pro Réseaux et Télecom IAR
> Université du Sud Toulon Var
> La Garde France
>
> ___
> 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] Can't Add Host To New Hosted Engine - "Server is already part of another cluster"

2018-03-22 Thread Sahina Bose
On Wed, Mar 21, 2018 at 12:33 PM, Yedidyah Bar David 
wrote:

> On Wed, Mar 21, 2018 at 8:17 AM, Adam Chesterton
>  wrote:
> > Hi Everyone,
> >
> > I'm running a 3-host hyperconverged Gluster setup for testing (on some
> old
> > desktops), and recently the hosted engine died on me, so I have
> attempted to
> > just clean up my existing hosts, leaving Gluster configured, and
> re-deploy a
> > fresh hosted engine setup on them.
> >
> > I have successfully got the first host setup and the hosted engine is
> > running on that host. However, when I try to add the other two hosts via
> the
> > web GUI (as I can no longer add them via CLI) I get this error: "Error
> while
> > executing action: Server X is already part of another cluster."
>
> This message might be a result of the host's participation in a gluster
> cluster,
> not hosted-engine cluster. Please share engine.log from the engine.
>
> Adding Sahina.
>

Yes, it does look like that.

Can you share details of
# gluster peer status
from your 3 nodes

And also the address of the first host in the oVirt engine and below from
the HE engine:

# su - postgres -c "psql -d engine -c \"select * from gluster_server; \""


> >
> > I've tried to find where this would still be configured on the two other
> > hosts, but I cannot find anywhere.
>
> If it's only about hosted-engine, you can check /etc/ovirt-hosted-engine .
>
> You might try using ovirt-hosted-engine-cleanup, although it was not
> designed
> for such cases.
>
> >
> > Does anyone know how I can stop these two hosts from thinking they are
> still
> > in a cluster? Or, does anyone have some information that might help, or
> am I
> > going to just have to start a fresh CentOS install?
>
> If you do not need the data, a reinstall might be simplest.
> If you do, not sure what's your exact plan.
> You intend to rely on the replication? So that you reinstall one host, add
> it,
> wait until syncing finished, then reinstall the other? Might work, no idea.
>
> Best regards,
> --
> Didi
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Engine and nodes ssh setup

2018-03-22 Thread spfma . tech
Hi,
   I am still trying to make my restored hosted engine communicate with the 
nodes without success.   There is a step I am not sure : is root user on the 
engine supposed to be able to log into nodes without password or not ? In my 
case it doesn't   By the way, where are located the certificates actually used 
for these communications ?   Regards 

-
FreeMail powered by mail.fr
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] How to generate Swagger specification of the oVirt API?

2018-03-22 Thread Juan Hernández

On 03/22/2018 04:40 AM, Shao-Da Huang wrote:

Hi Juan,

I saw the discussion in users-list:
http://lists.ovirt.org/pipermail/users/2017-April/081618.html
and I'm curious about how to generate the Swagger specfication of existing
oVirt API (or maybe can generate by ovirt-engine-api-model?).
Could you give me some advices on the generating tools or maybe some points
to change during the procedure of building ovirt-engine?

Michael



The JSON file that I mentioned in that mail was generated using I tool 
that I started to write, but that I never finished. I just have uploaded 
the patch that adds it to the ovirt-engine-api-metamodel project:


  [WIP] Generate Swagger specification
  https://gerrit.ovirt.org/89337

Note that it is by no means complete, it is just an experiment. Take a 
look if you are curious.


Truth is that I don't plan to work on that. Would be nice if you can 
take it and complete it. If you complete it, then it could be integrated 
in the build process of the ovirt-engine-api-model project, so that it 
is generated automatically.

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


[ovirt-users] Ovirt 404 - Not found

2018-03-22 Thread Luis Ricardo de Souza
Hello,

My ovirt 4.1.9 install is throwing error 404 - Not found. Follow the log files.

DHW
2018-03-20 09:14:31|ETL Service Stopped
2018-03-20 09:16:32|ETL Service Started
ovirtEngineDbDriverClass|org.postgresql.Driver
ovirtEngineHistoryDbJdbcConnection|jdbc:postgresql://localhost:5432/ovirt_engine_history?sslfactory=org.postgresql.ssl.NonValidatingFactory
hoursToKeepDaily|0
hoursToKeepHourly|720
ovirtEngineDbPassword|**
runDeleteTime|3
ovirtEngineDbJdbcConnection|jdbc:postgresql://localhost:5432/engine?sslfactory=org.postgresql.ssl.NonValidatingFactory
runInterleave|60
limitRows|limit 1000
ovirtEngineHistoryDbUser|ovirt_engine_history
ovirtEngineDbUser|engine
deleteIncrement|10
timeBetweenErrorEvents|30
hoursToKeepSamples|24
deleteMultiplier|1000
lastErrorSent|2011-07-03 12:46:47.00
etlVersion|4.1.9
dwhAggregationDebug|false
dwhUuid|f01b63b4-97c6-4cc4-b363-01f0928822cf
ovirtEngineHistoryDbDriverClass|org.postgresql.Driver
ovirtEngineHistoryDbPassword|**
Engine
2018-03-20 09:16:43,213-03 WARN  [org.ovirt.engine.core.utils.ConfigUtilsBase] 
(ServerService Thread Pool -- 46) [] Could not find enum value for option: 
'VdsFenceOptions'
2018-03-20 09:16:43,213-03 WARN  [org.ovirt.engine.core.utils.ConfigUtilsBase] 
(ServerService Thread Pool -- 46) [] Could not find enum value for option: 
'DbJustRestored'
2018-03-20 09:16:43,215-03 INFO  
[org.ovirt.engine.core.utils.osinfo.OsInfoPreferencesLoader] (ServerService 
Thread Pool -- 46) [] Loading file 
'/etc/ovirt-engine/osinfo.conf.d/00-defaults.properties'
2018-03-20 09:16:43,252-03 ERROR [org.ovirt.engine.core.bll.Backend] 
(ServerService Thread Pool -- 46) [] Error during initialization: 
org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad 
SQL grammar [{call clear_osinfo()}]; nested exception is 
org.postgresql.util.PSQLException: ERROR: relation "dwh_osinfo" does not exist
  Where: SQL statement "TRUNCATE dwh_osinfo"
PL/pgSQL function clear_osinfo() line 3 at SQL statement
at 
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1094) 
[spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1130) 
[spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:405)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:377)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:188)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.ovirt.engine.core.dao.dwh.OsInfoDaoImpl.populateDwhOsInfo(OsInfoDaoImpl.java:52)
 [dal.jar:]
at org.ovirt.engine.core.bll.Backend.initOsRepository(Backend.java:742) 
[bll.jar:]
at org.ovirt.engine.core.bll.Backend.initialize(Backend.java:258) 
[bll.jar:]
at org.ovirt.engine.core.bll.Backend.create(Backend.java:197) [bll.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.8.0_161]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
[rt.jar:1.8.0_161]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_161]
at 
org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at 
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
at 
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:70)
 [wildfly-weld-10.1.0.Final.jar:10.1.0.Final]
at 
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:117)
 [wildfly-weld-10.1.0.Final.jar:10.1.0.Final]
at 
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:103)
 [wildfly-weld-10.1.0.Final.jar:10.1.0.Final]
at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at 
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
at 
org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
 [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]

Re: [ovirt-users] Juniper vSRX Cluster on oVirt/RHEV

2018-03-22 Thread Yaniv Kaul
On Wed, Mar 21, 2018 at 10:37 PM, Charles Kozler 
wrote:

> Hi All -
>
> Recently did this and thought it would be worth documenting. I couldnt
> find any solid information on vsrx with kvm outside of flat KVM. This
> outlines some of the things I hit along the way and how to fix. This is my
> one small way of giving back to such an incredible open source tool
>
> https://ckozler.net/vsrx-cluster-on-ovirtrhev/
>

Thanks for sharing!
Why didn't you just upload the qcow2 disk via the UI/API though?
There's quite a bit of manual work that I hope is not needed?
Y.

>
>
> ___
> 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] Adding host to hosted-engine /w gluster cluster. (On ovirt Node 4.2.1.1)

2018-03-22 Thread Sahina Bose
On Wed, Mar 21, 2018 at 7:01 PM, Hanson Turner 
wrote:

> Hi Sahina,
>
> On the fourth node, I've found /var/log/glusterfs/rhev-data-
> center-mnt-glusterSD-ovirtnode1.core\:_engine.log ... is this the
> engine.log you're referring to or do you want one from the hosted engine?
>

I was referring to oVirt's engine.log. Found under
/var/log/ovirt-engine/engine.log

I actually do want to go replica 5. Most VM's it runs are small(1 Core,1gb
> Ram,8gb HDD) and HA is needed. I'd like a bigger critical margin than one
> node failing.
>

Ok, in this case - in addition to adding the new nodes to cluster, you will
also need to add bricks to the volume and increase the replica count to 5.
You can do this using the "Add Bricks" from the Bricks tab on selection of
a gluster volume. Ensure that you set the replica count to 5 here. This
should be done once you successfully add the new hosts to the cluster.



> As far as the repos, it's a straight the ovirtnode iso install, I think
> it's Node 4.2.0... which is yum updated to 4.2.1.1
> When I installed 4.0 I'd installed on top of centos. This round I went
> straight with the node os because of simplicity in updating.
>
> I can manually restart gluster from cli, the peer and volume status show
> no peers or volumes.
>

This is because the nodes have not been added (or peer probed) to existing
gluster cluster.
I will need the logs I requested to understand why.


> One thing of note, the networking is still as setup from the node install.
> I cannot change the networking info from the ovirt gui/dashboard. The host
> goes unresponsive and then another host power cycles it.
>
> Thanks,
> Hanson
>
>
> On 03/21/2018 06:12 AM, Sahina Bose wrote:
>
>
>
> On Tue, Mar 20, 2018 at 9:41 PM, Hanson Turner  > wrote:
>
>> Hi Guys,
>>
>> I've a 3 machine pool running gluster with replica 3 and want to add two
>> more machines.
>>
>> This would change to a replica 5...
>>
>
> Adding 2 more nodes to cluster will not change it to a replica 5. replica
> 3 is a configuration on the gluster volume. I assume you don't need a
> replica 5, but just to add more nodes (and possibly new gluster volumes) to
> the cluster?
>
>
>> In ovirt 4.0, I'd done everything manually. No problem there.
>>
>> In ovirt 4.2, I'd used the wizard for the hosted-engine. It looks like
>> the fourth node has been added to the pool but will not go active. It
>> complains gluster isn't running (which I've not manually configured
>> /dev/sdb for gluster). Host install+deploy fails. Host can go into
>> maintenance w/o issue. (Meaning the host has been added to the cluster, but
>> isn't operational)
>>
>
> Are the repos configured correctly on the new nodes? Does the oVirt
> cluster where the nodes are being added have "Enable Gluster Service"
> enabled?
>
>
>> What do I need to do to get the node up and running proper with gluster
>> syncing properly? Manually restarting gluster, tells me there's no peers
>> and no volumes.
>>
>> Do we have a wizard for this too? Or do I need to go find the setup
>> scripts and configure hosts 4 + 5 manually and run the deploy again?
>>
>
> The host addition flow should take care of installing gluster.
> Can you share the engine log from when the host was added to when it's
> reported non-operational?
>
>
>>
>> Thanks,
>>
>> Hanson
>>
>> ___
>> 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] Any monitoring tool provided?

2018-03-22 Thread Yaniv Kaul
On Thu, Mar 22, 2018 at 5:41 AM, Terry hey  wrote:

> Dear all,
>
> Now, we can just read how many storage used, cpu usage on ovirt dashboard.
> But is there any monitoring tool for monitoring virtual machine time to
> time?
> If yes, could you guys give me the procedure?
>

https://ovirt.org/blog/2017/12/ovirt-metrics-store/ might be helpful.
Y.


>
>
> Regards
> Terry
>
> ___
> 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] create a cloned virtual machine based on a template with SDK API python

2018-03-22 Thread Fred Rolland
Hi Nicolas,

You can find an example here:

https://github.com/oVirt/ovirt-engine-sdk/blob/21f637345597729240f217cfe84fe2a2cf39a655/sdk/examples/add_independet_vm.py#L56

Regards,
Fred

On Thu, Mar 22, 2018 at 9:09 AM, Nicolas Vaye 
wrote:

> Hi,
>
> I want to create a cloned virtual machine based on a template with SDK API
> python and i don't find the parameter to indicate the clone action for the
> disk
>
> here is my code :
>
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> #
> # Copyright (c) 2016 Red Hat, Inc.
> #
> # Licensed under the Apache License, Version 2.0 (the "License");
> # you may not use this file except in compliance with the License.
> # You may obtain a copy of the License at
> #
> #   http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law or agreed to in writing, software
> # distributed under the License is distributed on an "AS IS" BASIS,
> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> # See the License for the specific language governing permissions and
> # limitations under the License.
> #
> from pprint import pprint
> import logging
> import time
>
> import ovirtsdk4 as sdk
> import ovirtsdk4.types as types
>
>
>
> template_name='test_debian_9.4'
> template_version=1
> cluster_name='nico-cluster'
> data_domain_name='OVIRT-TEST2'
>
>
>
> logging.basicConfig(level=logging.DEBUG, filename='example.log')
>
> # This example will connect to the server and start a virtual machine
> # with cloud-init, in order to automatically configure the network and
> # the password of the `root` user.
>
> # Create the connection to the server:
> connection = sdk.Connection(
> url='https://ocenter.province-sud.prod/ovirt-engine/api',
> username='admin@internal',
> password='admin',
> ca_file='CA_ocenter.pem',
> debug=True,
> log=logging.getLogger(),
> )
>
>
>
> ##
>  TEMPLATE 
> ##
>
> # Get the reference to the root of the tree of services:
> system_service = connection.system_service()
>
> # Get the reference to the service that manages the storage domains:
> storage_domains_service = system_service.storage_domains_service()
>
> # Find the storage domain we want to be used for virtual machine disks:
> storage_domain = storage_domains_service.list(search='name='+data_domain_
> name)[0]
>
>
> # Get the reference to the service that manages the templates:
> templates_service = system_service.templates_service()
>
> # When a template has multiple versions they all have the same name, so
> # we need to explicitly find the one that has the version name or
> # version number that we want to use. In this case we want to use
> # version 1 of the template.
> templates = templates_service.list(search='name='+template_name)
> template_id = None
> for template in templates:
> if template.version.version_number == template_version:
> template_id = template.id
> break
>
> if template_id == None:
> print "ERREUR le template "+template_name+"en version
> "+str(template_version)+" n'a pas été trouvé!!"
>
> # Find the template disk we want be created on specific storage domain
> # for our virtual machine:
> template_service = templates_service.template_service(template_id)
> disk_attachments = connection.follow_link(template_service.get().disk_
> attachments)
>
> print "disk_attachments=" + str(len(disk_attachments))
>
> template_disk_attachments = []
> for disk in disk_attachments:
> template_disk_attachments.append(types.DiskAttachment(
> disk=types.Disk(
> id=disk.id,
> format=types.DiskFormat.COW,
> storage_domains=[
> types.StorageDomain(
> id=storage_domain.id,
> ),
> ],
> ),
> )
> )
>
>
>
> # Get the reference to the service that manages the virtual machines:
> vms_service = system_service.vms_service()
>
> # Add a new virtual machine explicitly indicating the identifier of the
> # template version that we want to use and indicating that template disk
> # should be created on specific storage domain for the virtual machine:
> vm = vms_service.add(
> types.Vm(
> name='myvm',
> cluster=types.Cluster(
> name=cluster_name
> ),
> stateless=False,
> type=types.VmType('server'),
> comment='based on template '+template_name+'en version
> '+str(template_version),
> template=types.Template(
> id=template_id
> ),
> disk_attachments=template_disk_attachments,
> )
> )
>
>
>
> # Get a reference to the service that manages the virtual machine that
> # was created in the previous step:
> vm_service = vms_service.vm_service(vm.id)
>
> # Wait till the virtual 

Re: [ovirt-users] Revised Query for moving Ovirt Engine...

2018-03-22 Thread Nasrum Minallah Manzoor
Hi Every one,

To make it more clear I am revising my below query!

I have installed 2 nodes  in a cluster and ovirt engine is installed on 
separate machine on Vmware workstation. Now I want to move ovirt engine to one 
of my any nodes. What process  should I go through. Need solution from experts!


Regards,

From: Nasrum Minallah Manzoor
Sent: 22 March 2018 11:54 AM
To: 'users@ovirt.org' 
Cc: 'junaid8...@gmail.com' 
Subject: Query for moving Ovirt Engine...

Hello Every one,

I want to move ovirt engine from one of my machine to node installed on another 
machine! What steps I should take to accomplish the query!

Help would be appreciated!



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


Re: [ovirt-users] ovirt do not start postgresql

2018-03-22 Thread Yedidyah Bar David
Hi all,

It's very hard to debug this without getting a full picture of the state
of the machine, including logs, versions, flow, etc. Some comments inside.

On Thu, Mar 22, 2018 at 10:12 AM, Sandro Bonazzola  wrote:
>
>>
>> As Didi mentioned, we are looking for errors in the below files/dir.
>> Do you mind to take a look and share the error message?
>>
>> /var/log/ovirt-engine/setup/*
>> /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_log
>> /var/log/messages
>>
>>
>
> Didi, Eli, can you please have a look?
>
>
>
> Looking at the logs Marcos shared with me I see:
>
> 2018-03-21 15:02:30,373-0400 DEBUG
> otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema
> plugin.executeRaw:863 execute-result:
> ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost', '-p',
> '5432', '
> -u', 'engine_20180321150206', '-d', 'engine_20180321150206', '-l',

The fact that your database name is 'engine_20180321150206' most likely means
you have/had some problem, see also:

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

Please check if you have other databases on your machine, why this one was
created, etc.

Some information to understand this can be found in the setup logs.

> '/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
> '-c', 'apply'], rc=1
> 2018-03-21 15:02:30,374-0400 DEBUG
> otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:921
> execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s',
> 'localhost', '-p', '5432', '-u'
> , 'engine_20180321150206', '-d', 'engine_20180321150206', '-l',
> '/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
> '-c', 'apply'] stdout:
> Creating schema engine_20180321150206@localhost:5432/engine_20180321150206
> Creating fresh schema
> Creating tables...
> Creating functions...
>
> 2018-03-21 15:02:30,374-0400 DEBUG
> otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:926
> execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s',
> 'localhost', '-p', '5432', '-u'
> , 'engine_20180321150206', '-d', 'engine_20180321150206', '-l',
> '/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
> '-c', 'apply'] stderr:
> psql:/usr/share/ovirt-engine/dbscripts/create_functions.sql:1095: ERROR:
> must be owner of function uuid_generate_v1
> FATAL: Cannot execute sql command:
> --file=/usr/share/ovirt-engine/dbscripts/create_functions.sql
>
> 2018-03-21 15:02:30,374-0400 ERROR
> otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:428
> schema.sh: FATAL: Cannot execute sql command:
> --file=/usr/share/ovirt-engine/dbscripts/create_functions
> .sql
> 2018-03-21 15:02:30,375-0400 DEBUG otopi.context context._executeMethod:143
> method exception
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/otopi/context.py", line 133, in
> _executeMethod
> method['method']()
>   File
> "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/schema.py",
> line 430, in _misc
> raise RuntimeError(_('Engine schema refresh failed'))
> RuntimeError: Engine schema refresh failed
> 2018-03-21 15:02:30,376-0400 ERROR otopi.context context._executeMethod:152
> Failed to execute stage 'Misc configuration': Engine schema refresh failed
> 2018-03-21 15:02:30,377-0400 DEBUG otopi.transaction transaction.abort:119
> aborting 'DWH Engine database Transaction'
> 2018-03-21 15:02:30,377-0400 DEBUG otopi.transaction transaction.abort:119
> aborting 'Database Transaction'
>
>
>  A few lines above in the log I see:
>
> * QUERY **
> CREATE OR REPLACE FUNCTION uuid_generate_v1()
> RETURNS uuid STABLE
> AS $PROCEDURE$
> DECLARE
> v_val BIGINT;
> v_4_1_part CHAR(4);
> v_4_2_part CHAR(4);
> v_4_3_part CHAR(4);
> v_8_part CHAR(8);
> v_12_part CHAR(12);
> v_4_part_max INT;
> BEGIN
> PERFORM setseed(random());
>
> -- The only part we should use modulo is the 4 digit part, all the
> -- rest are really big numbers (i.e 16^8 - 1 and 16^12 - 1)
> -- The use of round(random() * 1000 is for getting a different id
> -- for DC/Cluster in different installations
> v_4_part_max = 65535;-- this is 16^4 -1
>
> v_val := nextval('uuid_sequence');
> v_4_1_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
> 4, '0');
> v_4_2_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
> 4, '0');
> v_4_3_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
> 4, '0');
>
> -- generate this part using the clock timestamp
> v_8_part := lpad(to_hex(cast(FLOOR(EXTRACT(EPOCH FROM
> clock_timestamp())) as bigint)), 8 , '0');
>
> v_12_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
> 12, '0');
>
> RETURN v_8_part || v_4_1_part || v_4_2_part || v_4_3_part || v_12_part;
> END;$PROCEDURE$
> LANGUAGE plpgsql;
> **

This function was removed by:


Re: [ovirt-users] ovirt do not start postgresql

2018-03-22 Thread Sandro Bonazzola
>
> As Didi mentioned, we are looking for errors in the below files/dir.
> Do you mind to take a look and share the error message?
>
> /var/log/ovirt-engine/setup/*
> /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_log
> /var/log/messages
>
>
>
Didi, Eli, can you please have a look?



Looking at the logs Marcos shared with me I see:

2018-03-21 15:02:30,373-0400 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema
plugin.executeRaw:863 execute-result:
['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost', '-p',
'5432', '
-u', 'engine_20180321150206', '-d', 'engine_20180321150206', '-l',
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
'-c', 'apply'], rc=1
2018-03-21 15:02:30,374-0400 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:921
execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s',
'localhost', '-p', '5432', '-u'
, 'engine_20180321150206', '-d', 'engine_20180321150206', '-l',
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
'-c', 'apply'] stdout:
Creating schema engine_20180321150206@localhost:5432/engine_20180321150206
Creating fresh schema
Creating tables...
Creating functions...

2018-03-21 15:02:30,374-0400 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:926
execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s',
'localhost', '-p', '5432', '-u'
, 'engine_20180321150206', '-d', 'engine_20180321150206', '-l',
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
'-c', 'apply'] stderr:
psql:/usr/share/ovirt-engine/dbscripts/create_functions.sql:1095: ERROR:
must be owner of function uuid_generate_v1
FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/create_functions.sql

2018-03-21 15:02:30,374-0400 ERROR
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:428
schema.sh: FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/create_functions
.sql
2018-03-21 15:02:30,375-0400 DEBUG otopi.context context._executeMethod:143
method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 133, in
_executeMethod
method['method']()
  File
"/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/schema.py",
line 430, in _misc
raise RuntimeError(_('Engine schema refresh failed'))
RuntimeError: Engine schema refresh failed
2018-03-21 15:02:30,376-0400 ERROR otopi.context context._executeMethod:152
Failed to execute stage 'Misc configuration': Engine schema refresh failed
2018-03-21 15:02:30,377-0400 DEBUG otopi.transaction transaction.abort:119
aborting 'DWH Engine database Transaction'
2018-03-21 15:02:30,377-0400 DEBUG otopi.transaction transaction.abort:119
aborting 'Database Transaction'


 A few lines above in the log I see:

* QUERY **
CREATE OR REPLACE FUNCTION uuid_generate_v1()
RETURNS uuid STABLE
AS $PROCEDURE$
DECLARE
v_val BIGINT;
v_4_1_part CHAR(4);
v_4_2_part CHAR(4);
v_4_3_part CHAR(4);
v_8_part CHAR(8);
v_12_part CHAR(12);
v_4_part_max INT;
BEGIN
PERFORM setseed(random());

-- The only part we should use modulo is the 4 digit part, all the
-- rest are really big numbers (i.e 16^8 - 1 and 16^12 - 1)
-- The use of round(random() * 1000 is for getting a different id
-- for DC/Cluster in different installations
v_4_part_max = 65535;-- this is 16^4 -1

v_val := nextval('uuid_sequence');
v_4_1_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
4, '0');
v_4_2_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
4, '0');
v_4_3_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
4, '0');

-- generate this part using the clock timestamp
v_8_part := lpad(to_hex(cast(FLOOR(EXTRACT(EPOCH FROM
clock_timestamp())) as bigint)), 8 , '0');

v_12_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
12, '0');

RETURN v_8_part || v_4_1_part || v_4_2_part || v_4_3_part || v_12_part;
END;$PROCEDURE$
LANGUAGE plpgsql;
**

The log is OVESETUP_CORE/generatedByVersion=str:'4.2.1.7'
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] virtual machine actual size is not right

2018-03-22 Thread Pavol Brilla
Hi

just small clarification

I entered the server and type df -h.
- do you meant you run this command on host which is running mentioned VM?

On Thu, Mar 22, 2018 at 4:47 AM, Terry hey  wrote:

> Dear all,
>
> I would like to know the actual size that the virtual machine is used.
> I found that there is a field to show "actual size". But the number is not
> right.
>
> I entered the server and type df -h.
> The storage size of the server is about 30GB but the actual size field
> shows 60 GB.
>
> Regards
> Terry
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>


-- 

PAVOL BRILLA

RHV QUALITY ENGINEER, CLOUD

Red Hat Czech Republic, Brno 

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


[ovirt-users] create a cloned virtual machine based on a template with SDK API python

2018-03-22 Thread Nicolas Vaye
Hi,

I want to create a cloned virtual machine based on a template with SDK API 
python and i don't find the parameter to indicate the clone action for the disk

here is my code :

#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# Copyright (c) 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from pprint import pprint
import logging
import time

import ovirtsdk4 as sdk
import ovirtsdk4.types as types



template_name='test_debian_9.4'
template_version=1
cluster_name='nico-cluster'
data_domain_name='OVIRT-TEST2'



logging.basicConfig(level=logging.DEBUG, filename='example.log')

# This example will connect to the server and start a virtual machine
# with cloud-init, in order to automatically configure the network and
# the password of the `root` user.

# Create the connection to the server:
connection = sdk.Connection(
url='https://ocenter.province-sud.prod/ovirt-engine/api',
username='admin@internal',
password='admin',
ca_file='CA_ocenter.pem',
debug=True,
log=logging.getLogger(),
)



##
 TEMPLATE 
##

# Get the reference to the root of the tree of services:
system_service = connection.system_service()

# Get the reference to the service that manages the storage domains:
storage_domains_service = system_service.storage_domains_service()

# Find the storage domain we want to be used for virtual machine disks:
storage_domain = 
storage_domains_service.list(search='name='+data_domain_name)[0]


# Get the reference to the service that manages the templates:
templates_service = system_service.templates_service()

# When a template has multiple versions they all have the same name, so
# we need to explicitly find the one that has the version name or
# version number that we want to use. In this case we want to use
# version 1 of the template.
templates = templates_service.list(search='name='+template_name)
template_id = None
for template in templates:
if template.version.version_number == template_version:
template_id = template.id
break

if template_id == None:
print "ERREUR le template "+template_name+"en version 
"+str(template_version)+" n'a pas été trouvé!!"

# Find the template disk we want be created on specific storage domain
# for our virtual machine:
template_service = templates_service.template_service(template_id)
disk_attachments = 
connection.follow_link(template_service.get().disk_attachments)

print "disk_attachments=" + str(len(disk_attachments))

template_disk_attachments = []
for disk in disk_attachments:
template_disk_attachments.append(types.DiskAttachment(
disk=types.Disk(
id=disk.id,
format=types.DiskFormat.COW,
storage_domains=[
types.StorageDomain(
id=storage_domain.id,
),
],
),
)
)



# Get the reference to the service that manages the virtual machines:
vms_service = system_service.vms_service()

# Add a new virtual machine explicitly indicating the identifier of the
# template version that we want to use and indicating that template disk
# should be created on specific storage domain for the virtual machine:
vm = vms_service.add(
types.Vm(
name='myvm',
cluster=types.Cluster(
name=cluster_name
),
stateless=False,
type=types.VmType('server'),
comment='based on template '+template_name+'en version 
'+str(template_version),
template=types.Template(
id=template_id
),
disk_attachments=template_disk_attachments,
)
)



# Get a reference to the service that manages the virtual machine that
# was created in the previous step:
vm_service = vms_service.vm_service(vm.id)

# Wait till the virtual machine is down, which indicats that all the
# disks have been created:
while True:
time.sleep(1)
vm = vm_service.get()
if vm.status == types.VmStatus.DOWN:
break


# Close the connection to the server:
connection.close()




If the data_domain_name is the same as the template data domain, then this 
script seem to create a vm but not with cloned disk.

If the data_domain_name is NOT the same as the template data domain, then this 
script produce an error
ovirtsdk4.Error: Fault reason is "Operation