Skip to content

Instantly share code, notes, and snippets.

@dimalyshev
Created May 20, 2018 00:58
Show Gist options
  • Save dimalyshev/7c2afc9acabc2039906b1f5c1fa3ee25 to your computer and use it in GitHub Desktop.
Save dimalyshev/7c2afc9acabc2039906b1f5c1fa3ee25 to your computer and use it in GitHub Desktop.
virtualbox
set NNN=tiny
::vbox createvm --name %NNN% --ostype Windows7 --basefolder T:\vm --register
::vbox modifyvm %NNN% --memory 2000 --acpi on --boot1 dvd --nic1 nat
::vbox createhd --filename "T:\vm\%NNN%\hdd.vdi" --size 8000
echo %NNN%
vbox.bat storagectl %NNN% --name SATA --add sata --controller PIIX3
vbox.bat storageattach %NNN% --storagectl SATA --port 0 --device 1 --type dvddrive
vbox.bat storageattach %NNN% --storagectl SATA --port 0 --device 0 --type hdd --medium "C:\vm\usb.vmdk"
::vbox="%VBOX_MSI_INSTALL_PATH%Vboxmanage" --nologo %*
:: on
vbox startvm %*
:: info
vbox showvminfo %1
:: save
vbox controlvm %1 savestate
:: screen shot
vbox controlvm %1 screenshotpng %2
:: off
vbox controlvm %1 acpipowerbutton
:: clone
vbox clonevm winxp --snapshot base --name %1 --options link --snapshot base --register --basefolder c:\vm\test\
::to create mapping to usb drive
vbox internalcommands createrawvmdk -filename T:\vm\usb.vmdk -rawdisk \\.\PhysicalDrive#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment