'Install a kernel on the remote host.
This will also invoke the guest\'s bootloader to set this
kernel as the default kernel.
Args:
host: the host on which to install the kernel
[kwargs]: remaining keyword arguments will be passed
to Bootloader.add_kernel()
Raises:
AutoservError: no package has yet been obtained. Call
DEBKernel.get() with a .deb package.'

def install(self, host, **kwargs):

    if (self.source_material is None):
        raise error.AutoservError('A    kernel    must    first    be    specified    via    get()')
    remote_tmpdir = host.get_tmp_dir()
    basename = os.path.basename(self.source_material)
    remote_filename = os.path.join(remote_tmpdir, basename)
    host.send_file(self.source_material, remote_filename)
    host.run(('dpkg    -i    "%s"' % (utils.sh_escape(remote_filename),)))
    host.run(('mkinitramfs    -o    "%s"    "%s"' % (utils.sh_escape(self.get_initrd_name()), utils.sh_escape(self.get_version()))))
    host.bootloader.add_kernel(self.get_image_name(), initrd=self.get_initrd_name(), **kwargs)
