vagrant up fails - .vmdk cannot be closed because it is still attached to 1 virtual machines

Created on 18 Apr 2017  ยท  7Comments  ยท  Source: hashicorp/vagrant

Vagrant version

1.9.3
1.9.2
1.9.1
1.9.0 (I tried downgrading to fix the problem)

Host operating system

Windows 10 pro

Guest operating system

Amazon Linux AMI ported
https://atlas.hashicorp.com/mvbcoding/boxes/awslinux

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

  config.vm.box = "mvbcoding/awslinux"

  config.vm.network "private_network", ip: "192.168.40.40"

  config.vm.synced_folder ".", "/home/vagrant/web"

  # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  # such as FTP and Heroku are also available. See the documentation at
  # https://docs.vagrantup.com/v2/push/atlas.html for more information.
  # config.push.define "atlas" do |push|
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  # end

  config.vm.provider :virtualbox do |v|
    v.customize ["modifyvm", :id, "--memory", 2048]
  end
end

Debug output

https://gist.github.com/newms87/ac29acee23330dbf51cebe284a7a9d65

Expected behavior

I expected the vagrant up command to build a new virtual machine. The same vagrantfile works on my mac, I have tried on 2 different windows 10 machines and it fails with the same error. I have tried upgrading / downgrading Virtualbox and Vagrant, but nothing seems to make a difference.

I was able to successfully launch the instance in Virtualbox by manually launching the .vmdk. Using vagrant up fails.

Actual behavior

Vagrant fails to launch the virtual machine, and exits with the error message shown in the log

Steps to reproduce

  1. Install latest Vagrant 1.9.3 / Virtualbox on a Windows 10 Pro OS
  2. download the Vagrantfile provided
  3. run vagrant up
upstream

Most helpful comment

It works for my Windows 10 Pro 64bit following URL.

https://gist.github.com/gyohk/fa3deb4e850c697789b785d97bd5f605

I modified box.ovf like bellow. Just cut Id from "-guest~"

All 7 comments

I have so far been unable to reproduce this error. I've used a Win10 host and Ubuntu host with both working as expected. Would you try removing the box vagrant box remove mvbcoding/awslinux and running a vagrant up again. I'm wondering if you somehow got a bad box. Thanks!

@chrisroberts I've tried removing the box, tried completely uninstalling vagrant / virtualbox, and I even recently tried reinstalling windows all together, and starting from scratch. again having the same issue on my windows 10 laptop, and a windows 10 desktop. Something is weird about that box, but not sure what... I think I was able to get an old version of the box running, but currently unable to do so. You're saying you have the latest mvbcoding/awslinux running on win 10 with the latest version of vagrant / virtualbox?

@newms87 That is correct and I encountered no issues. Are you encountering similar errors with other boxes (like hashicorp/precise64)?

I had the exact same problem. Definitely something funky with that particular image. Got it working after changing to the realreadme/amazon2016.09 image instead of mvbcoding/awslinux

It works for my Windows 10 Pro 64bit following URL.

https://gist.github.com/gyohk/fa3deb4e850c697789b785d97bd5f605

I modified box.ovf like bellow. Just cut Id from "-guest~"

Closing this as it looks to be a box packaging issue. Cheers!

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanScherer picture StefanScherer  ยท  3Comments

tomhking picture tomhking  ยท  3Comments

hesco picture hesco  ยท  3Comments

DreadPirateShawn picture DreadPirateShawn  ยท  3Comments

bbaassssiiee picture bbaassssiiee  ยท  3Comments