Switch to HTTPS

Switch to HTTPS: https://t7j7l.blogspot.com/

Monday, 23 February 2015

VirtualBox Guidelines

VirtualBox is the best freeware for running virtually any OS right on top of Windows or whatever you've installed as your system. It is a powerful tool that can save you time and money that would otherwise be spent on spare hardware when testing out new operating systems or applications. The above image is what I always allocate to my virtual machines, except Linux guests don't have 2D Video acceleration, and OS X none at all. Here is how I setup every single virtual machine I own:
  1. Above specs. If unable to allocate 256 MB VRAM (max) in GUI, use this command: "C:\Program Files\Oracle\VirtualBox\VBoxManage" modifyvm "Your OS name" --vram 256
  2. Always install guest additions, except when not available (OS X). That can be as simple as attaching the ISO and letting autorun take care of it, or as complex as manually installing build-essential, linux-headers, dkms, etc. just to execute VBoxLinuxAdditions.run successfully. Windows XP needs to be in Safe Mode to install Direct3D. Many Linux distros have the package virtuabox-additions-dkms in their repository, so you don't need to build it.
  3. Always run the guest OS fullscreen 1080p. If without guest additions, use this command: "C:\Program Files\Oracle\VirtualBox\VBoxManage" setextradata "Your OS name" "CustomVideoMode1" "1920x1080x32"
  4. Never install swap, and disable pagefile/hibernate/system restore. This saves you space.
  5. To access auto-mount shared folders in /media/ (after logout): sudo gpasswd -a user vboxsf ; sudo usermod -G vboxsf user
  6. If the above fails, you'll need too mount them manually using /etc/fstab or /etc/init.d/boot.local
  7. If no guest additions, try sharing folders on Windows host, and connect via smb://
  8. To reclaim space on a dynamic VDI, do the following before this command: "C:\Program Files\Oracle\VirtualBox\VBoxManage" modifyhd "X:\path\OS.vdi" --compact
  • Windows: Disk Cleanup (System Files) > CCleaner (winapp2.ini) > Disk Defragmenter (optimize) > sdelete -z (admin cmd).
  • OS X: OnyX > Monolingual > Disk Utility (Repair Permissions + Zero Free Space)
  • Linux: BleachBit (check all except free disk space and memory) > Free disk space
Lastly, never forget to take a snapshot before any changes. I always keep one in handy to restore just in case something goes wrong. If you successfully updated, delete the snapshot and create a new one. Hope you learned something new, and feel free to comment below for any questions!

No comments:

Post a Comment