[ovirt-users] Re: ovirt template import using ansible

2023-07-05 Thread destfinal--- via Users
Hi Guys, I still could not manage to get this working. Can somebody please help?

Thanks
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/5HLWIIFIP5MKWLW7MJW4YJYXHVCL6NIW/


[ovirt-users] Re: ovirt template import using ansible

2023-06-26 Thread destfinal--- via Users
@Arik the import worked are expected. 

I tried to do the reverse - exporting a template to a node as an OVA template. 
But could not get it working. Here is what I have tried:

```
  - name: Export the template
ovirt.ovirt.ovirt_template:
  auth: "{{ovirt_auth}}"
  cluster: "{{source_cluster_name}}"
  name: "{{source_template_name}}"
  state: exported
  export_domain: "hosted_storage"
  timeout: 1800
  poll_interval: 30
  kvm:
host: "{{export_node_name}}"
url: "ova:///tmp/{{source_template_name}}.ova"
storage_domain: "hosted_storage"
```

Upon execution of the above, nothing happens (the script completes instantly 
with no error) and following is the ansible output:

```
TASK [Export the template] 

ok: [localhost]
```

The OVA is not copied to the local disk of the 'export_node'.

Can you please suggest what I am doing wrong or come up with the right task? I 
could not find any example for the 'exported' state of the ovirt_template.

Thanks 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/QOZGCZ4LROPCYAWFCSIUNMEC4SD23DQA/


[ovirt-users] Re: ovirt template import using ansible

2023-06-26 Thread destfinal--- via Users
That really helps. Thanks @Arik. Will try and update.
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/UHAZAV4YEY6544Q5ZC6DFBNUQLAYU3JB/


[ovirt-users] Re: ovirt template import using ansible

2023-06-25 Thread cello86
Hi Pavel, 
Did you use also terraform to start the vms?

Thanks,
Marcello
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/VYYTBTTAPIUK52M7NDWWQRKM6U5R34LF/


[ovirt-users] Re: ovirt template import using ansible

2023-06-25 Thread Arik Hadas
On Thu, Jun 22, 2023 at 5:43 PM destfinal--- via Users 
wrote:

> Thanks for taking time for responding, @arik.
>
> "you didn't elaborate on what doesn't work for you using Ansible" - I have
> no issues creating a template using ansible. I have not raised an ansible
> issue in particular.
>
> "I suppose the ability to export a template as an OVA is missing, right?"
> - Not exactly.
>
> My requirement is to make a template available from one ovirt cluster to
> another ovirt cluster that are not connected. I have elaborated how I am
> doing it currently (which is highly manual).
>
> " export the VM to an OVA" - I do this using the ovirt_termplate ansible
> module. However, you can do this only to a hosted storage within the
> cluster.
>
> "4. import the OVA as a template (see "Import external ova template" in the
> documentation of ovirt_template_module)" - I have been using the
> 'ovirt_template' ansible module for the past couple of months. I have not
> figured out how I could import an OVA template from a node. For example, if
> I manage to copy the template to one of the cluster nodes (say,
> node2.my.ovirt.cluster:/tmp/ova_template/my_template.ova), I could not work
> out hos to import this OVA into my cluster. Do you have some sample code,
> if this is easy enough?
>

ah you're having an issue with importing the produced OVA as a template on
the target environment,ok
did you try to run the code snippet from the documentation of the
ovirt_template module:

- name: Import external ova template  ovirt.ovirt.ovirt_template:
cluster: name: state: present
timeout: 1800poll_interval: 30kvm:  host:   url: ova:///tmp/test.ova  storage_domain:



?


> Thanks
>
>
>
> You have
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/UFXSZ6EBIMOE2EXSLFJSVHXLVRJHARC3/
>
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/76PE3N47SRD5OCVF7BMCRTLL2SN45TUV/


[ovirt-users] Re: ovirt template import using ansible

2023-06-22 Thread destfinal--- via Users
@pavel, thanks for sharing the packer example. Packer is definitely useful in 
creating a template (which can override my implementation of creating vm, 
perform required configuration and create a template out of it). I will look 
into it.

Thanks
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/LLYUGOHOYJWFKLGR7S2RA6AFJZHZXJ4Z/


[ovirt-users] Re: ovirt template import using ansible

2023-06-22 Thread destfinal--- via Users
Thanks for taking time for responding, @arik.

"you didn't elaborate on what doesn't work for you using Ansible" - I have no 
issues creating a template using ansible. I have not raised an ansible issue in 
particular.

"I suppose the ability to export a template as an OVA is missing, right?" - Not 
exactly.

My requirement is to make a template available from one ovirt cluster to 
another ovirt cluster that are not connected. I have elaborated how I am doing 
it currently (which is highly manual). 

" export the VM to an OVA" - I do this using the ovirt_termplate ansible 
module. However, you can do this only to a hosted storage within the cluster.

"4. import the OVA as a template (see "Import external ova template" in the
documentation of ovirt_template_module)" - I have been using the 
'ovirt_template' ansible module for the past couple of months. I have not 
figured out how I could import an OVA template from a node. For example, if I 
manage to copy the template to one of the cluster nodes (say, 
node2.my.ovirt.cluster:/tmp/ova_template/my_template.ova), I could not work out 
hos to import this OVA into my cluster. Do you have some sample code, if this 
is easy enough?

Thanks



You have 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/UFXSZ6EBIMOE2EXSLFJSVHXLVRJHARC3/


[ovirt-users] Re: ovirt template import using ansible

2023-06-22 Thread Pavel Šipoš

Hi.

