I got this working per this answer:

There is a maximum
filesize<http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Personality-d1e2543.html>
that
you're allowed to provide when you're injecting "personality" files onto a
newly launched server, which you can find from the limits
endpoint<http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ProgrammaticLimits.html>.
Unfortunately, I don't see an easy way to query that from Vagrant, but I'd
expect that's what you're hitting. Mine is 1000 bytes!

What I'd recommend instead is to upload your public key as a named keypair
-- which you can do through the web UI or the
API<http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ServersKeyPairs-d1e2545.html>
--
and give Vagrant the keypair name:

config.vm.provider :rackspace do |rs|
  rs.username         = "xxxxxx"
  rs.api_key          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  rs.flavor           = "1 GB Performance"
  rs.image            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  rs.rackspace_region = "dfw"
  rs.server_name      = "test-vagrant"
  rs.key_name         = "mykey"
end



On Wed, May 7, 2014 at 1:52 PM, Nathan Nobbe <[email protected]> wrote:

> Hi gang,
> I'm starting to try vagrant/rackspace integration and running into trouble
> specifying a custom SSH keypair or perhaps have encountered a new bug in
> the Rackspace API. Can you take a look?
>
> Works without custom SSH-keypair
>
> Trying to get going with Vagrant and Rackspace, I was able to spool up a
> box with the dummy *.box* file and insecure Vagrant keys, following these
> instructions <https://github.com/mitchellh/vagrant-rackspace#quick-start>.
>
> Vagrant.configure("2") do |config|
>   #----------
>   # config.vm
>   #----------
>   config.vm.box     = "dummy"
>   config.vm.box_url = 
> "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box";
>
>   #------------------
>   # config rackspace
>   #------------------
>   config.vm.provider :rackspace do |rs|
>     rs.username         = "xxxxxx"
>     rs.api_key          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
>     rs.flavor           = "1 GB Performance"
>     rs.image            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
>     rs.rackspace_region = "dfw"
>     rs.server_name      = "test-vagrant"
>   end
> end
>
> Broken with custom SSH-keypair
>
> Trying to then specify a keypair with the following configuration
>
> Vagrant.configure("2") do |config|
>   #----------
>   # config.vm
>   #----------
>   config.vm.box     = "dummy"
>   config.vm.box_url = 
> "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box";
>
>   #-----------
>   # config.ssh
>   #-----------
>   config.ssh.private_key_path = "/Users/natedogg/.ssh/id_rsa"
>
>   #------------------
>   # config rackspace
>   #------------------
>   config.vm.provider :rackspace do |rs|
>     rs.username         = "xxxxxx"
>     rs.api_key          = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
>     rs.flavor           = "1 GB Performance"
>     rs.image            = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
>     rs.rackspace_region = "dfw"
>     rs.server_name      = "test-vagrant"
>     rs.public_key_path  = "/Users/natedogg/.ssh/id_rsa.pub"
>   end
> end
>
> vagrant up --provider=rackspace results in an HTTP 413 from Rackspace.
>
> ~/.vagrant.d/gems/gems/excon-0.31.0/lib/excon/middlewares/expects.rb:6:in
> `response_call': [HTTP 413 | ] Personality file content too long
> (Fog::Compute::RackspaceV2::ServiceError)
>
> Have Tried
>
>    - Different rs.flavor (512MB Standard Instance)
>    - Different installations of Vagrant
>
> Seems like this would be a common problem since insecure keys would be bad
> on a Rackspace box.
>
> thanks,
>
> -nathan
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Vagrant" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/vagrant-up/pvAejBv5Cjg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to