Failed to run "bosh aws create" in AWS

Skip to first unread message


Jan 8, 2015, 7:43:34 AM1/8/15
Hi, there

I am following this guide to deploy cloudfoundry on AWS.

However, when I run command "bosh aws create", I met the error as follows :
I am wondering why bosh try to delete "The dhcpOptions 'dopt-90b2a8f2' ", the dhcpOptions is bound to default vpc. (please see the snapshot attached)
In this case, do I need to delete the default VPC to continue? If no, how to avoid the error? thanks.

bosh aws create output:

paas1@paas1-OptiPlex-9020:~/bosh-workspace/bootstrap$ bosh aws create
Executing migration CreateKeyPairs
allocating 1 KeyPair(s)
Executing migration CreateVpc
creating internet gateway
creating security groups: open, bosh, bat, cf, web
creating subnets: bosh1, bosh_rds1, cf_elb1, cf_rds1, services_rds1, cf1, services1, bosh_rds2, cf_elb2, cf_rds2, services_rds2
  Making subnet bosh1
  Making subnet bosh_rds1
  Making subnet cf_elb1
  Making subnet cf_rds1
  Making subnet services_rds1
  Making subnet cf1
  Making subnet services1
  Making subnet bosh_rds2
  Making subnet cf_elb2
  Making subnet cf_rds2
  Making subnet services_rds2
    Making routing table for bosh1
    Binding default route to igw
    Making routing table for cf_elb1
    Binding default route to igw
    Making routing table for cf1
    Binding default route to cf_nat_box1
    Making routing table for services1
    Binding default route to cf_nat_box1
    Making routing table for cf_elb2
    Binding default route to igw
creating load balancers: cfrouter
adding CNAME record for *
creating DHCP options
details in S3 receipt: aws_vpc_receipt and file: aws_vpc_receipt.yml
/home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-sdk-1.44.0/lib/aws/core/client.rb:375:in `return_or_raise': The dhcpOptions 'dopt-90b2a8f2' has dependencies and cannot be deleted. (AWS::EC2::Errors::DependencyViolation)
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-sdk-1.44.0/lib/aws/core/client.rb:476:in `client_request'
    from (eval):3:in `delete_dhcp_options'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/aws-sdk-1.44.0/lib/aws/ec2/dhcp_options.rb:78:in `delete'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/vpc.rb:171:in `create_dhcp_options'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/migrations/20130412004642_create_vpc.rb:46:in `execute'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migration.rb:21:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:75:in `block in run_migrations'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:74:in `each'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:74:in `run_migrations'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh_cli_plugin_aws/migrator.rb:13:in `migrate'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.2809.0/lib/bosh/cli/commands/aws.rb:130:in `create'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/lib/cli/command_handler.rb:57:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/lib/cli/runner.rb:56:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/lib/cli/runner.rb:16:in `run'
    from /home/paas1/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bosh_cli-1.2809.0/bin/bosh:7:in `<top (required)>'
    from /home/paas1/.rbenv/versions/1.9.3-p194/bin/bosh:23:in `load'
    from /home/paas1/.rbenv/versions/1.9.3-p194/bin/bosh:23:in `<main>'

2015-01-08 20:42:24 snapshotvpc.png


Apr 9, 2015, 5:15:49 AM4/9/15
Hi There, 

Did you manage to resolve your issue? I am having the exact same problem this morning!

Alex Blease

Apr 9, 2015, 6:46:06 AM4/9/15
So unfortunately I did not locate the root cause of this problem. 

To get around this. We tore down all the infrastructure left behind from running the failing 'bash aws create' command. Apart from the bosh VPC and, BOSH and SHH security groups. 

I then I set the bosh VPC 'DHCP Options set' to default, and created a new gem set on my local machine, and reinstalled the bosh_cli, bosh_cli_plugin_micro and bosh_cli_plugin_aws gems. 

If anyone knows a better to get around this problem do let us know :)

Dr Nic Williams

Apr 9, 2015, 11:52:03 AM4/9/15
Perhaps for future attempts at bootstrapping CF on AWS (with a smaller 6 vm footprint for CF) try

To unsubscribe from this group and stop receiving emails from it, send an email to

Sylvain Gibier

Apr 16, 2015, 6:31:44 AM4/16/15
I had the same issue in the past - it's due to AWS defaulting all new AWS account to be VPC type, as opposed to EC2 one. The bosh_cli_plugin_aws gem was written with the EC2 approach. I went through modifying the bosh_cli_plugin_aws gem to not deleting the default dhcp options, and adding additional availability zone too, well nowadays I have a AWS formation to setup the VPC itself.

Reply all
Reply to author
0 new messages