If it's any help to you we use packer to create qemu image (in qcow2 
format) and then ansible to generate template on ovirt cluster.
For template we used this project: 
https://github.com/jclaret/packer-templates


With kind regards,
Pavel

On 22/06/2023 08:52, Arik Hadas wrote:



On Mon, Jun 12, 2023 at 12:06 PM destfinal--- via Users 
 wrote:


Hi,

I use a set of templates, generated in one cluster and re-used in
multiple clusters. The clusters do not have direct connections
between each other. My dev environment can talk to all the
clusters. Currently,

1. I export the templates (as OVAs) to one of the nodes (example:
node1.source.cluster), from the ovirt console
(https://management.source.cluster)
2. scp the templates to my dev machine (example: scp -r
node1.source.cluster:/tmp/ovirt_templates /tmp/ovirt_templates)
3. scp the templates from my dev environment to the target cluster
(example: scp /tmp/ovirt_templates node1.target.cluster:/tmp)
4. Import the templates using the ovirt console of the target
cluster (https://management.target.cluster)

This is highly a manual job and I am trying to automate the
process using ansible. I am unable to work it out using the
ovit_template module documentation

(https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_template_module.html#ansible-collections-ovirt-ovirt-ovirt-template-module)
and could not able to see any other module in this relation.

Has anybody done this before and point me to the right direction?
Or if there is a better process than what I follow above, please
suggest me one.


you didn't elaborate on what doesn't work for you using Ansible, I 
suppose the ability to export a template as an OVA is missing, right?

in that case, the following process could work:
1. provision a VM from the template (it can be thin-provisioned vm to 
save time)

2. export the VM to an OVA
3. remove the VM
4. import the OVA as a template (see "Import external ova template" in 
the documentation of ovirt_template_module)


it should be possible to import an OVA of a VM as a template from the 
CLI/Ansible


in addition, if you look for ways to improve the flow you described 
above, I'd suggest to use shared storage in order to save you from 
copying the OVA (e.g., configure an NFS share that is mounted to hosts 
on both environments - export to that NFS share on the source 
environment and import from that NFS share on the target environment 
once the export operation completes)



Please let me know if you need more information in this regard.

Thanks
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
List Archives:

https://lists.ovirt.org/archives/list/users@ovirt.org/message/MZ27S5QXM7R3PM5XB22ZZNWTXHPLMSV6/


___
Users mailing list --users@ovirt.org
To unsubscribe send an email tousers-le...@ovirt.org
Privacy Statement:https://www.ovirt.org/privacy-policy.html
oVirt Code of 
Conduct:https://www.ovirt.org/community/about/community-guidelines/
List 
Archives:https://lists.ovirt.org/archives/list/users@ovirt.org/message/OKM6ILDKEQG57XOCJLCIIE3P2X4IRGGO/


--
--
Pavel Sipos, Arnes
ARNES, p.p. 7, SI-1001 Ljubljana, Slovenia
T: +386 1 479 88 00
W:www.arnes.si, aai.arnes.si


smime.p7s
Description: S/MIME Cryptographic Signature
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/TWYWCESMNK6HIT2GETQXGCC5ICIU4O6C/


[ovirt-users] Re: ovirt template import using ansible

2023-06-22 Thread Arik Hadas
On Mon, Jun 12, 2023 at 12:06 PM destfinal--- via Users 
wrote:

> Hi,
>
> I use a set of templates, generated in one cluster and re-used in multiple
> clusters. The clusters do not have direct connections between each other.
> My dev environment can talk to all the clusters. Currently,
>
> 1. I export the templates (as OVAs) to one of the nodes (example:
> node1.source.cluster), from the ovirt console (
> https://management.source.cluster)
> 2. scp the templates to my dev machine (example: scp -r
> node1.source.cluster:/tmp/ovirt_templates /tmp/ovirt_templates)
> 3. scp the templates from my dev environment to the target cluster
> (example: scp /tmp/ovirt_templates node1.target.cluster:/tmp)
> 4. Import the templates using the ovirt console of the target cluster (
> https://management.target.cluster)
>
> This is highly a manual job and I am trying to automate the process using
> ansible. I am unable to work it out using the ovit_template module
> documentation (
> https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_template_module.html#ansible-collections-ovirt-ovirt-ovirt-template-module)
> and could not able to see any other module in this relation.
>
> Has anybody done this before and point me to the right direction? Or if
> there is a better process than what I follow above, please suggest me one.
>

you didn't elaborate on what doesn't work for you using Ansible, I suppose
the ability to export a template as an OVA is missing, right?
in that case, the following process could work:
1. provision a VM from the template (it can be thin-provisioned vm to save
time)
2. export the VM to an OVA
3. remove the VM
4. import the OVA as a template (see "Import external ova template" in the
documentation of ovirt_template_module)

it should be possible to import an OVA of a VM as a template from the
CLI/Ansible

in addition, if you look for ways to improve the flow you described above,
I'd suggest to use shared storage in order to save you from copying the OVA
(e.g., configure an NFS share that is mounted to hosts on both environments
- export to that NFS share on the source environment and import from that
NFS share on the target environment once the export operation completes)


>
> Please let me know if you need more information in this regard.
>
> Thanks
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/MZ27S5QXM7R3PM5XB22ZZNWTXHPLMSV6/
>
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/OKM6ILDKEQG57XOCJLCIIE3P2X4IRGGO/


[ovirt-users] Re: ovirt template import using ansible

2023-06-18 Thread destfinal--- via Users
Bump
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/PDY2OZCWMLHRSO6735VDR4HQAMWSGVR5/