kiranchavala opened a new issue, #8652: URL: https://github.com/apache/cloudstack/issues/8652
ISSUE TYPE BUG Component Name Volume, CLOUDSTACK VERSION Cloudstack version 4.18, 4.19 SUMMARY Unable to attach a raw format volume to an instance running on KVM Steps to reproduce the issue 1. Upload a volume of format RAW  [tl.raw.zip](https://github.com/apache/cloudstack/files/14276105/tl.raw.zip) Cross check the DB , format is RAW ``` mysql> select * from volumes where id=8 \G;; *************************** 1. row *************************** id: 8 account_id: 2 domain_id: 1 pool_id: NULL last_pool_id: NULL instance_id: NULL device_id: NULL name: test2 uuid: c0db18a8-153a-465c-b23d-2ec148a9b0b1 size: 53687296 folder: NULL path: NULL pod_id: NULL data_center_id: 1 iscsi_name: NULL host_ip: NULL volume_type: DATADISK pool_type: NULL disk_offering_id: 6 template_id: NULL first_snapshot_backup_uuid: NULL recreatable: 0 created: 2024-02-13 10:19:15 attached: NULL updated: 2024-02-13 10:21:41 removed: NULL state: Uploaded chain_info: NULL update_count: 2 disk_type: NULL vm_snapshot_chain_size: NULL iso_id: NULL display_volume: 1 format: RAW min_iops: NULL max_iops: NULL hv_ss_reserve: NULL provisioning_type: thin external_uuid: NULL passphrase_id: NULL encrypt_format: NULL ``` 2. Try to attach the volume to any running vm Currently, Cloudstack doesn't list any running vm during volume attachment  The Backend api checks for vms which are only of Hypervisor type OVM http://10.0.33.170:8080/client/api/?zoneid=c931b7f8-6376-47b2-8082-c4bb3867e9bf&hypervisor=Ovm&account=admin&domainid=85081752-ca47-11ee-923a-1e00d900023d&state=Stopped&command=listVirtualMachines&response=json Not sure why Cloudstack limiting it to only OVM hypervisor. VM running Kvm hypervisor can have disk format in raw which can be attached easily I was able to attach to raw disk image to a kvm ``` virsh attach-disk 27 /root/ tl.raw vdb [root@ol8 ~]# virsh domblklist 27 Target Source ------------------------------------------------------------------------------------------ vda /mnt/71104366-f42e-3fff-80a4-716f643d9525/2cc496ea-27f3-47d0-b680-2796ac2ace15 vdb /root/tl.raw hdc - ``` Dumpxml ``` <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/root/tl.raw' index='4'/> <backingStore/> <target dev='vdb' bus='virtio'/> <alias name='virtio-disk1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> ``` Actual Behaviour Cloudstack is not supporting the attachement of raw disk format to KVM Hypersior Expected Behaviour Cloudstack should supporting the attachment of raw disk format to KVM Hypersior -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
