def create_controller_spec(client_factory, key):
    """
    Builds a Config Spec for the LSI Logic Controller's addition
    which acts as the controller for the virtual hard disk to be attached
    to the VM.
    """
    # Create a controller for the Virtual Hard Disk
    virtual_device_config = client_factory.create(
                            'ns0:VirtualDeviceConfigSpec')
    virtual_device_config.operation = "add"
    virtual_lsi = client_factory.create('ns0:VirtualLsiLogicController')
    virtual_lsi.key = key
    virtual_lsi.busNumber = 0
    virtual_lsi.sharedBus = "noSharing"
    virtual_device_config.device = virtual_lsi
    return virtual_device_config