Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant reload has serious Ubuntu 17+ issues #9726

Closed
martinandersson opened this issue Apr 25, 2018 · 3 comments · Fixed by #9824
Closed

Vagrant reload has serious Ubuntu 17+ issues #9726

martinandersson opened this issue Apr 25, 2018 · 3 comments · Fixed by #9824

Comments

@martinandersson
Copy link

martinandersson commented Apr 25, 2018

vagrant up works both for VirtualBox and VMware on Ubuntu 17 and Ubuntu 18, but fails miserably on vagrant reload, except for one particular combination: Vagrant version 2.0.2 and VirtualBox. vagrant reload is completely broken for the VMware provider.

In what follows, two Ubuntu boxes have been used: pristine/ubuntu-budgie-17 (v. 10.0.2) and pristine/ubuntu-budgie-18 (v. 4.0.2). They are well documented and nothing fancy has gone into the boxes except the regular setup, such as authorizing Vagrant's insecure public key. The one thing to note is that the Ubuntu 17 box was fitted with packages net-toolsand ifupdown in order to fix this issue.

The box with Ubuntu 17 supports only VirtualBox and this explains why, in the following report, the combination Ubuntu 17 and VMware was never tested. But then, VMware is pretty much broken on Vagrant and I would not expect this combination to work. The Ubuntu 18 box supports both VirtualBox and VMware.

For each of the Ubuntu boxes and for each of the providers (except VMware + Ubuntu 17 as previously noted), a Vagrantfile with- and a Vagrantfile without hostname and private network was used.

The Vagrantfile without private network looks like this:

Vagrant.configure("2") do |config|
config.vm.box = "pristine/ubuntu-budgie-1?-x64"
end

..where the question mark has been replaced with a 7 or 8, depending on which box was tested.

With a hostname and private network added, the Vagrantfile used looks like this:

Vagrant.configure("2") do |config|
config.vm.box = "pristine/ubuntu-budgie-1?-x64"
config.vm.hostname = "kalle"
config.vm.network "private_network", ip: "192.168.33.10"
end

The test procedure was to type vagrant up (for VMware) or vagrant up --provider virtualbox followed by a vagrant reload.

Three different outcomes could be observed:

Success: Everything works just as expected. After each vagrant command, it was confirmed that the default workdir folder synchronization worked, a hostname was configured and Internet was reachable.

Fail 1: The first vagrant up command works with the correct anticipated state (folder sync, hostname and Internet), but, the succeeding vagrant reload gets stuck and eventually times out. After timeout, the machine is running but the folder synchronization does not work, hostname has not been configured and Internet is not reachable. This is the last lines of the terminal output before the timeout happens:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key

Fail 2: Is only applicable for the VMware provider with the same guest-result as fail 1 (i.e., vagrant up works, but vagant reload fails and the guest machine is not configured properly) but with a different terminal output on vagrant reload:

==> default: Enabling and configuring shared folders...
    default: -- D:/Martin/GitHub/box-ubuntu-budgie-18-x64/test-vm: /vagrant
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["addSharedFolder", "C:/Users/Martin/VMware VMs/ff2998d0-4897-440c-8a3e-7ade6001cc29/packer-vmware-iso.vmx", "-vagrant", "D:\\Martin\\GitHub\\box-ubuntu-budgie-18-x64\\test-vm", {:notify=>[:stdout, :stderr]}]

Stdout: Error: Already exists

Stderr:

It might be worth noting, that after the failed vagrant reload, Folder /vagrant exists on the guest machine.

In the following report, it will become evident that - as previously noted - Vagrant totally lack adequate VMware support. VirtualBox used to work, but Vagrant 2.0.3 broke this for both Ubuntu 17 and 18.

VirtualBox Ubuntu 17 and 18

Vagrant 2.0.2

No network configuration: Not tested (works on Vagrant 2.0.4)
With network configuration: Success

Vagrant 2.0.3

No network configuration: Not tested (works on Vagrant 2.0.4)
With network configuration: Fail 1

Vagrant 2.0.4

No network configuration: Success
With network configuration: Fail 1

VMware Ubuntu 18

For all Vagrant versions, 2.0.2 til 2.0.4; with network configuration yields Fail 2.

For all Vagrant versions, 2.0.2 til 2.0.4; no network configuration yields Fail 1.

All the tests was performed on host machine Windows 10 x64. VMware provider plugin installed is version 5.0.4. Please do not ask for log files which stores all kinds of sensitive information. I have documented the problem well enough.

Worth noting is that the "fail 1" state does sound a lot like this issue.

@chrisroberts
Copy link
Member

Note for later: Guest tooling detection needs to be refined when multiple options are available.

@briancain briancain modified the milestones: 2.1, 2.1.1 May 3, 2018
@briancain briancain self-assigned this May 3, 2018
@chrisroberts chrisroberts modified the milestones: 2.1.1, 2.1.2 May 4, 2018
briancain added a commit to briancain/vagrant that referenced this issue May 10, 2018
…nager

Prior to this commit, when setting up private networks on Ubuntu using
netplan, it assumed that the guest was using systemd, the suggested
default tool to manage networking, and did not take into account devices
that could be managed with NetworkManager. This commit fixes that by
looking at the devices managed on the guest to see if its managed by
NetworkManager, and if so, use that renderer for netplan instead of
networkd.
@martinandersson
Copy link
Author

The latest Vagrant (2.1.2) improves on things, but does not solve the problem.

Every other time, I witness "fail 2" as described above using VMware and Ubuntu 18.10.

I also observe a new problem with VMware and Ubuntu 18.10; Vagrant getting stuck on the initial vagrant up. The last few lines that can be read from the output:

==> default: Machine booted and ready!
==> default: Setting hostname...
==> default: Configuring network adapters within the VM...

At this point in time, hostname and network seems to be configured just fine, but since Vagrant got stuck, he never manages to setup folder synchronization.

Bottom line is that I wouldn't consider this issue as being closed. It helped a bit, but not all the way.

@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants