hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.02k stars 4.42k forks source link

Unable to resize SATA Disk with vmware_desktop Provider #13290

Open whiskered01 opened 8 months ago

whiskered01 commented 8 months ago

Debug output

==> vagrant: You have requested to enabled the experimental flag with the following features: ==> vagrant: ==> vagrant: Features: disks ==> vagrant: ==> vagrant: Please use with caution, as some of the features may not be fully ==> vagrant: functional yet. Bringing machine 'default' up with 'vmware_desktop' provider... ==> default: Cloning VMware VM: 'bento/ubuntu-22.04'. This can take some time... ==> default: Checking if box 'bento/ubuntu-22.04' version '202309.08.0' is up to date... ==> default: Verifying vmnet devices are healthy... ==> default: Preparing network adapters... ==> default: Deleting the VM... C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/cap/disk.rb:147:in setup_disk': undefined methodmatch' for nil:NilClass (NoMethodError)

        if current_disk["filename"].match(/\\w+-(f\\d*|s\\d*|flat|delta).vmdk/)
                                   ^^^^^^
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/cap/disk.rb:53:in `block in configure_disks'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/cap/disk.rb:50:in `each'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/cap/disk.rb:50:in `configure_disks'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/capability_host.rb:114:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/capability_host.rb:114:in `capability'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/disk.rb:23:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/cleanup_disks.rb:33:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/set_hostname.rb:20:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/base_mac_to_ip.rb:33:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/network.rb:120:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/prepare_nfs_settings.rb:16:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/synced_folders.rb:90:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/delayed.rb:22:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/synced_folder_cleanup.rb:31:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/plugins/synced_folders/nfs/action_cleanup.rb:22:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/prepare_synced_folder_cleanup.rb:17:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/provision.rb:83:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builder.rb:183:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `block in run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/util/busy.rb:22:in `busy'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/call.rb:56:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/prune_forwarded_ports.rb:28:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/check_existing_network.rb:33:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builder.rb:183:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `block in run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/util/busy.rb:22:in `busy'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/call.rb:56:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/box_check_outdated.rb:98:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/fix_old_machine_id.rb:27:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/compatibility.rb:17:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/set_display_name.rb:35:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/import.rb:108:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/prepare_clone.rb:18:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/handle_box.rb:59:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:117:in `block in finalize_action'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builder.rb:183:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `block in run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/util/busy.rb:22:in `busy'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/call.rb:56:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/check_vmware.rb:26:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/fix_old_machine_id.rb:27:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builtin/config_validate.rb:28:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/work/VagrantHome/gems/3.1.3/gems/vagrant-vmware-desktop-3.0.3/lib/vagrant-vmware-desktop/action/compatibility.rb:34:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/warden.rb:38:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/builder.rb:183:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `block in run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/util/busy.rb:22:in `busy'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/action/runner.rb:104:in `run'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/machine.rb:247:in `action_raw'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/machine.rb:216:in `block in action'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/environment.rb:649:in `lock'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/machine.rb:202:in `call'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/machine.rb:202:in `action'
    from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.0/lib/vagrant/batch_action.rb:89:in `block (2 levels) in run'

Expected behavior

Vagrant should resisze the the primary SATA disk

Actual behavior

The SATA Disk resize fail with an error. If you use the following image, which uses an SCSI Disk, the resize complete successful config.vm.box = "bento/ubuntu-22.04" config.vm.box_version = "202303.13.0"

Reproduction information

Vagrant version

Vagrant 2.4.0

Host operating system

Windows 11 Pro

Guest operating system

ubuntu-22.04

Steps to reproduce

  1. Install vagrant-vmware-utility
  2. vagrant plugin install vagrant-vmware-desktop
  3. setx VAGRANT_EXPERIMENTAL "disks"
  4. add config.vm.disk :disk, size: "144GB", primary: true
  5. vagrant up

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "bento/ubuntu-22.04"
  #config.vm.box_version = "202303.13.0" #SCSI Disk (working)
  config.vm.box_version = "202309.08.0" #SATA Disk (not working)
  config.vm.hostname = "ubuntu"
  config.vm.disk :disk, size: "144GB", primary: true
  config.vm.provider "vmware_desktop" do |vd|
    vd.gui = true
    vd.linked_clone = false
  end
end
aphorise commented 4 months ago

I've also encountered this issue using vmware_desktop on AppleSilicon M3 and with Vagrant 2.4.0.

Is there any update on this?