apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.11k stars 1.11k forks source link

Incorrectly tagged storage pool selected while importing VM leading to failure #9670

Open vishesh92 opened 2 months ago

vishesh92 commented 2 months ago
ISSUE TYPE
COMPONENT NAME
Import VM
CLOUDSTACK VERSION
4.19.1.1
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

While importing VM from VMWare to KVM, if the specified disk offering has storage tags, import can fail due to mismatch of tags. This is due to the fact that while fetching the storage pool for importing the VM, we don't filter by tags of the disk offering.

STEPS TO REPRODUCE
1. Create 2 primary storage with different storage tags - t1,t2
2. Create a disk offering with tag t2
3. Import a VM from VMWare. Specify the disk offering for the disk.
EXPECTED RESULTS
VM import is successful with disk on the matching primary storage.
ACTUAL RESULTS
Import fails with error:
Disk offering: 68d5c1ae-e2da-4d52-a0c5-1361bf20cac1 is not compatible with storage pool: a5a10522-bc0e-3b8d-80d3-ab8ef4cb7fd9 of unmanaged disk: 19-3001

image