示例#1
0
 def createVHD(self, hdImage, filebase):
     diskType = self.getBuildData('vhdDiskType')
     if diskType == 'fixed':
         vhd.makeFlat(hdImage)
         os.rename(hdImage, filebase + '.vhd')
     elif diskType == 'difference':
         vhd.makeDynamic(hdImage, filebase + '-base.vhd')
         os.chmod(filebase + '-base.vhd', 0400)
         vhd.makeDifference(filebase + '-base.vhd', filebase + '.vhd',
                            self.basefilename + '-base.vhd')
     else:
         vhd.makeDynamic(hdImage, filebase + '.vhd')
示例#2
0
 def testFlat(self):
     vhd.makeFlat(self.fn)
     self.validateVHD(self.fn)