sudo growpart /dev/sda 1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 10G 0 disk
└─sda1 8:1 0 10G 0 part /
^^^ ココ
sr0 11:0 1 1024M 0 rom
ファイルシス タイプ サイズ 使用 残り 使用% マウント位置
/dev/sda1 xfs 5.9G 5.1G 779M 88% /
sudo xfs_growfs -d /
※vagrant で作成した vmdk をこの方法で拡張すると vmdk ファイルが壊れる ので、Vagrantfile の config.disksize.size で拡張すること。
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "47805c35-d16d-434e-881c-ff5f6077d676", "--type", "headless"]
Stderr: VBoxManage: error: Could not open the medium '/xxx/xxx_default_1739791434726_74041/xxx-amd64-disk001.vmdk'.
VBoxManage: error: VMDK: inconsistency between grain table and backup grain table in '/xxx/VirtualBox VMs/xxx_default_1739791434726_74041/xxx-amd64-disk001.vmdk' (VERR_VD_VMDK_INVALID_HEADER).
VBoxManage: error: VD: error VERR_VD_VMDK_INVALID_HEADER opening image file '/xxx/VirtualBox VMs/xxx_default_1739791434726_74041/xxx-amd64-disk001.vmdk' (VERR_VD_VMDK_INVALID_HEADER)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium
sudo systemctl stop vboxadd-service
sudo date -s '2025/01/01 09:00'
sudo systemctl start vboxadd-service
mount -t iso9660 -r /dev/sr0 /mnt
cd /mnt
export KERN_DIR=/usr/src/kernels/2.6.32-696.3.2.el6.x86_64
sh VBoxLinuxAdditions.run
/usr/sbin/VBoxService --timesync-set-threshold 1000
/usr/bin/VBoxControl guestproperty set "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold" 1000
/usr/bin/VBoxControl guestproperty get "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold"
Oracle VM VirtualBox Guest Additions Command Line Management Interface Version 5.1.22
(C) 2008-2017 Oracle Corporation
All rights reserved.
Value: 1000
※VirtualBox 5.1 で実行
sudo systemctl stop vboxadd-service && sudo date -s '2020/01/01 09:00' && sudo systemctl start vboxadd-service
VirtualBox のサービスを止めた上で、大幅に時刻をずらしておくと、次にサービス開始した時に、少しずつ時刻を合わせていくのではなく、一気に合わせてくれる。
mount -rt iso9660 /dev/cdrom /mnt
cd /mnt
./VBoxLinuxAdditions.run
/sbin/rcvboxadd quicksetup all
sudo yum install kernel-devel kernel-headers dkms gcc gcc-c++
usermod -aG vboxsf <user>
VBoxManage startvm "GuestName" --type headless
VBoxManage list runningvms
VBoxManage showvminfo "GuestName"
VBoxManage list vms
VBoxManage list ostypes
VBoxManage setextradata "MacOSMountainLion" "VBoxInternal2/EfiHorizontalResolution" 1920
VBoxManage setextradata "MacOSMountainLion" "VBoxInternal2/EfiVerticalResolution" 1200
VBoxManage setextradata "MacOSMountainLion" "VboxInternal2/EfiGraphicsResolution" "1920x1200"