diff --git a/lisa/tools/hyperv.py b/lisa/tools/hyperv.py index 9ff7507eeb..a9dd7f7a5f 100644 --- a/lisa/tools/hyperv.py +++ b/lisa/tools/hyperv.py @@ -82,6 +82,8 @@ def get_vm_disks(self, name: str) -> List[VMDisk]: force_run=True, output_json=True, ) + if not output: + return [] # above command returns a list of disks if there are multiple disks. # if there is only one disk, it returns a single disk but not a list. # so convert the output to a list if it is not already a list