I took a look inside centos/7's image and it has
# Generated by NetworkManager
nameserver 192.168.122.1
there. But after I do vagrant up it has
# Generated by NetworkManager
search Dlink
nameserver 10.0.2.3
Do you know what changes that? Is there a way to avoid it? This thing basically introduces this bug.
Well, it must be when the network starts that this file is generated. For CentOS this means service network start, for Debian, service networking restart. But I wonder, why for vagrant VMs, it uses virtualbox's DNS server IP address, but when I install the OS manually, it uses my router's IP address...
UPD Changing /etc/resolv.conf and restarting the network brings back virtualbox's DNS server for vagrant VMs, and my router, for non-vagrant ones. Has it to do with some VM settings? Does vagrant set any settings that has to do with this?
$ diff -u <(VBoxManage showvminfo d7) <(VBoxManage showvminfo vagrant-vm_default_1445671341010_37621)
--- /dev/fd/63 2015-10-24 10:39:35.407970094 +0300
+++ /dev/fd/62 2015-10-24 10:39:35.407970094 +0300
@@ -1,11 +1,11 @@
-Name: d7
+Name: vagrant-vm_default_1445671341010_37621
Groups: /
-Guest OS: Debian (64-bit)
-UUID: d4a7d364-a2be-4046-8b1a-8fff6b4e6dea
-Config file: /home/yuri/VirtualBox VMs/d7/d7.vbox
-Snapshot folder: /home/yuri/VirtualBox VMs/d7/Snapshots
-Log folder: /home/yuri/VirtualBox VMs/d7/Logs
-Hardware UUID: d4a7d364-a2be-4046-8b1a-8fff6b4e6dea
+Guest OS: Ubuntu (64-bit)
+UUID: faf2f473-44b3-49f3-b84c-d5a66dd28b76
+Config file: /home/yuri/VirtualBox VMs/vagrant-vm_default_1445671341010_37621/vagrant-vm_default_1445671341010_37621.vbox
+Snapshot folder: /home/yuri/VirtualBox VMs/vagrant-vm_default_1445671341010_37621/Snapshots
+Log folder: /home/yuri/VirtualBox VMs/vagrant-vm_default_1445671341010_37621/Logs
+Hardware UUID: faf2f473-44b3-49f3-b84c-d5a66dd28b76
Memory size: 512MB
Page Fusion: off
VRAM size: 12MB
@@ -19,9 +19,9 @@
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode: message and menu
-Boot Device (1): Floppy
-Boot Device (2): DVD
-Boot Device (3): HardDisk
+Boot Device (1): HardDisk
+Boot Device (2): Not Assigned
+Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
@@ -33,7 +33,7 @@
VT-x VPID: on
VT-x unr. exec.: on
Paravirt. Provider: Legacy
-State: running (since 2015-10-24T07:33:17.056000000)
+State: running (since 2015-10-24T07:22:24.797000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
@@ -47,24 +47,16 @@
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
-Storage Controller Name (0): IDE
-Storage Controller Type (0): PIIX4
+Storage Controller Name (0): SATAController
+Storage Controller Type (0): IntelAhci
Storage Controller Instance Number (0): 0
-Storage Controller Max Port Count (0): 2
-Storage Controller Port Count (0): 2
+Storage Controller Max Port Count (0): 30
+Storage Controller Port Count (0): 1
Storage Controller Bootable (0): on
-Storage Controller Name (1): SATA
-Storage Controller Type (1): IntelAhci
-Storage Controller Instance Number (1): 0
-Storage Controller Max Port Count (1): 30
-Storage Controller Port Count (1): 2
-Storage Controller Bootable (1): on
-IDE (1, 0): Empty
-SATA (0, 0): /home/yuri/VirtualBox VMs/d7/d7.vdi (UUID: de6c6b66-9513-4599-b5be-ddba46a147a4)
-SATA (1, 0): /home/yuri/VirtualBox VMs/d7/Snapshots/{c95325f6-8db2-4340-8df8-20502112d330}.vmdk (UUID: c95325f6-8db2-4340-8df8-20502112d330)
-NIC 1: MAC: 08002780208D, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
+SATAController (0, 0): /home/yuri/VirtualBox VMs/vagrant-vm_default_1445671341010_37621/box-disk1.vmdk (UUID: 5929dece-b0d2-4e9d-8c24-75d09fcfe41d)
+NIC 1: MAC: 08002748A43B, 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 1 Rule(0): name = ssh, protocol = tcp, host ip = , host port = 2001, guest ip = , guest port = 22
+NIC 1 Rule(0): name = ssh, protocol = tcp, host ip = 127.0.0.1, host port = 2222, guest ip = , guest port = 22
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
@@ -72,19 +64,19 @@
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
-Pointing Device: USB Tablet
+Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
LPT 1: disabled
LPT 2: disabled
-Audio: enabled (Driver: PulseAudio, Controller: AC97, Codec: STAC9700)
-Clipboard Mode: disabled
+Audio: disabled
+Clipboard Mode: Bidirectional
Drag and drop Mode: disabled
Session name: headless
Video mode: 720x400x0 at 0,0 enabled
VRDE: disabled
-USB: enabled
+USB: disabled
EHCI: disabled
XHCI: disabled
@@ -102,14 +94,16 @@
Bandwidth groups: <none>
-Shared folders: <none>
+Shared folders:
+
+Name: 'vagrant', Host path: '/home/yuri/_/vagrant-vm' (machine mapping), writable
VRDE Connection: not active
Clients so far: 0
Video capturing: not active
Capture screens: 0
-Capture file: /home/yuri/VirtualBox VMs/d7/d7.webm
+Capture file: /home/yuri/VirtualBox VMs/vagrant-vm_default_1445671341010_37621/vagrant-vm_default_1445671341010_37621.webm
Capture dimensions: 1024x768
Capture rate: 512 kbps
Capture FPS: 25
@@ -117,11 +111,16 @@
Guest:
Configured memory balloon size: 0 MB
-OS type: Debian_64
-Additions run level: 0
+OS type: Linux26_64
+Additions run level: 2
+Additions version: 4.3.26_Ubuntu r98988
+
Guest Facilities:
-No active facilities.
+Facility "VirtualBox Base Driver": active/running (last update: 2015/10/24 07:22:37 UTC)
+Facility "VirtualBox System Service": active/running (last update: 2015/10/24 07:22:44 UTC)
+Facility "Seamless Mode": not active (last update: 2015/10/24 07:22:37 UTC)
+Facility "Graphics Mode": not active (last update: 2015/10/24 07:22:37 UTC)
Most helpful comment
Well, to answer my question, yes,
vagrantdoes enable dns proxy.