diff --git a/app/models/foreman_fog_proxmox/proxmox_images.rb b/app/models/foreman_fog_proxmox/proxmox_images.rb index ddc486ea0..e19173d08 100644 --- a/app/models/foreman_fog_proxmox/proxmox_images.rb +++ b/app/models/foreman_fog_proxmox/proxmox_images.rb @@ -48,9 +48,14 @@ def templates volumes = [] nodes.each do |node| storages(node.node).each do |storage| + # fetches volumes of QEMU servers for images volumes += storage.volumes.list_by_content_type('images') + + # fetches volumes of KVM containers for images + volumes += storage.volumes.list_by_content_type('rootdir') end end + # for creating image, only list volumes which are templated volumes.select(&:template?) end