Hello,

You can do 'virsh pool-create' on the same directory as your currently running Xen VMs' disks. 
That will make the disks visible to libvirt (prerequisite for them to be exportable to oVirt).

If libvirt doesn't see your stopped VMs when doing 'virsh list --all' you need to add the <UUID> parameter to their definition file
 - For that, as explain, first have your vm running, then do 'virsh dumpxml vmname'
You will see something like 
<domain type='xen' id='10'>
  <name>vmname</name>
  <uuid>7ecf52a5-3657-fc7a-b2e2-66edd4cf1b6c</uuid>

- Then, shutdown your vm and copy the UUID from the dump you just did in your vm definition file :
In /etc/xen/vmname put the missing line with the following format:
uuid = "7ecf52a5-3657-fc7a-b2e2-66edd4cf1b6c"

The vm should now be visible by libvirt when doing 'virsh list --all'


Guillaume Pavese

Ingénieur Système et Réseau
Interactiv-Group


On Sun, May 2, 2021 at 6:47 PM IT (Hema Arun) <HemaA@emiratesnbd.com> wrote:

Hi Guillaume,

 

Thank you for the reply back. I am so glad that I received a reply from someone.

I would like to try this option but I am not much familiar with virsh. I am having Oracle VM which is based on Xen. I don’t have a pool listed in “'virsh pool-list'"

 

My existing OracleVM has already the vmdisks folder mounted as a repository. When I do “virsh pool-create" from the Host, any idea will it conflict the existing repository?

 

Also to list the stopped VMs, what entry is to be added in the XML file. Can you help me with that.

 

Thanks a lot

 

Regards,

Hema Arun

Senior Technology Engineer

Group Information Technology - DevOps Chapter – Linux and MiddleWare Elastic Compute Platform

Teams:     @hemaa

 

From: Guillaume Pavese <guillaume.pavese@interactiv-group.com>
Sent: Wednesday, April 28, 2021 4:24 PM
To: IT (Hema Arun) <HemaA@emiratesnbd.com>
Cc: hemaa--- via Users <users@ovirt.org>; Strahil Nikolov <hunter86_bg@yahoo.com>
Subject: Re: [ovirt-users] Re: Import VM with Xen Based in Ovirt

 

CAUTION: This email originated from outside the Emirates NBD Group. Do not click links or open attachments unless you recognize the sender and know the content is safe.

I successfully imported xem vm to oVirt with the GUI

You need libvirt to be able to list the powered-off vm on the xen host first

 

What was missing for me at first was :

 

1) You need a libvirt pool referencing the path to VMs disks.

Verify that's not already the case with 'virsh pool-list',

 

Otherwise create it :

# cat vm-pool.xml
<pool type="dir">
<name>vm-pool</name>
<target>
          <path>/path/to/vmdisks</path>
</target>
</pool>

# virsh pool-create vm-pool.xml
# virsh pool-list ## Should list the newly created pool

 

2) Then each VM need an UUID present in its xml definition file. 

If not present, you can start the vm, do 'virsh dumpxml domainname' and get the UUID for the running VM,

then power it off and edit the xml to add this UUID line, that will make it visible to virsh when powered off. 

You can check now with : 'virsh list --all'

 

3) For a successful import I found that it's also necessary to 

- install a non xen kernel in the vm, 

- and have disk listed by UUIDs in /etc/fstab (maybe not necessary this last one)

 

 

Good luck,

 

 

Guillaume Pavese
Ingénieur Système et Réseau

Interactiv-Group

 

 

On Wed, Apr 28, 2021 at 7:38 PM Strahil Nikolov via Users <users@ovirt.org> wrote:

I think that you have to export the BM as OVA or convert it to KVM before being able to import via oVirt

 

Best Regards,

Strahil Nikolov

On Wed, Apr 28, 2021 at 12:36, hemaa--- via Users

<users@ovirt.org> wrote:

Any leads please?


_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@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/WB7KTXNCLD27R2II4XPMAFJUZEDZXOJA/

 

_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@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/IIFFJYN3LBR3WMDIVPAFGNZFRLTDD45L/

 

Ce message et toutes les pièces jointes (ci-après le “message”) sont établis à l’intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d’en avertir immédiatement l’expéditeur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L’internet ne permettant pas d’assurer l’intégrité de ce message . Interactiv-group (et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans l’hypothèse ou il aurait été modifié. IT, ES, UK. 

DISCLAIMER: "This e-mail message including any of its attachments is intended solely for the addressee(s) and may contain privileged information. If you are not the addressee or you have received this email message in error, please notify the sender who will remove your details from its database. You are not authorized to read, copy, disseminate, distribute or use this e-mail message or any attachment to it in any manner and must delete the email and destroy any hard copies of it. This e-mail message does not contain financial instructions or commitments of any kind. Any views expressed in this message are those of the individual sender and do not necessarily reflect the views of Emirates NBD PJSC, or any other related subsidiaries, entities or persons."

Ce message et toutes les pièces jointes (ci-après le “message”) sont établis à l’intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d’en avertir immédiatement l’expéditeur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L’internet ne permettant pas d’assurer l’intégrité de ce message . Interactiv-group (et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans l’hypothèse ou il aurait été modifié. IT, ES, UK.