mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix fsvm-init.yml to detect virtio-scsi in kvm (#11070)
* fix fsvm-init.yml to detect virtio-scsi in kvm * Update fsvm-init.yml to handle universal block device case.
This commit is contained in:
parent
a87c5c2b3a
commit
f62b85dffe
@ -30,14 +30,9 @@ write_files:
|
||||
}
|
||||
|
||||
get_block_device() {
|
||||
if [ "$HYPERVISOR" == "kvm" ]; then
|
||||
BLOCK_DEVICE="vdb"
|
||||
elif [ "$HYPERVISOR" == "xenserver" ]; then
|
||||
BLOCK_DEVICE="xvdb"
|
||||
elif [ "$HYPERVISOR" == "vmware" ]; then
|
||||
BLOCK_DEVICE="sdb"
|
||||
else
|
||||
log "Unknown hypervisor"
|
||||
BLOCK_DEVICE=$(lsblk -dn -o NAME,TYPE | awk '$2=="disk"{print $1}' | tail -n 1)
|
||||
if [ -z "$BLOCK_DEVICE" ]; then
|
||||
log "Unknown data disk"
|
||||
exit 1
|
||||
fi
|
||||
echo "$BLOCK_DEVICE"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user