diff --git a/virtualbox.sh b/virtualbox.sh index 6395694..41e79d8 100644 --- a/virtualbox.sh +++ b/virtualbox.sh @@ -87,6 +87,12 @@ # Create a hdd disk. VBoxManage createmedium disk --filename hdddisk.vdi --size 2048 --format VDI --variant Standard +# Compact a hdd disk. + VBoxManage modifymedium hdddisk.vdi --compact + +# Change hdd disk uuid. + VBoxManage internalcommands sethduuid hdddisk.vdi + # Add hdd to vm. VBoxManage storageattach VMNAME --storagectl sata --port 0 --type hdd --mtype normal --medium FILENAME.vdi @@ -112,9 +118,6 @@ # Boot from hdd only. VBoxManage modifyvm VMNAME --boot1 disk --boot2 none --boot3 none --boot4 none -# Compact a hdd. - VBoxManage modifymedium FILENAME.vdi --compact - #----- Serial port to host pipe -----