]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Don't reset disk for container hosts
authorAlex Brett <alex.brett@citrix.com>
Tue, 13 Oct 2015 11:20:03 +0000 (12:20 +0100)
committerAlex Brett <alex.brett@citrix.com>
Tue, 13 Oct 2015 11:20:03 +0000 (12:20 +0100)
This was added when we had 'static' Xen-on-Xen hosts, it is not required in the new world and adds confusion

exec/xenrt/lib/xenserver/host.py
exec/xenrt/lib/xenserver/install.py
exec/xenrt/objects.py

index 154380450eac777b38d835aa721f85f4eb3730a2..1e193f9844315ede919af7d38324b3a8fc9bc70f 100755 (executable)
@@ -808,7 +808,6 @@ class Host(xenrt.GenericHost):
             self.i_upgrade = upgrade
             self.i_async = async
             self.i_suppackcds = suppackcds
-            self.resetDisk()
 
         if upgrade:
             # Default to existing values if not specified
index 40f466f22dd9a5a72c99318ea333a0d861b78883..fc67c0f72d7a327749040c235e6f1b04b36f3dc3 100644 (file)
@@ -61,7 +61,6 @@ class DundeeInstaller(object):
             self.host.i_upgrade = self.upgrade
             self.host.i_async = async
             self.host.i_suppackcds = suppackcds
-            self.host.resetDisk()
 
         if self.upgrade:
             # Default to existing values if not specified
index 73ae423fd0d381e9cab2d1c09d9b72feef99cd27..30b332f3dd8fb52f866cbdc8e1b23e2af25b3f9d 100755 (executable)
@@ -6804,19 +6804,6 @@ chain tftp://${next-server}/%s
             guest.existing(self.containerHost)
         return self.containerHost
 
-
-    def resetDisk(self):
-        """Reset the disk before installation if this is a Xen-On-Xen host, to stop thin provisioned VDIs fattening"""
-        container = self.lookup("CONTAINER_HOST", None)
-        if not container:
-            return
-        self.machine.powerctl.off()
-        host = self.getContainerHost()
-        guest = host.guests[self.machine.name]
-        guest.removeDisk(0)
-        disksize = int(self.lookup(("DISK_SIZE"), "50")) * xenrt.GIGA
-        guest.createDisk(sizebytes=disksize, sruuid="DEFAULT", bootable=True)
-
     def _parseNetworkTopology(self, topology, useFriendlySuffix=False):
         """Parse a network topology specification. Takes either a string
         containing XML or a XML DOM node."""