Last active
June 1, 2025 13:53
-
-
Save goncalor/fc550542b579e4433fa56ddaa8ac4db6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create an disk | |
vboxmanage createmedium --filename <name>.vmdk --size=512 --variant=<Standard|Fixed|Stream|...> --format=VMDK | |
# Standard is the default disk image type, which has a dynamically allocated file size. | |
# Fixed uses a disk image that has a fixed file size. | |
# Stream optimizes the disk image for downloading. This value is valid for VMDK disk images only. | |
# create raw disk image | |
sudo vboxmanage createmedium --filename=<name>.vmdk --variant=RawDisk --format=VMDK --property=RawDrive=/dev/sXY | |
sudo chown root:goncalor /dev/sXY | |
# create a VM | |
vboxmanage list ostypes | |
vboxmanage createvm --register --ostype=Windows11_64 --name=<name> | |
vboxmanage modifyvm <name> --memory=2048 --vram=30 | |
vboxmanage modifyvm <name> --cable-connected1=off | |
# add a disk | |
vboxmanage storagectl <name> --name="SATA Controller" --add=sata --controller=IntelAHCI --portcount=1 --bootable=on | |
vboxmanage storageattach <name> --storagectl="SATA Controller" --device=0 --port=0 --type=hdd --medium=<mame>.vmdk | |
# insert a CD/DVD | |
vboxmanage storagectl <name> --name=IDE --add=ide | |
vboxmanage storageattach <name> --storagectl=IDE --port=0 --device=0 --type=dvddrive --medium=<path.iso> | |
# start VM | |
vboxmanage startvm <name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment