Tag Archives: virtualbox

Virtualbox VBoxManager

Good thing to remember (example kicks off regedit) :

VBoxManage guestcontrol "Windows-7-VM" execute --image "cmd.exe" --username [windowsuser] --verbose "/c" "regedit.exe" --passwordfile [pwd.file] --wait-stdout --wait-exit

Read more @ http://www.virtualbox.org/manual/ch08.html#vboxmanage-guestcontrol .

Getting some usage out of a Mac (aka installing virtualbox / XBMC / MacPorts / Xcode / coreutils / findutils)


I’ve joined the dark side of BSD, I bought a kinda-not-so-cheap iMac a while ago.
I dumped virtualbox onto it so it could prove itself useful, and also put XBMC on it, just so it had some real purpose to itself instead
of just sitting there being stupid.. So, here’s how I made it bit more useful;

So, my machine didn’t come with Mac OS X 10.7.4 aka Lion, so that was the first step, if we don’t consider
signing up a account and things like that, using the app-store is quite straight forward, so I will not cover that in here.

So, you got the version of the OS and all the appropriate updates installed – good.

Next, lets just do some simple stuff ( of yeah, if you don’t like the standard browser, just get FF or Chrome (recommended ;) ):

Install VirtualBox

Direct your browser of choice to VirtualBox Downloads
and get the linked (at time of writing) VirtualBox 4.1.18 for OS X hosts. It comes as a .dmg, meaning, you’ll mount/install it like most things
in the OS X world.

Great, we got VirtualBox, you can get the tools and stuff, and the web gui if you like, but that is not described in this post.

Install XMBC

This is as easy as VirtualBox, and works as great as everything else the guys and girls over at XBMC touches;

Navigate your browser to XBMC Download and click the appropriate link (if you don’t know the one, call a friend..).
Congrats, follow the on screen instructions just as for the previous installation and you’re done!

Install MacPorts

You might think this is tricky.. it’s not. Fine, at the time of writing it comes as a .pkg instead – difference? Well – you don’t have to mount it, and it takes the huge diskspace of 1,8mb installed.
You could always build it yourself, instructions and/or download links can be found at MacPorts site.

Cool, we’re almost there!
You might have noticed MacPorts provide you with good guidelines – and also links you to the next part you need to install before using port for the rest of the installations,

Install Xcode

Link at time of writing is pointing at the App Store, and yes – this is something provided by Apple that we will need. Install? Well, the link will ask you to open the appropriate program – just fix it ;).

Wow, almost done!

Get a hold on your terminal, slam down the following (if you didn’t follow MacPorts instructions..):

sudo port selfupdate -v

Follow the prompts, use google if you get stuck ;).
Next, simply type:

sudo port install coreutils findutils

Really.. We’re done – you can always verify it with trying something from the toolbox out – oh wait, I hit a odd turn, the above gave me the following:

I get the error “C compiler cannot create executables” or “can’t read “build.cmd”: Failed to locate ‘make’ in path” when I try to install a port. Why?

You need to install Xcode. Ensure you include both System Tools and Unix Development. As of Xcode 4.3, you also need to install the separate Command Line Tools package.

So, let’s go get it at the App Store..

Oh no.. we can’t! Why? Here’s why:

I’ve installed Xcode 4.3 or later. Where can I find the updated command line tools?

Xcode now provides an interface for downloading and installing the latest command line tools, such as Apple LLVM compiler and system headers. To install these tools, go to the Downloads tab within the Xcode Preferences menu and click “Install” next to the Command Line Tools entry.

Support-page for Xcode.

So just do that…


$ sudo port install coreutils findutils
--->  Computing dependencies for coreutils
--->  Dependencies to be installed: gettext expat libiconv ncurses gmp
--->  Fetching archive for expat
--->  Attempting to fetch expat-2.1.0_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/expat
--->  Attempting to fetch expat-2.1.0_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/expat
--->  Installing expat @2.1.0_0
--->  Activating expat @2.1.0_0
--->  Cleaning expat
--->  Fetching archive for libiconv
--->  Attempting to fetch libiconv-1.14_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/libiconv
--->  Attempting to fetch libiconv-1.14_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/libiconv
--->  Installing libiconv @1.14_0
--->  Activating libiconv @1.14_0
--->  Cleaning libiconv
--->  Fetching archive for ncurses
--->  Attempting to fetch ncurses-5.9_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/ncurses
--->  Attempting to fetch ncurses-5.9_1.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/ncurses
--->  Installing ncurses @5.9_1
--->  Activating ncurses @5.9_1
--->  Cleaning ncurses
--->  Fetching archive for gettext
--->  Attempting to fetch gettext- from http://packages.macports.org/gettext
--->  Attempting to fetch gettext- from http://packages.macports.org/gettext
--->  Installing gettext @
--->  Activating gettext @
--->  Cleaning gettext
--->  Fetching archive for gmp
--->  Attempting to fetch gmp-5.0.4_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/gmp
--->  Attempting to fetch gmp-5.0.4_1.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/gmp
--->  Installing gmp @5.0.4_1
--->  Activating gmp @5.0.4_1
--->  Cleaning gmp
--->  Fetching archive for coreutils
--->  Attempting to fetch coreutils-8.17_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/coreutils

--->  Attempting to fetch coreutils-8.17_0.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/coreutils
--->  Installing coreutils @8.17_0
--->  Activating coreutils @8.17_0

The tools provided by GNU coreutils are prefixed with the character 'g' by
default to distinguish them from the BSD commands.
For example, cp becomes gcp and ls becomes gls.

If you want to use the GNU tools by default, add this directory to the front of
your PATH environment variable:

--->  Cleaning coreutils
--->  Computing dependencies for findutils
--->  Fetching archive for findutils
--->  Attempting to fetch findutils-4.4.2_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/findutils
--->  Attempting to fetch findutils-4.4.2_1.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/findutils
--->  Installing findutils @4.4.2_1
--->  Activating findutils @4.4.2_1
--->  Cleaning findutils
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

Good job, a lesson in patience indeed…Now, keep installing whatever you like (eherm) – and please, tips welcome for what _you_ install!