'Gets path of kvm_stat and verifies if debugfs needs to be mounted.'

def initialize(self, **dargs):

    self.is_enabled = False
    kvm_stat_installed = False
    try:
        self.stat_path = os_dep.command('kvm_stat')
        kvm_stat_installed = True
    except ValueError:
        logging.error('Command    kvm_stat    not    present')
    if kvm_stat_installed:
        try:
            utils.run(('%s    --batch' % self.stat_path))
            self.is_enabled = True
        except error.CmdError as e:
            if ('debugfs' in str(e)):
                try:
                    utils.run('mount    -t    debugfs    debugfs    /sys/kernel/debug')
                except error.CmdError as e:
                    logging.error('Failed    to    mount    debugfs:\n%s', str(e))
            else:
                logging.error('Failed    to    execute    kvm_stat:\n%s', str(e))
