mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2882: Fix the diskdevice based on hypervisor
KVM > /dev/vda Xen > /dev/xvdd Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
5233e3216b
commit
195e823b10
@ -730,6 +730,15 @@ class TestVMLifeCycle(cloudstackTestCase):
|
|||||||
cmd.virtualmachineid = self.virtual_machine.id
|
cmd.virtualmachineid = self.virtual_machine.id
|
||||||
self.apiclient.attachIso(cmd)
|
self.apiclient.attachIso(cmd)
|
||||||
|
|
||||||
|
#determine device type from hypervisor
|
||||||
|
hosts = Host.list(self.apiclient, id=self.virtual_machine.hostid)
|
||||||
|
self.assertTrue(isinstance(hosts, list))
|
||||||
|
self.assertTrue(len(hosts) > 0)
|
||||||
|
self.debug("Found %s host" % hosts[0].hypervisor)
|
||||||
|
|
||||||
|
if hosts[0].hypervisor.lower() == "kvm":
|
||||||
|
self.services["diskdevice"] = "/dev/vda"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ssh_client = self.virtual_machine.get_ssh_client()
|
ssh_client = self.virtual_machine.get_ssh_client()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user