def METHOD_NAME(vmxml):
    """
    Prepare the guest with different virtio devices to test
    :params vmxml: the vm xml
    """
    vmxml.remove_all_device_by_type(device_type)
    vmxml.sync()
    # Need to use shared memory for filesystem device
    if device_type == "filesystem":
        vm_xml.VMXML.set_memoryBacking_tag(vmxml.vm_name, access_mode="shared",
                                           hpgs=False)
        vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
    # Prepare device xml by using device function, for example, Disk().
    device_obj = device_type.capitalize()
    if device_type == "input":
        device_xml = eval(device_obj)(input_type)
    else:
        device_xml = eval(device_obj)()
    device_xml.setup_attrs(**device_dict)
    return device_xml, vmxml