Re: [ovirt-users] How to import OVA from oVirt 4.2 to oVirt 4.2

2017-12-31 Thread Arik Hadas
On Sat, Dec 30, 2017 at 1:26 AM, Alex Bartonek  wrote:

> I used clonezilla and built the VM that way.  If you get the OVA thing
> working, cool..  but in the meantime, here's how I did it using Clonezilla.
>

The bad news is that unfortunately, this OVA-import functionality is indeed
broken on 4.2.0.2.
The good news is that not only that the fix for this, along with other
OVA-related improvements, is already available on the master branch where
4.2.1 will be generated from but also that there is a workaround for
importing an OVA **that was generated by oVirt** which may even be more
efficient:
The alternative way requires using the SDK.
An example that demonstrates how to do this can be found at [1] - you just
need to replace the path to the ova (#43), the name of the target cluster
(#45), the connection details (#51-#57) and the name of the target storage
domain (#115).

So you'll need to install the SDK on one of the hosts that are part of the
source data center and then:
1. Export the VM as OVA through the webadmin/rest-api to a specific path on
that host.
2. Execute the example-script that takes the OVA from that path and uploads
it to the target data center.

Note that the SDK example-script uses the upload-disk operation.
This requires several configuration settings - I highly suggest to execute
the example of upload-disk [2] and only once that works for you to upload
the OVA(s).

[1]
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_ova_as_vm.py
[2]
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk.py



>
> https://www.unix1337.com/cloning-a-virtualbox-vm-to-ovirt-4-2/
>
>
>
> Sent with ProtonMail  Secure Email.
>
>  Original Message 
> Subject: How to import OVA from oVirt 4.2 to oVirt 4.2
> Local Time: December 28, 2017 8:03 PM
> UTC Time: December 29, 2017 2:03 AM
> From: a...@unix1337.com
> To: users 
>
> Followed instructions here:
> https://www.ovirt.org/develop/release-management/features/
> virt/virt-v2v-integration/
> Section: Importing OVA Files from VMware
> Even though its not VMWare, its an ova file so I followed the steps
> there.  Ownership of the file is 777, wide open.
>
> Error after clicking load: Failed to load VM configuration from OVA file:
> /media/primary/extra_space/CentOS7.ova
>
>
> Error in engine.log:
> 2017-12-28 20:03:04,910-06 INFO  
> [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor]
> (default task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Executing
> Ansible command:  [/usr/bin/ansible-playbook, 
> --private-key=/etc/pki/ovirt-engine/keys/engine_id_rsa,
> --inventory=/tmp/ansible-inventory4892490524555390378,
> --extra-vars=ovirt_query_ova_path=/media/primary/extra_space/CentOS7.ova,
> /usr/share/ovirt-engine/playbooks/ovirt-ova-query.yml] [Logfile: null]
> 2017-12-28 20:03:09,045-06 INFO  
> [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor]
> (default task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Ansible playbook
> command has exited with value: 0
> 2017-12-28 20:03:09,046-06 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery]
> (default task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Query
> 'GetVmFromOvaQuery' failed: null
> 2017-12-28 20:03:09,046-06 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery]
> (default task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Exception:
> java.lang.NullPointerException
> at 
> org.ovirt.engine.core.bll.GetVmFromOvaQuery.executeQueryCommand(GetVmFromOvaQuery.java:47)
> [bll.jar:]
> at 
> org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:106)
> [bll.jar:]
> at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33)
> [dal.jar:]
> at org.ovirt.engine.core.bll.executor.DefaultBackendQueryExecutor.execute(
> DefaultBackendQueryExecutor.java:14) [bll.jar:]
> at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:579)
> [bll.jar:]
> at org.ovirt.engine.core.bll.Backend.runQuery(Backend.java:548) [bll.jar:]
> at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
> [:1.8.0_151]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_151]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
> at org.jboss.as.ee.component.ManagedReferenceMethodIntercep
> tor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(
> InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.
> proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(
> DelegatingInterceptorInvocationContext.java:92) [wildfly-weld-ejb-11.0.0.
> Final.jar:11.0.0.Final]
> at org.jboss.weld.interceptor.proxy.WeldInvocationContext.
> interceptorChainCompleted(WeldInvocationContext.java:98)
> [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
> at 

Re: [ovirt-users] How to import OVA from oVirt 4.2 to oVirt 4.2

2017-12-29 Thread Alex Bartonek
I used clonezilla and built the VM that way.  If you get the OVA thing working, 
cool..  but in the meantime, here's how I did it using Clonezilla.

https://www.unix1337.com/cloning-a-virtualbox-vm-to-ovirt-4-2/

Sent with [ProtonMail](https://protonmail.com) Secure Email.

>  Original Message 
> Subject: How to import OVA from oVirt 4.2 to oVirt 4.2
> Local Time: December 28, 2017 8:03 PM
> UTC Time: December 29, 2017 2:03 AM
> From: a...@unix1337.com
> To: users 
>
> Followed instructions here:
> https://www.ovirt.org/develop/release-management/features/virt/virt-v2v-integration/
> Section: Importing OVA Files from VMware
> Even though its not VMWare, its an ova file so I followed the steps there.  
> Ownership of the file is 777, wide open.
>
> Error after clicking load: Failed to load VM configuration from OVA file: 
> /media/primary/extra_space/CentOS7.ova
>
> Error in engine.log:
> 2017-12-28 20:03:04,910-06 INFO  
> [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (default 
> task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Executing Ansible command:  
> [/usr/bin/ansible-playbook, 
> --private-key=/etc/pki/ovirt-engine/keys/engine_id_rsa, 
> --inventory=/tmp/ansible-inventory4892490524555390378, 
> --extra-vars=ovirt_query_ova_path=/media/primary/extra_space/CentOS7.ova, 
> /usr/share/ovirt-engine/playbooks/ovirt-ova-query.yml] [Logfile: null]
> 2017-12-28 20:03:09,045-06 INFO  
> [org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (default 
> task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Ansible playbook command has 
> exited with value: 0
> 2017-12-28 20:03:09,046-06 ERROR 
> [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-38) 
> [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Query 'GetVmFromOvaQuery' failed: null
> 2017-12-28 20:03:09,046-06 ERROR 
> [org.ovirt.engine.core.bll.GetVmFromOvaQuery] (default task-38) 
> [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Exception: 
> java.lang.NullPointerException
> at 
> org.ovirt.engine.core.bll.GetVmFromOvaQuery.executeQueryCommand(GetVmFromOvaQuery.java:47)
>  [bll.jar:]
> at 
> org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:106)
>  [bll.jar:]
> at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) 
> [dal.jar:]
> at 
> org.ovirt.engine.core.bll.executor.DefaultBackendQueryExecutor.execute(DefaultBackendQueryExecutor.java:14)
>  [bll.jar:]
> at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:579) [bll.jar:]
> at org.ovirt.engine.core.bll.Backend.runQuery(Backend.java:548) [bll.jar:]
> at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source) [:1.8.0_151]
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  [rt.jar:1.8.0_151]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
> at 
> org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at 
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at 
> org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at 
> org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:92)
>  [wildfly-weld-ejb-11.0.0.Final.jar:11.0.0.Final]
> at 
> org.jboss.weld.interceptor.proxy.WeldInvocationContext.interceptorChainCompleted(WeldInvocationContext.java:98)
>  [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
> at 
> org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(WeldInvocationContext.java:117)
>  [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
> at 
> org.ovirt.engine.core.common.di.interceptor.LoggingInterceptor.apply(LoggingInterceptor.java:12)
>  [common.jar:]
> at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) [:1.8.0_151]
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  [rt.jar:1.8.0_151]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
> at 
> org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73)
>  [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
> at 
> org.jboss.weld.interceptor.proxy.WeldInvocationContext.invokeNext(WeldInvocationContext.java:83)
>  [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
> at 
> org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(WeldInvocationContext.java:115)
>  [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
> at org.jboss.weld.bean.InterceptorImpl.intercept(InterceptorImpl.java:108) 
> [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
> at 
> org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:82)
>  [wildfly-weld-ejb-11.0.0.Final.jar:11.0.0.Final]
> at 
> org.jboss.as.weld.interceptors.EjbComponentInterceptorSupport.delegateInterception(EjbComponentInterceptorSupport.java:60)
> at 

[ovirt-users] How to import OVA from oVirt 4.2 to oVirt 4.2

2017-12-28 Thread Alex Bartonek
Followed instructions here:
https://www.ovirt.org/develop/release-management/features/virt/virt-v2v-integration/
Section: Importing OVA Files from VMware
Even though its not VMWare, its an ova file so I followed the steps there.  
Ownership of the file is 777, wide open.

Error after clicking load: Failed to load VM configuration from OVA file: 
/media/primary/extra_space/CentOS7.ova

Error in engine.log:
2017-12-28 20:03:04,910-06 INFO  
[org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (default task-38) 
[b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Executing Ansible command:  
[/usr/bin/ansible-playbook, 
--private-key=/etc/pki/ovirt-engine/keys/engine_id_rsa, 
--inventory=/tmp/ansible-inventory4892490524555390378, 
--extra-vars=ovirt_query_ova_path=/media/primary/extra_space/CentOS7.ova, 
/usr/share/ovirt-engine/playbooks/ovirt-ova-query.yml] [Logfile: null]
2017-12-28 20:03:09,045-06 INFO  
[org.ovirt.engine.core.common.utils.ansible.AnsibleExecutor] (default task-38) 
[b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Ansible playbook command has exited with 
value: 0
2017-12-28 20:03:09,046-06 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] 
(default task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Query 
'GetVmFromOvaQuery' failed: null
2017-12-28 20:03:09,046-06 ERROR [org.ovirt.engine.core.bll.GetVmFromOvaQuery] 
(default task-38) [b596efbd-dc55-4ce4-b3b8-5e8ffac6e633] Exception: 
java.lang.NullPointerException
at 
org.ovirt.engine.core.bll.GetVmFromOvaQuery.executeQueryCommand(GetVmFromOvaQuery.java:47)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:106)
 [bll.jar:]
at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:33) 
[dal.jar:]
at 
org.ovirt.engine.core.bll.executor.DefaultBackendQueryExecutor.execute(DefaultBackendQueryExecutor.java:14)
 [bll.jar:]
at org.ovirt.engine.core.bll.Backend.runQueryImpl(Backend.java:579) [bll.jar:]
at org.ovirt.engine.core.bll.Backend.runQuery(Backend.java:548) [bll.jar:]
at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source) [:1.8.0_151]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
at 
org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at 
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
at 
org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:92)
 [wildfly-weld-ejb-11.0.0.Final.jar:11.0.0.Final]
at 
org.jboss.weld.interceptor.proxy.WeldInvocationContext.interceptorChainCompleted(WeldInvocationContext.java:98)
 [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
at 
org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(WeldInvocationContext.java:117)
 [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
at 
org.ovirt.engine.core.common.di.interceptor.LoggingInterceptor.apply(LoggingInterceptor.java:12)
 [common.jar:]
at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) [:1.8.0_151]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
at 
org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73)
 [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
at 
org.jboss.weld.interceptor.proxy.WeldInvocationContext.invokeNext(WeldInvocationContext.java:83)
 [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
at 
org.jboss.weld.interceptor.proxy.WeldInvocationContext.proceed(WeldInvocationContext.java:115)
 [weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
at org.jboss.weld.bean.InterceptorImpl.intercept(InterceptorImpl.java:108) 
[weld-core-impl-2.4.3.Final.jar:2.4.3.Final]
at 
org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:82)
 [wildfly-weld-ejb-11.0.0.Final.jar:11.0.0.Final]
at 
org.jboss.as.weld.interceptors.EjbComponentInterceptorSupport.delegateInterception(EjbComponentInterceptorSupport.java:60)
at 
org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:76)
at 
org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:88)
at 
org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
at 
org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at 
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
at