def remove_virtual_slot_cmd(lpar_id, slot_num):
    """
    Generate HMC command to remove virtual slot.

    :param lpar_id: LPAR id
    :param slot_num: virtual adapter slot number
    :returns: A HMC command to remove the virtual slot.
    """

    return ("chhwres -r virtualio --rsubtype eth -o r -s %(slot)s "
            "--id %(lparid)s" %
            {'slot': slot_num, 'lparid': lpar_id})