self.vdis = []
self.cli = None
- def vbdTypeCDDestroy(self):
- cd_vbds = self.host.minimalList("vbd-list",args="vm-uuid=%s type=CD" %
- (self.guest.getUUID()))
- for vbd in cd_vbds:
- if self.host.genParamGet("vbd",vbd,"currently-attached") == "true":
- self.cli.execute("vbd-unplug", "uuid=%s" % (vbd))
- self.cli.execute("vbd-destroy", "uuid=%s" % (vbd))
-
def prepare(self, arglist=None):
# Get a host to install on
self.host = self.getDefaultHost()
self.cli.execute("vdi-destroy uuid=%s" % (vdi))
except:
xenrt.TEC().warning("Exception destroying VDI %s" % (vdi))
- # Delete Virtual CD drive
- try:
- self.vbdTypeCDDestroy()
- except:
- xenrt.TEC().warning("Exception destroying Virtual CD")
del self.vdis[:]
class TC18842(_VDIPerVM):
args.append("cd-name=\"%s\"" % (isoname))
cli.execute("vm-cd-insert", string.join(args))
- def removeCD(self, device=None):
+ def removeCD(self):
"""Remove the CD device from the VM."""
cli = self.getCLIInstance()
args.append("uuid=%s" % (self.getUUID()))
cli.execute("vm-cd-eject", string.join(args))
-
-
def createVIF(self, eth=None, bridge=None, mac=None, plug=False):
if bridge:
self.enlightenedDrivers=True
self.execguest("umount /mnt")
xenrt.sleep(10)
- self.removeCD(device=device)
+ self.removeCD()
if reboot or ((self.distro and (self.distro.startswith("centos4") or self.distro.startswith("rhel4"))) and updateKernel):
# RHEL/CentOS 4.x update the kernel, so need to be rebooted