sprotheroe / vagrant-disksize

Vagrant plugin to resize disks in VirtualBox
MIT License
479 stars 52 forks source link

Windows Vagrant2.2.13,box Centos8 , this plugin not work #42

Closed LY1806620741 closed 3 years ago

LY1806620741 commented 3 years ago

yesterday, I install this plugin, but it not work.

VirtualBox GUI Manager show IDE disk still use vmdk type, and size 10G

my vagrantFile is:

Vagrant.configure("2") do |config|
  config.vm.box = "centos/8"
  config.vm.box_version = "1905.1"
  config.vagrant.plugins = ['vagrant-disksize']
  config.disksize.size="50G"
  config.vm.network "private_network", ip: "192.168.33.10"
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "1024"
    vb.cpus = 2
  end
end

command vagrant plugin list show vagrant-disksize (0.1.3, global)

then I debug vagrantvagrant up --debug > up.txt 2>&1

version and variable log:

INFO global: Vagrant version: 2.2.13
 INFO global: Ruby version: 2.6.6
 INFO global: RubyGems version: 3.0.3
 INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.2.13\\gems\\vagrant-2.2.13\\bin\\vagrant"
 INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded"
 INFO global: VAGRANT_INSTALLER_ENV="1"
 INFO global: VAGRANT_INSTALLER_VERSION="2"
 INFO global: VAGRANT_LOG="debug"
DEBUG meta: Finding driver for VirtualBox version: 6.1.14
 INFO meta: Using VirtualBox driver: VagrantPlugins::ProviderVirtualBox::Driver::Version_6_1

load plugin log:

DEBUG bundler: solution set stored to - <Vagrant::Bundler::SolutionFile:C:/Users/Administrator/Desktop/centos8/.vagrant/plugins.json:C:/Users/Administrator/Desktop/centos8/.vagrant/bundler/local.sol:invalid>
 INFO manager: Loading plugins...
DEBUG manager: Enabling globalized plugins
 INFO manager: Plugins:
 INFO manager:   - vagrant-disksize = [installed: 0.1.3 constraint: > 0]
DEBUG bundler: Enabling prerelease plugin resolution due to dependency: net-ssh-6.2.0.rc1
DEBUG signature_file: new solution file instance plugin_file=C:/Users/Administrator/.vagrant.d/plugins.json solution_file=C:/Users/Administrator/Desktop/centos8/.vagrant/bundler/global.sol
DEBUG signature_file: reading solution file - C:/Users/Administrator/Desktop/centos8/.vagrant/bundler/global.sol
DEBUG signature_file: solution validation check CHECKSUM 4f900f159ef4286b7a07eca21d54559dfb8b41cdbeb66a3d9d33fbfdcb57b081 <-> 4f900f159ef4286b7a07eca21d54559dfb8b41cdbeb66a3d9d33fbfdcb57b081 VERSION 2.2.13 <-> 2.2.13
DEBUG signature_file: loading solution dependency list
DEBUG signature_file: solution dependency list: [<Gem::Dependency type=:runtime name="vagrant-disksize" requirements="= 0.1.3">]
DEBUG bundler: solution file in use for init: <Vagrant::Bundler::SolutionFile:C:/Users/Administrator/.vagrant.d/plugins.json:C:/Users/Administrator/Desktop/centos8/.vagrant/bundler/global.sol:valid>
DEBUG bundler: Generating new builtin set instance.
DEBUG bundler: Generating new plugin set instance. Skip gems - []
DEBUG bundler: loading cached solution set
DEBUG bundler: activating solution set
DEBUG bundler: Activating solution set: ["vagrant-disksize-0.1.3"]
DEBUG bundler: Activating gem vagrant-disksize-0.1.3
 INFO manager: Loading plugins...
 INFO manager: Loading plugin `vagrant-disksize` with default require: `vagrant-disksize`
ERROR manager: Failed to load plugin `vagrant-disksize` with default require. - LoadError: cannot load such file -- vagrant-disksize
 INFO manager: Loading plugin `vagrant-disksize` with slash require: `vagrant/disksize`
 INFO manager: Registered plugin: vagrant-disksize
DEBUG manager: Successfully loaded plugin `vagrant-disksize`.
 INFO loader: Set :root = ["#<Pathname:C:/Users/Administrator/Desktop/centos8/Vagrantfile>"]

you can see the vagrant-disksize plugin Successfully loaded

But hook hook VagrantPlugins::ProviderVirtualBox::Action::Boot seems to be no work,there is boot log

 INFO subprocess: Starting process: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "modifyvm", "1b0b0578-f077-4280-bf79-d39b74a45174", "--cpus", "2"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
 INFO warden: Calling IN action: #<VagrantPlugins::ProviderVirtualBox::Action::Boot:0x0000000007dd9dc8>
 INFO interface: info: Booting VM...
 INFO interface: info: ==> default: Booting VM...
==> default: Booting VM...
 INFO subprocess: Starting process: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "startvm", "1b0b0578-f077-4280-bf79-d39b74a45174", "--type", "headless"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: Waiting for VM "1b0b0578-f077-4280-bf79-d39b74a45174" to power on...

VM "1b0b0578-f077-4280-bf79-d39b74a45174" has been successfully started.

I can't solve this problem in my current understanding, Somebody know this?

LY1806620741 commented 3 years ago

full log has 147772 lines, need I upload it?

LY1806620741 commented 3 years ago

I find the answer in other plugin vagrant-vbguest

this mean your must update vagrant to fix it.

https://github.com/hashicorp/vagrant/issues/12035

LY1806620741 commented 3 years ago

I update vagrant to 2.2.14.dev. It work.

==> default: Resized disk: old 10240 MB, req 51200 MB, new 51200 MB