Closed scervera closed 11 years ago
Can you read me the "/etc/networking/interfaces" file of each of the guest VMs?
Also, can you screenshot the network config for the bridged interface for each of the VMs?
Here is /etc/network/interfaces for hostname "web":
vagrant@web:~$ cat /etc/network/interfaces
auto lo iface lo inet loopback
auto eth0 iface eth0 inet dhcp
auto eth1 iface eth1 inet dhcp post-up route del default dev $IFACE
Here is /etc/network/interfaces for hostname "stage":
vagrant@stage:~$ cat /etc/network/interfaces
auto lo iface lo inet loopback
auto eth0 iface eth0 inet dhcp
auto eth1 iface eth1 inet dhcp post-up route del default dev $IFACE
These are the screenshots for the VirtualBox network config for hostname "stage":
These are the screenshots for the VirtualBox network config for hostname "web":
Thank you for your help.
Have you tried altering the mac addresses on the one of the VMs? So that they were not the same on both VMs.
Yes, that is odd that for adapter 1 in each VM they are identical. Let me see if changing that on one makes any difference. But it seems like a potential bug if these MAC addresses would be generated with the same exact MAC address.
I am unable to modify the MAC address in the VirtualBox GUI for either VM for Adapter 1.
If you can shutdown and power off the VM then you will then be able to regenerate a new MAC address for the adapter.
OK. Thanks. I powered off, changed the MAC address for Adapter 1 of hostname "stage", powered on again, and tried to vagrant ssh stage
and now I am unable to connect. I receive the following message:
ssh_exchange_identification: Connection closed by remote host
Have a look at http://superuser.com/questions/342473/vagrant-ssh-fails-with-virtualbox#6477331
On 3 February 2013 18:16, scervera notifications@github.com wrote:
OK. Thanks. I powered off, changed the MAC address for Adapter 1 of hostname "stage", powered on again, and tried to vagrant ssh stage and now I am unable to connect. I receive the following message:
ssh_exchange_identification: Connection closed by remote host
— Reply to this email directly or view it on GitHubhttps://github.com/mitchellh/vagrant/issues/1351#issuecomment-13050985.
Can you confirm that the NAT address of Adapter 1 is or is not supposed to have the same MAC addresses across two different VMs? If this is NOT the expected behavior, then I have identified a bug. If it IS expected behavior, then I'm not sure why I should be changing the MAC address of Adapter 1. Do you understand my concern?
The MAC address is supposed to be a unique identifier for network interfaces. See http://en.wikipedia.org/wiki/MAC_address for more info.
So I think it would be best to avoid MAC address clashes across Network Adapters on VMs that appear on the same network. I suspected that the reason that you were getting the same IP was because the MAC addresses were the same.
On 3 February 2013 18:54, scervera notifications@github.com wrote:
Can you confirm that the NAT address of Adapter 1 is or is not supposed to have the same MAC addresses across two different VMs? If this is NOT the expected behavior, then I have identified a bug. If it IS expected behavior, then I'm not sure why I should be changing the MAC address of Adapter 1. Do you understand my concern?
— Reply to this email directly or view it on GitHubhttps://github.com/mitchellh/vagrant/issues/1351#issuecomment-13051641.
Right, I get that MAC addresses should be unique. I just wasn't sure if that was the intended functionality of VirtualBox (for whatever reason). So then, it is confirmed that Vagrant or VirtualBox (at least in my environment) are assigning a duplicate MAC address to two different VMs. This is a bug. Please confirm.
In addition, to test out @RobertKielty's theory on duplicate MAC addresses causing the same IP address to be assigned, I removed the second VM from my multivm Vagrantfile, destroyed the original VMs, and brought up the single VM. When the single VM was brought up, it still had the same 10.0.2.15 IP address. In any case, my DHCP scope is serving a 192.168.0.0 network range. So I'm not sure where this 10.0.2.15 address is coming from. It must be some kind of Vagrant or VirtualBox default. Again, this seems to demonstrate that there is a bug. Please verify.
@mitchellh, I was wondering if you have any feedback or ideas on this case? Also, I'd like to know if the intent of Vagrant/Virtual box is primarily as a development tool and not something intended to be used for production server environments. Thanks for your help.
I think the issue lies with VirtualBox. If I create a vm without vagrant from scratch, create an appliance from it, and then import the appliance using the option to reinitialize the MAC address, I get a VM that only has an IP address with local loop back address. I don't even get the 10.0.2.15 address. Also if I take. Vagrant produced VM and try to change the MAC addresses on the NAT and Bridged interface in VirtualBox, the VM is no longer responsive. Anyone else experienced this? I have tried multiple Macs running 10.7 and 10.8.
Please see this VirtualBox forum discussion: https://forums.virtualbox.org/viewtopic.php?f=8&t=53021&p=243055&hilit=Mac+address#p243055
It appears that there is in fact an issue with Ubuntu VMs on Mac OS 10.8.2. I have confirmed that the recommendation in the forum link above works. It is recommended to edit the /etc/udev/rules.d/70-persistent-net.rules or delete the rules altogether because Linux will rebuild them on the next boot. I have confirmed that deleting the rules AFTER the Mac address is changed in VirtualBox works on both the NAT interface (adapter 1) and the Bridged interface (adapter 2).
I'm closing this issue as I believe it lies with VirtualBox.
I have a multi-vm configuration in which both VMs are configured for bridged networking. When the VMs are brought up and ifconfig is run on each, they both show the same address 10.0.2.15 for en0 and do not show an address from the dhcp scope configured for the network. The host is running 10.8.2 and the VMs are Ubuntu 12.04. I am running Vagrant 1.0.6.
I have spent hours trying to troubleshoot this. Configuration seems painfully simple, but I am not getting the desired and expected results. I may have run across a bug, but I would expect that many others would have complained about this issue. I have not found many reports at this time.
Here is my Vagrantfile:
-- mode: ruby --
vi: set ft=ruby :
Vagrant::Config.run do |config|
All Vagrant configuration is done here. The most common configuration
options are documented and commented below. For a complete reference,
please see the online documentation at vagrantup.com.
config.vm.define :web do |web_config| web_config.vm.customize ["modifyvm", :id, "--name", "web", "--memory", "512"] web_config.vm.box = "ubuntu1204_ruby193" web_config.vm.host_name = "web" web_config.vm.forward_port 22, 2222, :auto => true web_config.vm.forward_port 80, 4567, :auto => true web_config.vm.network :bridged, :bridge => "en0: Ethernet" web_config.vm.share_folder "puppet", "/etc/puppet", "../mdn_ops" end
config.vm.define :stage do |stage_config| stage_config.vm.customize ["modifyvm", :id, "--name", "stage", "--memory", "512"] stage_config.vm.box = "ubuntu1204_ruby193" stage_config.vm.host_name = "stage" stage_config.vm.forward_port 22, 2222, :auto => true stage_config.vm.network :bridged, :bridge => "en0: Ethernet" stage_config.vm.share_folder "puppet", "/etc/puppet", "../mdn_ops" end end
Here is a screen shot of one of my vm network settings in VirtualBox after vagrant up:
Here is the vagrant debug log when bringing up the VMs:
quark:mdn adm1n$ VAGRANT_LOG=DEBUG vagrant up >> vagrant_debug INFO global: Vagrant version: 1.0.6 INFO vagrant:
vagrant
invoked: ["up"] DEBUG vagrant: Creating Vagrant environment INFO environment: Environment initialized (#Vagrant::Environment:0x000001009a3480) INFO environment: - cwd: /Users/adm1n/Dropbox/puppet/mdn INFO environment: Home path: /Users/adm1n/.vagrant.d INFO plugin: Searching and loading any available plugins... INFO plugin: Loaded 0 plugins. DEBUG vagrant: Loading environment INFO environment: Loading configuration... DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb" DEBUG loader: Populating proc cache for "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb" DEBUG loader: Load procs for pathname: #Pathname:/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb DEBUG loader: Set :root = #Pathname:/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile DEBUG loader: Populating proc cache for #Pathname:/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile DEBUG loader: Load procs for pathname: #Pathname:/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm] DEBUG loader: Loading from: default (evaluating) DEBUG loader: Loading from: root (evaluating) DEBUG loader: Configuration loaded successfully DEBUG environment: Loading configuration for VM: web DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb" DEBUG loader: Set :root = #Pathname:/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile DEBUG loader: Set :vm = [#Proc:0x000001008dc858@/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile:9] DEBUG loader: Populating proc cache for #Proc:0x000001008dc858@/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile:9 DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm] DEBUG loader: Loading from: default (cache) DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: vm (evaluating) DEBUG loader: Configuration loaded successfully DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb" DEBUG loader: Set :box = #Pathname:/Users/adm1n/.vagrant.d/boxes/ubuntu1204_ruby193/Vagrantfile DEBUG loader: Populating proc cache for #Pathname:/Users/adm1n/.vagrant.d/boxes/ubuntu1204_ruby193/Vagrantfile DEBUG loader: Load procs for pathname: #Pathname:/Users/adm1n/.vagrant.d/boxes/ubuntu1204_ruby193/Vagrantfile DEBUG loader: Set :root = #Pathname:/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile DEBUG loader: Set :vm = [#Proc:0x000001008dc858@/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile:9] DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm] DEBUG loader: Loading from: default (cache) DEBUG loader: Loading from: box (evaluating) DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: vm (cache) DEBUG loader: Configuration loaded successfully DEBUG environment: Loading configuration for VM: stage DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb" DEBUG loader: Set :root = #Pathname:/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile DEBUG loader: Set :vm = [#Proc:0x000001008dc5d8@/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile:19] DEBUG loader: Populating proc cache for #Proc:0x000001008dc5d8@/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile:19 DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm] DEBUG loader: Loading from: default (cache) DEBUG loader: Loading from: box (cache) DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: vm (evaluating) DEBUG loader: Configuration loaded successfully DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.6/config/default.rb" DEBUG loader: Set :box = #Pathname:/Users/adm1n/.vagrant.d/boxes/ubuntu1204_ruby193/Vagrantfile DEBUG loader: Set :root = #Pathname:/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile DEBUG loader: Set :vm = [#Proc:0x000001008dc5d8@/Users/adm1n/Dropbox/puppet/mdn/Vagrantfile:19] DEBUG loader: Loading configuration in order: [:default, :box, :home, :root, :vm] DEBUG loader: Loading from: default (cache) DEBUG loader: Loading from: box (cache) DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: vm (cache) DEBUG loader: Configuration loaded successfully INFO cli: CLI: [] "up" [] DEBUG cli: Invoking command class: Vagrant::Command::Up [] DEBUG up: 'Up' each target VM... INFO datastore: Created: /Users/adm1n/Dropbox/puppet/mdn/.vagrant INFO virtualbox_base: VBoxManage path: VBoxManage INFO subprocess: Starting process: ["VBoxManage", "--version"] DEBUG subprocess: Selecting on IO DEBUG subprocess: stdout: 4.2.6r82870DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000 DEBUG subprocess: Exit status: 0 DEBUG virtualbox: Finding driver for VirtualBox version: 4.2.6 INFO virtualbox: Using VirtualBox driver: Vagrant::Driver::VirtualBox_4_2 INFO virtualbox_base: VBoxManage path: VBoxManage INFO vm: Loading guest: linux INFO virtualbox_base: VBoxManage path: VBoxManage INFO subprocess: Starting process: ["VBoxManage", "--version"] DEBUG subprocess: Selecting on IO DEBUG subprocess: stdout: 4.2.6r82870
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999 DEBUG subprocess: Exit status: 0 DEBUG virtualbox: Finding driver for VirtualBox version: 4.2.6 INFO virtualbox: Using VirtualBox driver: Vagrant::Driver::VirtualBox_4_2 INFO virtualbox_base: VBoxManage path: VBoxManage INFO vm: Loading guest: linux INFO up: Creating: web DEBUG hosts: Host path search classes: [Vagrant::Hosts::Windows, Vagrant::Hosts::Arch, Vagrant::Hosts::Gentoo, Vagrant::Hosts::Fedora, Vagrant::Hosts::OpenSUSE, Vagrant::Hosts::FreeBSD, Vagrant::Hosts::Linux, Vagrant::Hosts::BSD] INFO hosts: Host class: Vagrant::Hosts::BSD INFO runner: Running action: up INFO warden: Calling action: #Vagrant::Action::General::CheckVirtualbox:0x00000102a6a088 INFO subprocess: Starting process: ["VBoxManage", "list", "hostonlyifs"] DEBUG subprocess: Selecting on IO DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000 DEBUG subprocess: Exit status: 0 INFO warden: Calling action: #Vagrant::Action::General::Validate:0x00000102a6a060 INFO warden: Calling action: #Vagrant::Action::VM::CheckAccessible:0x00000102a6a038 INFO warden: Calling action: #Vagrant::Action::VM::CheckBox:0x00000102a6a010 INFO warden: Calling action: #Vagrant::Action::VM::Import:0x00000102a69fe8 INFO interface: info: Importing base box 'ubuntu1204_ruby193'... INFO subprocess: Starting process: ["VBoxManage", "import", "/Users/adm1n/.vagrant.d/boxes/ubuntu1204_ruby193/box.ovf"] DEBUG subprocess: Selecting on IO DEBUG subprocess: stderr: 0%... DEBUG subprocess: stderr: 10%...20%...30%...40%...50%...60%...70%...80%...90%... DEBUG subprocess: stderr: 100%
DEBUG subprocess: stderr: Interpreting /Users/adm1n/.vagrant.d/boxes/ubuntu1204_ruby193/box.ovf...
DEBUG subprocess: stderr: OK.
DEBUG subprocess: stderr: 0%... DEBUG subprocess: stderr: 10%...
INFO interface: info: Progress: 10% DEBUG subprocess: stderr: 20%...
INFO interface: info: Progress: 20% DEBUG subprocess: stderr: 30%...
INFO interface: info: Progress: 30% DEBUG subprocess: stderr: 40%...
INFO interface: info: Progress: 40% DEBUG subprocess: stderr: 50%...
INFO interface: info: Progress: 50% DEBUG subprocess: stderr: 60%...
INFO interface: info: Progress: 60% DEBUG subprocess: stderr: 70%...
INFO interface: info: Progress: 70% DEBUG subprocess: stderr: 80%...
INFO interface: info: Progress: 80% DEBUG subprocess: stderr: 90%...
INFO interface: info: Progress: 90% DEBUG subprocess: stderr: 100%
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31985 DEBUG subprocess: Exit status: 0 DEBUG subprocess: Disks: vmdisk1 42949672960 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized box-disk1.vmdk -1 -1"; use "list ostypes" to list all possible values)
1: Suggested VM name "template_1359261084"
(change with "--vsys 0 --vmname ")
2: Number of CPUs: 1
(change with "--vsys 0 --cpus ")
3: Guest memory: 512 MB
(change with "--vsys 0 --memory ")
4: Network adapter: orig NAT, config 3, extra slot=0;type=NAT
5: Network adapter: orig HostOnly, config 3, extra slot=1;type=HostOnly
6: CD-ROM
(disable with "--vsys 0 --unit 6 --ignore")
7: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 7 --ignore")
8: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 8 --ignore")
9: SATA controller, type AHCI
(disable with "--vsys 0 --unit 9 --ignore")
10: Hard disk image: source image=box-disk1.vmdk, target path=/Users/adm1n/VirtualBox VMs/template_1359261084/box-disk1.vmdk, controller=9;channel=0
(change target path with "--vsys 0 --unit 10 --disk path";
disable with "--vsys 0 --unit 10 --ignore")
Successfully imported the appliance.
Virtual system 0: 0: Suggested OS type: "Ubuntu" (change with "--vsys 0 --ostype
INFO subprocess: Starting process: ["VBoxManage", "list", "vms"] DEBUG subprocess: Selecting on IO DEBUG subprocess: stdout: "railroad.thecerveras.com" {7853b3d1-82e2-4266-b24b-960ddea889ce} "template_1359261084" {f746aadb-5045-4864-8e19-e8527371455d}
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000 DEBUG subprocess: Exit status: 0 INFO datastore: Committing data to data store: /Users/adm1n/Dropbox/puppet/mdn/.vagrant INFO virtualbox_base: VBoxManage path: VBoxManage INFO subprocess: Starting process: ["VBoxManage", "--version"] DEBUG subprocess: Selecting on IO DEBUG subprocess: stdout: 4.2.6r82870
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000 DEBUG subprocess: Exit status: 0 DEBUG virtualbox: Finding driver for VirtualBox version: 4.2.6 INFO virtualbox: Using VirtualBox driver: Vagrant::Driver::VirtualBox_4_2 INFO virtualbox_base: VBoxManage path: VBoxManage INFO subprocess: Starting process: ["VBoxManage", "showvminfo", "f746aadb-5045-4864-8e19-e8527371455d"] DEBUG subprocess: Selecting on IO DEBUG subprocess: stdout: Name: template_1359261084 Groups: / Guest OS: Ubuntu UUID: f746aadb-5045-4864-8e19-e8527371455d Config file: /Users/adm1n/VirtualBox VMs/template_1359261084/template_1359261084.vbox Snapshot folder: /Users/adm1n/VirtualBox VMs/template_1359261084/Snapshots Log folder: /Users/adm1n/VirtualBox VMs/template_1359261084/Logs Hardware UUID: f746aadb-5045-4864-8e19-e8527371455d Memory size: 512MB Page Fusion: off VRAM size: 12MB CPU exec cap: 100% HPET: off Chipset: piix3 Firmware: BIOS Number of CPUs: 1 Synthetic Cpu: off CPUID overrides: None Boot menu mode: message and menu Boot Device (1): DVD Boot Device (2): HardDisk Boot Device (3): Not Assigned Boot Device (4): Not Assigned ACPI: on IOAPIC: off PAE: off Time offset: 0ms RTC: UTC Hardw. virt.ext: on Hardw. virt.ext exclusive: off Nested Paging: on Large Pages: on VT-x VPID: on State: powered off (since 2013-01-27T04:33:15.000000000) Monitor count: 1 3D Acceleration: off 2D Video Acceleration: off Teleporter Enabled: off Teleporter Port: 0 Teleporter Address: Teleporter Password: Tracing Enabled: off Allow Tracing to Access VM: off Tracing Configuration: Autostart Enabled: off Autostart Delay: 0 Storage Controller Name (0): IDE Controller Storage Controller Type (0): PIIX4 Storage Controller Instance Number (0): 0 Storage Controller Max Port Count (0): 2 Storage Controller Port Count (0): 2 Storage Controller Bootable (0): on Storage Controller Name (1): SATA Controller Storage Controller Type (1): IntelAhci Storage Controller Instance Number (1): 0 Storage Controller Max Port Count (1): 30 Storage Controller Port Count (1): 1 Storage Controller Bootable (1): on IDE Controller (1, 0): Empty SATA Controller (0, 0): /Users/adm1n/VirtualBox VMs/template_1359261084/box-disk1.vmdk (UUID: f66e9df0-e697-4031-8f25-845a888685ee) NIC 1: MAC: 080027D7DA05, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64) NIC 2: MAC: 080027CD6BD8, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none NIC 3: disabled NIC 4: disabled NIC 5: disabled NIC 6: disabled NIC 7: disabled NIC 8: disabled Pointing Device: PS/2 Mouse Keyboard Device: PS/2 Keyboard UART 1: disabled UART 2: disabled LPT 1: disabled LPT 2: disabled Audio: disabled Clipboard Mode: disabled Drag'n'drop Mode: disabled VRDE: disabled USB: disabled EHCI: disabled
USB Device Filters: