Optional: Redirect Default KVM VM Storage location. Ex: /data/gv0/vms on thor
# <<<<< Broken with HCI.. not sure process here yet….. hold off till oVirt HCI engine issues worked out on how it enables new VM definitions to be shared if one or more nodes goes down 2020-09-17 >>>>
# Pool default XML configuration edited. virsh pool-edit default
# For now each KVM host has shared folder linked. Not sure how with out restart of libvirtd to get peers to easily see configuration file. Can run import command but need to test. # To enable multiple KVM nodes in a shared environment to be able to take over the roles of peers in the event of one failing the XML files stored in /etc/libvirt/qemu/ need to be on a shared device. # Ex: Move medusa /etc/libvirt/qemu/ to be on gluster share volume space /data/gv0/vms/medusa systemctl stop libvirtd mkdir -p /media/vmstore/qemu mv -f /etc/libvirt/qemu/* /media/vmstore/qemu ln -s /media/vmstore/qemu /etc/libvirt/qemu
systemctl daemon-reload systemctl start libvirt-guests.service systemctl enable libvirt-guests.service systemctl status libvirt-guests.service |
On Mon, Sep 21, 2020 at 9:11 AM Jeremey Wise <jeremey.wise@gmail.com> wrote:
>
>
> I rebuilt my lab environment. And their are four or five VMs that really would help if I did not have to rebuild.
>
> oVirt as I am now finding when it creates infrastructure, sets it out such that I cannot just use older means of placing .qcow2 files in folders and .xml files in other folders.... and they show up on services restarting.
>
> How do I import VMs from files?
You did not share the oVirt version, so I'm assuming 4.4.
The simplest way is to upload the qcow2 images to oVirt, and create a new
VM with the new disk.
On the hypervisor where the files are located, install the required packages:
dnf install ovirt-imageio-client python3-ovirt-engine-sdk4
And upload the image:
python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/upload_disk.py \
--engine-url https://my.engine/ \
--username admin@internal \
--password-file /path/to/password/file \
--cafile /path/to/cafile \
--sd-name my-storage-domain \
--disk-sparse \
/path/to/image.qcow2
This will upload the file in qcow2 format to whatever type of storage you
have. You can change the format if you like using --disk-format. See --help
for all the options.
We also support importing from libvirt, but for this you need to have the vm
defined in libvirt. If you don't have this, It will probably be easier to upload
the images and create a new vm in oVirt.
Nir
> I found this article but implies VM is running: https://www.ovirt.org/develop/release-management/features/virt/KvmToOvirt.html
> https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/administration_guide/sect-adding_external_providers#Adding_KVM_as_an_External_Provider
>
> I need a way to import a file. Even if it means temporarily hosting on "KVM on one of the hosts to then bring in once it is up.
>
>
> Thanks
> --
>
> penguinpages
> _______________________________________________
> 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/6LSE4MNEBGODIRPVAQCUNBO2KGCCQTM5/