Example #1
0
def hostActionSetCosMemory(_context):
    '''Tells vmkctl to set the Console OS memory size.  This is also done
       in the bootloader, however vmkctl will nuke it upon rebooting.
    '''
    from precheck import getConsoleMemorySize  # avoid circular imports
    mem = vmkctl.MemoryInfoImpl()

    currentMemSize = mem.GetServiceConsoleReservedMem()
    cosMemory = getConsoleMemorySize(currentMemSize,
                                     mem.GetPhysicalMemory() / 1024 / 1024)
    mem.SetServiceConsoleReservedMem(cosMemory, True)
Example #2
0
def hostActionSetCosMemory(_context):
    '''Tells vmkctl to set the Console OS memory size.  This is also done
       in the bootloader, however vmkctl will nuke it upon rebooting.
    '''
    from precheck import getConsoleMemorySize # avoid circular imports
    mem = vmkctl.MemoryInfoImpl()

    currentMemSize = mem.GetServiceConsoleReservedMem()
    cosMemory = getConsoleMemorySize(currentMemSize,
                                     mem.GetPhysicalMemory() / 1024 / 1024)
    mem.SetServiceConsoleReservedMem(cosMemory, True)
Example #3
0
 def compareCosMemSize(memSize, expectedCosSize):
     physicalMem = memSize / 1024 / 1024
     assert precheck.getConsoleMemorySize(272, physicalMem) == expectedCosSize
Example #4
0
 def compareCosMemSize(memSize, expectedCosSize):
     physicalMem = memSize / 1024 / 1024
     assert precheck.getConsoleMemorySize(272, physicalMem) == expectedCosSize