def __init__(self, device,
                 cpu=GUESTSHELL_CPU, memory=GUESTSHELL_MEMORY,
                 disk=GUESTSHELL_DISK, log=None):

        self.device = device
        self.guestshell = partial(self.device.api.exec_opcmd, msg_type='cli_show_ascii')
        self.cli = self.device.api.exec_opcmd
        self.log = log or logging.getLogger()

        self.sz_max = {}
        self._get_sz_max()

        self.sz_need = _guestshell.Resources(
            cpu=min(cpu, self.sz_max['cpu']),
            memory=min(memory, self.sz_max['memory']),
            disk=min(disk, self.sz_max['disk']))

        self.sz_has = None
        self._state = None
        self.exists = False