Vagrant: The command 'vagrant up' creates a VMDK disk instead of VDI

Created on 29 Apr 2014  ยท  6Comments  ยท  Source: hashicorp/vagrant

When I issue the command 'vagrant up', the disk created is a vmdk file. The base image is a VDI. I want to be able to use modifyhd in the Vagrantfile, but it does not work with VMDK; the disk needs to be in VDI format.

Can we make the command create a VDI file instead of VMDK?

Most helpful comment

What about http://crysol.github.io/recipe/2015-11-17/vagrant-vdi-virtual-disk-for-virtualbox.html

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "deb/jessie-i386"

  config.vm.provider :virtualbox do |vb|
    if ARGV[0] == "up" && ! File.exist?(HOME_DISK)
      vb.customize ['createhd',
                    '--filename', HOME_DISK,
                    '--format', 'VDI',
                    '--size', 50000]

      vb.customize ['storageattach', :id,
                    '--storagectl', 'SATA Controller',
                    '--port', 0,
                    '--device', 0,
                    '--type', 'hdd',
                    '--medium', HOME_DISK]
    end
  end
end

All 6 comments

This is VirtualBox itself doing this. Vagrant does not change the disk.

Is there a way to force it to VDI?

I don't know, sorry.

Thanks.

What about http://crysol.github.io/recipe/2015-11-17/vagrant-vdi-virtual-disk-for-virtualbox.html

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "deb/jessie-i386"

  config.vm.provider :virtualbox do |vb|
    if ARGV[0] == "up" && ! File.exist?(HOME_DISK)
      vb.customize ['createhd',
                    '--filename', HOME_DISK,
                    '--format', 'VDI',
                    '--size', 50000]

      vb.customize ['storageattach', :id,
                    '--storagectl', 'SATA Controller',
                    '--port', 0,
                    '--device', 0,
                    '--type', 'hdd',
                    '--medium', HOME_DISK]
    end
  end
end

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

OtezVikentiy picture OtezVikentiy  ยท  3Comments

DreadPirateShawn picture DreadPirateShawn  ยท  3Comments

lebogan picture lebogan  ยท  3Comments

rhencke picture rhencke  ยท  3Comments

barkingfoodog picture barkingfoodog  ยท  3Comments