diff --git a/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb b/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb index 08760a3..a650500 100644 --- a/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb +++ b/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb @@ -13,7 +13,12 @@ def list_vm_volumes(vm_id) interface = attachment.interface attachment_disk.bootable = bootable if attachment_disk.bootable.nil? attachment_disk.interface = interface if attachment_disk.interface.nil? - attachment_disk.storage_domain = attachment_disk.storage_domains[0].id + attachment_disk.storage_domain = begin + attachment_disk.storage_domains.first&.id + rescue StandardError => e + Fog::Logger.warning("Error parsing attachment_disk.storage_domains - #{e}. Fallback to 0") + 0 + end ovirt_attrs attachment_disk end end