
Hi! We are developing a tool for automated vm rollouts and struggle with the disk ordering which seems to be completly random? ie. when creating a vm with 3 disks the order on the virtio scsi bus is different each time - which of course causes troubles when executing the next steps. Thanks for any hints on this!

To precise my question a little bit further: I'm looking for a way to add several virtio-scsi disks in a specific order via the rest-api and/or to retrieve information about the virtio-scsi disk adresses from vms via the rest-api. thanks!

Hi, did. you take a look ovirt SDK examples ?
Am 30.10.2018 um 16:52 schrieb Markus Schaufler <markus.schaufler@ooe.gv.at>:
To precise my question a little bit further: I'm looking for a way to add several virtio-scsi disks in a specific order via the rest-api and/or to retrieve information about the virtio-scsi disk adresses from vms via the rest-api.
thanks! _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/ZC34E6F3VOKDKC...

I did. And it didn't help me. I tried several requests like GET /ovirt-engine/api/datacenters/{datacenter:id}/storagedomains/{storagedomain:id}/disks/{disk:id} But there is no virtio-scsi information at all. I suppose the hosted engine itself does not need to know that information. The workflow would be to create the vm with all the disks over the rest-api and then to install it using a prepared iso with a kickstart file which holds the information about the disk layout, filesystem, etc. In order to prepare the kickstart file correctly I need to know which disk is ie. vda, vdb, ...

Hi, you can find the information here /ovirt-engine/api/vms/{vm:id}/diskattachments <disk_attachment href="/ovirt-engine/api/vms/fe3f36c3-8284-483c-8cdd-fd0690297bf8/diskattachments/165c72fb-39fe-4115-a0ad-05bf10113e11" id="165c72fb-39fe-4115-a0ad-05bf10113e11"> <active>true</active> <bootable>false</bootable> <interface>virtio_scsi</interface> <logical_name>/dev/sdb</logical_name> <pass_discard>false</pass_discard> <read_only>false</read_only> <uses_scsi_reservation>false</uses_scsi_reservation> <disk href="/ovirt-engine/api/disks/165c72fb-39fe-4115-a0ad-05bf10113e11" id="165c72fb-39fe-4115-a0ad-05bf10113e11"/> <vm href="/ovirt-engine/api/vms/fe3f36c3-8284-483c-8cdd-fd0690297bf8" id="fe3f36c3-8284-483c-8cdd-fd0690297bf8"/> </disk_attachment> Best regards, Lucie L. On 10/31/18 6:37 AM, Markus Schaufler wrote:
I did. And it didn't help me. I tried several requests like GET /ovirt-engine/api/datacenters/{datacenter:id}/storagedomains/{storagedomain:id}/disks/{disk:id}
But there is no virtio-scsi information at all. I suppose the hosted engine itself does not need to know that information.
The workflow would be to create the vm with all the disks over the rest-api and then to install it using a prepared iso with a kickstart file which holds the information about the disk layout, filesystem, etc. In order to prepare the kickstart file correctly I need to know which disk is ie. vda, vdb, ...
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/YUONEUWBM2UNCR...
-- Lucie Leistnerova Quality Engineer, QE Cloud, RHVM Red Hat EMEA IRC: lleistne @ #rhev-qe

In case of virtio_scsi, you should use following: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_{{ disk_id[:-16] }} Where disk_id[:-16], is id which you get from API, for example: /api/disks/cdb62095-62ba-4137-8fa0-6375748d8868 so the result path is: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_cdb62095-62ba-4137-8 Which is symlink to sda, sdb, sdX... On 10/30/18 12:01 PM, Markus Schaufler wrote:
Hi!
We are developing a tool for automated vm rollouts and struggle with the disk ordering which seems to be completly random? ie. when creating a vm with 3 disks the order on the virtio scsi bus is different each time - which of course causes troubles when executing the next steps.
Thanks for any hints on this! _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/SWKWTGERQAO4LK...
participants (4)
-
Lucie Leistnerova
-
Markus Schaufler
-
Oliver Riesener
-
Ondra Machacek