[ovirt-users] Creating disks works for XML (sort of) but not JSON
https://ovirt.github.io/ovirt-engine-api-model/4.5/#services/disks POST /ovirt-engine/api/disks mydisk 1048576 cow First off as a field is ridiculous because there is no JSON equivalent I can determine. Next Why is this a good XML structure? MyStorageDomainName But this is not 7aaa2d33-c7ba-46f0-b4fd-4cf48a724e8d Next when trying to create a new disk directly on a VM POST /ovirt-engine/api/vms/396bc7c9-ed4a-4209-b9fd-f93e9a47cd31/diskattachments Name works for XML: true virtio true Boot Disk cow mybootdisk 1048576 MyStorageDomainName But Not for JSON { "bootable": "true", "interface": "virtio", "active": "true", "disk": { "description": "Boot Disk", "format": "cow", "name": "mybootdisk", "provisioned_size": "1048576", "storage_domains": { "storage_domain": { "name": "MyStorageDomainName" } } } } And ID fails for both I think the REST API for creating disks needs some real help. They are deprecating the only one that actually works right /ovirt-engine/api/storagedomains/123/disks Does anyone have the correct syntax in JSON, because the available documentation is almost entirely devoid of any, AND the server response. wait for it.. "The remote server returned an error: (400) Bad Request." .that is all ___ 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/KOUBL2E42LBQ3ZW7VV42Q6FVK6MZ6VCN/
[ovirt-users] Re: Create Vm without Storage Domain
On Wed, Mar 20, 2024 at 12:06 PM Shafi Mohammed wrote: > Hi Guys , > > Thanks for the Info . > > I am trying to migrate my data from local to Storage domain . But it > requires twice the effort in terms of space and time to copy the data to > the local file system and then upload the disk to it . > > I created a storage domain and tried to expose it to the NBD server to > write the data from the source Vm disk . But I'm facing an nbd > permission issue . Even a copy or write is restricted . > > Actual Command > qemu-nbd -f qcow2 /rhev/data-center/mnt/192.168.108.27: > _storage/d62b04f8-973f-4168-9e69-1f334a4968b6/images/cd6b9fc4-ef8a-4f40-ac8d-f18d355223d0/d2a57e6f-029e-46cc-85f8-ce151d027dcb > > > > *qemu-nbd: Failed to blk_new_open > '/rhev/data-center/mnt/192.168.108.27:_storage/d62b04f8-973f-4168-9e69-1f334a4968b6/images/cd6b9fc4-ef8a-4f40-ac8d-f18d355223d0/d2a57e6f-029e-46cc-85f8-ce151d027dcb': > Could not open > '/rhev/data-center/mnt/192.168.108.27:_storage/d62b04f8-973f-4168-9e69-1f334a4968b6/images/cd6b9fc4-ef8a-4f40-ac8d-f18d355223d0/d2a57e6f-029e-46cc-85f8-ce151d027dcb': > Permission denied* > Please suggest me if Ovirt has any API to open a disk from a > storage domain and write data to it > You are trying to reinvent ovirt-img. Try it: https://www.ovirt.org/media/ovirt-img-v8.pdf ___ 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/BK2RAMNASXIYOBKXSXG7JLN7ZPL2SI4R/
[ovirt-users] Re: [External] : Create Vm without Storage Domain
Hi Shafi, A Storage Domain in oVirt is like a Storage Pool in a stand-alone KVM host. To create a virtual disk on a stand-alone KVM host, a storage pool must exist where you create the virtual disk. The same for oVirt, to upload or to create a virtual disk, a Storage Domain must exist. After uploading the disk to the Storage Domain, you can attach it to a VM. Marcos From: Shafi Mohammed Sent: Wednesday, March 20, 2024 3:50 AM To: users@ovirt.org Subject: [External] : [ovirt-users] Create Vm without Storage Domain Hi Team , I am new to Ovirt and have been using KVM off late . I use libvirt (virt or virsh commands) to create and manage Vms . I have a pretty basic doubt in OVirt . I was trying to migrate a VM from my KVM host .I copied my .qcow2 virtual disk to the ovirt host. I am able to create a Vm after uploading the disk to a new storage domain and create a VM with the storage domain. Can I create a VM without using a storage domain ( By directly attaching the copied .qcow2 disk ) to the Vm Regards Shafi ___ 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/NZ7DPK7FP5M2XR4IANSFC4YNKUFBMJQT/
[ovirt-users] Re: Create Vm without Storage Domain
Hi Guys , Thanks for the Info . I am trying to migrate my data from local to Storage domain . But it requires twice the effort in terms of space and time to copy the data to the local file system and then upload the disk to it . I created a storage domain and tried to expose it to the NBD server to write the data from the source Vm disk . But I'm facing an nbd permission issue . Even a copy or write is restricted . Actual Command qemu-nbd -f qcow2 /rhev/data-center/mnt/192.168.108.27: _storage/d62b04f8-973f-4168-9e69-1f334a4968b6/images/cd6b9fc4-ef8a-4f40-ac8d-f18d355223d0/d2a57e6f-029e-46cc-85f8-ce151d027dcb *qemu-nbd: Failed to blk_new_open '/rhev/data-center/mnt/192.168.108.27:_storage/d62b04f8-973f-4168-9e69-1f334a4968b6/images/cd6b9fc4-ef8a-4f40-ac8d-f18d355223d0/d2a57e6f-029e-46cc-85f8-ce151d027dcb': Could not open '/rhev/data-center/mnt/192.168.108.27:_storage/d62b04f8-973f-4168-9e69-1f334a4968b6/images/cd6b9fc4-ef8a-4f40-ac8d-f18d355223d0/d2a57e6f-029e-46cc-85f8-ce151d027dcb': Permission denied* Please suggest me if Ovirt has any API to open a disk from a storage domain and write data to it Regards Shafi On Wed, Mar 20, 2024 at 3:23 PM Nathanaël Blanchet wrote: > Le mercredi 20 mars 2024 à 12:19 +0530, Shafi Mohammed a écrit : > > Hi Team , > Hi > > > > I am new to Ovirt and have been using KVM off late . I use libvirt > > (virt or virsh commands) to create and manage Vms . > Welcome to oVirt community > > > > I have a pretty basic doubt in OVirt . I was trying to migrate a VM > > from my KVM host .I copied my .qcow2 virtual disk to the ovirt host. > you can do this but why not using the import native tool from KVM > provided into the UI? > > > > I am able to create a Vm after uploading the disk to a new storage > > domain and create a VM with the storage domain. > > > > Can I create a VM without using a storage domain ( By directly > > attaching the copied .qcow2 disk ) to the Vm > Storage domains are the local or shared LVM based space where all vms > and related metadata are stored. You can even configure a storage > domain as a backup domain because it contains enough informations > outside of the postgres database. SD is a masterpiece of oVirt so when > you upload a single disk, it is stored to the default storage domain. > That said, regular libvirt/kvm uses as well a SD equivalent by storing > qcow2 images into the default /var/lib/libvirt/images/ > > > > Regards > > Shafi > > ___ > > 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/EFLZW5PPZEQEJ44WEWOWNYVLFISGV3Z5/ > > -- > Nathanaël Blanchet > > Administrateur Systèmes et Réseaux > Service Informatique et REseau (SIRE) > Département des systèmes d'information > 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 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/UHE6KQUX4REHOY3NNSPN7UJCHFHWPQB6/
[ovirt-users] Re: Create Vm without Storage Domain
Le mercredi 20 mars 2024 à 12:19 +0530, Shafi Mohammed a écrit : > Hi Team , Hi > > I am new to Ovirt and have been using KVM off late . I use libvirt > (virt or virsh commands) to create and manage Vms . Welcome to oVirt community > > I have a pretty basic doubt in OVirt . I was trying to migrate a VM > from my KVM host .I copied my .qcow2 virtual disk to the ovirt host. you can do this but why not using the import native tool from KVM provided into the UI? > > I am able to create a Vm after uploading the disk to a new storage > domain and create a VM with the storage domain. > > Can I create a VM without using a storage domain ( By directly > attaching the copied .qcow2 disk ) to the Vm Storage domains are the local or shared LVM based space where all vms and related metadata are stored. You can even configure a storage domain as a backup domain because it contains enough informations outside of the postgres database. SD is a masterpiece of oVirt so when you upload a single disk, it is stored to the default storage domain. That said, regular libvirt/kvm uses as well a SD equivalent by storing qcow2 images into the default /var/lib/libvirt/images/ > > Regards > Shafi > ___ > 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/EFLZW5PPZEQEJ44WEWOWNYVLFISGV3Z5/ -- Nathanaël Blanchet Administrateur Systèmes et Réseaux Service Informatique et REseau (SIRE) Département des systèmes d'information 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 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/YE42GL52N3FR5X72NKMXIXQILDEDV4Z7/