Skip to content

Commit 195e823

Browse files
author
Prasanna Santhanam
committed
CLOUDSTACK-2882: Fix the diskdevice based on hypervisor
KVM > /dev/vda Xen > /dev/xvdd Signed-off-by: Prasanna Santhanam <tsp@apache.org>
1 parent 5233e32 commit 195e823

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/integration/smoke/test_vm_life_cycle.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,15 @@ def test_10_attachAndDetach_iso(self):
730730
cmd.virtualmachineid = self.virtual_machine.id
731731
self.apiclient.attachIso(cmd)
732732

733+
#determine device type from hypervisor
734+
hosts = Host.list(self.apiclient, id=self.virtual_machine.hostid)
735+
self.assertTrue(isinstance(hosts, list))
736+
self.assertTrue(len(hosts) > 0)
737+
self.debug("Found %s host" % hosts[0].hypervisor)
738+
739+
if hosts[0].hypervisor.lower() == "kvm":
740+
self.services["diskdevice"] = "/dev/vda"
741+
733742
try:
734743
ssh_client = self.virtual_machine.get_ssh_client()
735744
except Exception as e:

0 commit comments

Comments
 (0)