# File lib/deltacloud/drivers/condor/condor_driver.rb, line 125
        def create_instance(credentials, image_id, opts={})
          # User data should contain this Base64 encoded configuration:
          #
          # $config_server_ip:[$uuid]
          #
          # $config_server - IP address of Configuration Server to use (eg. 192.168.1.1)
          # $uuid          - UUID to use for instance (will be used for ConfServer <-> DC
          #                  API communication)
          # $otp           - One-time-password
          #
          user_data = opts[:user_data] ? Base64.decode64(opts[:user_data]) : nil
          if user_data
            config_server_address, vm_uuid, vm_otp = opts[:user_data].strip.split(';')
            if vm_uuid.nil? and vm_otp.nil?
              vm_uuid = config_server_address
              config_server_address = nil
            end
          end
          vm_uuid ||= UUIDTools::UUID.random_create.to_s
          vm_otp ||= vm_uuid[0..7]
          new_client(credentials) do |condor|
            config_server_address ||= condor.ip_agent.address
            image = images(credentials, :id => image_id).first
            hardware_profile = hardware_profiles(credentials, :id => opts[:hwp_id] || 'small').first
            instance = condor.launch_instance(image, hardware_profile, {
              :name => opts[:name] || "i-#{Time.now.to_i}",
              :config_server_address => config_server_address,
              :uuid => vm_uuid,
              :otp => vm_otp,
            }).first
            store(:uuid, vm_uuid, instance.id)
            raise "Error: VM not launched" unless instance
            instance(credentials, { :id => instance.id, :password => vm_otp })
          end
        end