事象
構築時には普通に使えていたVirtualBox上のcentosで、
起動に失敗。
OS起動はできているが、
共有フォルダ設定に失敗。
c:\var\dev\DB\rep_test_centosstr9_pg16
$ vagrant up
Bringing machine 'centosstr9pg16a' up with 'virtualbox' provider...
Bringing machine 'centosstr9pg16b' up with 'virtualbox' provider...
==> centosstr9pg16a: Checking if box 'bento/centos-stream-9' version '202304.28.0' is up to date...
==> centosstr9pg16a: Clearing any previously set forwarded ports...
==> centosstr9pg16a: Fixed port collision for 22 => 2222. Now on port 2201.
==> centosstr9pg16a: Clearing any previously set network interfaces...
==> centosstr9pg16a: Preparing network interfaces based on configuration...
centosstr9pg16a: Adapter 1: nat
centosstr9pg16a: Adapter 2: hostonly
==> centosstr9pg16a: Forwarding ports...
centosstr9pg16a: 22 (guest) => 2201 (host) (adapter 1)
==> centosstr9pg16a: Running 'pre-boot' VM customizations...
==> centosstr9pg16a: Booting VM...
==> centosstr9pg16a: Waiting for machine to boot. This may take a few minutes...
centosstr9pg16a: SSH address: 127.0.0.1:2201
centosstr9pg16a: SSH username: vagrant
centosstr9pg16a: SSH auth method: private key
==> centosstr9pg16a: Machine booted and ready!
==> centosstr9pg16a: Checking for guest additions in VM...
centosstr9pg16a: No guest additions were detected on the base box for this VM! Guest
centosstr9pg16a: additions are required for forwarded ports, shared folders, host only
centosstr9pg16a: networking, and more. If SSH fails on this machine, please install
centosstr9pg16a: the guest additions and repackage the box to continue.
centosstr9pg16a:
centosstr9pg16a: This is not an error message; everything may continue to work properly,
centosstr9pg16a: in which case you may ignore this message.
==> centosstr9pg16a: Setting hostname...
==> centosstr9pg16a: Configuring and enabling network interfaces...
==> centosstr9pg16a: Mounting shared folders...
centosstr9pg16a: /vagrant => C:/var/dev/DB/rep_test_centosstr9_pg16
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
c:\var\dev\DB\rep_test_centosstr9_pg16
対処:共有フォルダ使わないことにしてしまう
以下をVagrantfileに追記
config.vm.synced_folder ".", "/vagrant", disabled: true
VirtualBoxのバージョン、実際のデバイス配置、Guest Additionsのバージョン、その他ちゃんと確認して、
正しく対処もできると思うけど、sshできるならscpで良いや、という感じなので、横着して上記で対処。
以上