I have a primary Aegir project which I created using: $ ./aegir-up aegir. It runs just fine!

I created a second project using the aegir-up command (per Ergonlogic's help): $ ./aegir-up -t custom aegir2

Once that second project is in place and I go to the project and execute vagrant up, I get this error related to the rename of the vbox:
[hm] Importing base box 'debian-LAMP-6.0.4'...
[hm] Matching MAC address for NAT networking...
[hm] Clearing any previously set forwarded ports...
[hm] Fixed port collision for 22 => 2222. Now on port 2200.
[hm] Forwarding ports...
[hm] -- 22 => 2200 (adapter 1)
[hm] Creating shared folders metadata...
[hm] Clearing any previously set network interfaces...
[hm] Preparing network interfaces based on configuration...
[hm] Running any VM customizations...
A customization command failed:

["modifyvm", "5462ae4d-acc0-4878-be2d-1a96d5ddc926", "--name", "Aegir"]

The following error was experienced:

VBoxManage: error: Could not rename the directory '/Users/shrop/VirtualBox VMs/aegir2_1331055398' to '/Users/shrop/VirtualBox VMs/Aegir' to save the settings file (VERR_ALREADY_EXISTS)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface IMachine, callee nsISupports
Context: "SaveSettings()" at line 2300 of file VBoxManageModifyVM.cpp

Please fix this customization and try again.

I then edited the project's settings.rb and change the Vmname to "Aegir2" in the Hm class. It was "Aegir" and I think that was the conflict.

That worked, but I then noticed that the user password reset link started with http://aegir.local and not http://aegir2.aegir.local as it should per ergonlogic. I then edited the Hostname link in class Hm of settings.rb to have the proper hostname.

I also had to change Subnet = "11" in the settings.rb Class Vm.

So the above got me close, but even with /etc/hosts set to point aegir2.aegir.local to 192.168.11.10, I still didn't get hostmaster via a browser. I had to do the following to get the vhost for Aegir to work for me:

$ vagrant ssh
$ sudo su aegir
$ mv /var/aegir/config/server_master/apache/vhost.d/aegir.local /var/aegir/config/server_master/apache/vhost.d/aegir2.aegir.local
Exited out of the aegir user session
$ sudo /etc/init.d/apache2 restart

So that is what I had to do to get things working. I will be glad to test and submit patches, but I am still learning many of the tools involved, including Vagrant and Puppet so I am not sure where things need to go at this point.

Let me know if you need additional info.

Thanks
shrop

Comments

ergonlogic’s picture

IIRC, you're running on OSX, for which I don't have a test platform, so I won't be able to debug directly. Also, I assume you meant './aegir-up-init' as the command to initialize a project.

Anyway, I used 'sed' to do some find/replace stuff in those files (http://drupalcode.org/project/aegir-up.git/blob/HEAD:/lib/scripts/aegir-...). There's also a small snippet of perl a little higher up in the script (http://drupalcode.org/project/aegir-up.git/blob/HEAD:/lib/scripts/aegir-...) Could you check if sed & perl are installed on OSX by default? If not, I'll add it to the docs.

The work-around is pretty much as you describe:

  • In settings.rb:
      Hostname  = "<project_name>.aegir.local"
      Vmname    = "Aegir(<project_name>)"
      Subnet    = "11"  # or whatever
  • In manifests/hm.pp:
      # For now it's best to specify the front-end URL here, though this should no
      # longer be necessary once http://drupal.org/node/1459126 lands
      $aegir_hostmaster_url = '<project_name>.aegir.local'

By doing this before running 'vagrant up' you shouldn't have to mess with the vhosts, as this'll be done properly during the installation of Aegir itself.

shrop’s picture

Thanks!

1. sed and perl are both in OS X by default. I checked to be sure.
2. I can be your OS X tester. No worries there.
3. With the info you provided, I think I can work on figuring out what is going on. I will be glad to submit patches from there.

Thanks!
shrop

ergonlogic’s picture

Status: Active » Postponed (maintainer needs more info)

1. Hmm, I still suspect it's those lines though; I wonder why they aren't working... What shell does OS X use by default? I thought BASH.
2. Great! Thank you!
3. Please let me know, as I'd like to make sure Aegir-up can work on any Unix-like OS.

ergonlogic’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Aegir-up has been re-written in PHP as a Drush extension. This is a drastic enough change that I doubt this issue will remain; at least, in it's present form.

So, I'm closing this, but feel free to post a new issue if you come across something similar again.