Q1: How much hard drive space is available during vagrant up?
Q2: Can I increase the disk space available when running vagrant up?
Background: I'm working on a Vagrantfile that creates a Cent OS 7 VM to use in Hyper-V. When configuring the VM, I use the vagrant-disksize plugin to expand the size of the virtual hard drive, I clone a git repo containing a node project, and try to run npm install. I am trying to get the node project ready for me to work with when the VM is create. I have plenty of physical disk space and vagrant-disksize does successfully increase my maximum virtual disk space (verified using Hyper-V Manager)
The Issue: When running npm install on the node project I have cloned, I encounter this error `
my-vm: npm install
...
my-vm: ENOTSUP: operation not supported on socket, symlink '../typescript/bin/tsc' -> '/vagrant/my-project/client/node_modules/@angular-devkit/build-optimizer/node_modules/.bin/tsc'
my-vm: npm
my-vm: ERR!
my-vm: nospc
my-vm: There appears to be insufficient space on your system to finish.
my-vm: npm
my-vm:
my-vm: ERR!
my-vm:
my-vm: nospc
my-vm: Clear up some disk space and try again.
my-vm: npm
my-vm: verb
my-vm: exit
my-vm: [ -95, true ]
...
Vagrantfile:
Vagrant.configure("2") do |config|
# Setting some configs
…
# installs the Vagrant DiskSize plugin
system "vagrant plugin install ./vagrant-disksize-0.1.2.gem --plugin-clean-sources"
config.vm.define vm_name = "my-vm"
config.vm.box = "centosbuilder"
config.disksize.size = "40GB"
…
config.vm.provision :shell, :inline => \
"
# Get sudo privileges
sudo su
# yum install Node.js
…
# Install global node packages
…
# Clone GUI repo
sudo git clone ssh://git@my-server/my-project.git
# Setup the project
sudo chmod -R 700 my-project
cd my-project
sudo npm install
"
end