Category Archives: misc

Clone VirtualBox images (.vdi)

Just copying a VirtualBox .vdi file and the opening it results in the error:

Cannot register the hard disk ‘myhd.vdi’ with UUID {ABCD} because a hard disk ‘myhd2.vdi’ with UUID {ABCD} already exists in the media registry (‘path/VirtualBox.xml’).

The solution is to generate a new UUID for the copy. This is done using:

VBoxManage internalcommands setvdiuuid myhd2.vdi

Visio figures in LaTeX

This is one way to use figures made in Microsoft Visio in your latex (pdfLatex) document.

The first step is to get the figure as a PDF file. If you are using Visio 2007 you may use the PDF add-in from Microsoft. Another option is using Adobe Acrobat or the free PDFCreator.

When printing, select the figure and in the print dialog select the option to only print the current selection.

The problem is that the figures will use a whole page even if they’re small. You may either crop it (using a tool like pdfcrop) or specify a viewport when including the figure in the document.

To find out the viewport variables, convert the PDF to PostScript using pdf2ps. Now check the beginning of the file for a line like this:

%%BoundingBox: 56 368 446 551

This is the viewport variables to use when including the figure in the latex document:

\includegraphics[viewport = 56 368 446 551]{figure.pdf}

Or include it in a figure with caption that may be referenced:

\begin{figure}
	\begin{center}
		\includegraphics[viewport = 56 368 446 551]{figure.pdf}
	\end{center}
	\caption{Figure caption here}
	\label{myfigure}
\end{figure}

It may be referenced to in the text using e.g. Please see figure ~\ref{figure} for details. The tilde is used as a non-breaking space to avoid unfortunate linebreaks.

See this page for more details working with figures in Latex.

Amazon Web Services lower costs

Amazon have started to do a lot things right lately. The 24×7 premium support, introducing the Service Health Dashboard, the latest improvements to EC2, and now lowering the data transfer costs:

Current data transfer price (through April 30, 2008)
$0.100 per GB – data transfer in
$0.180 per GB – first 10 TB / month data transfer out
$0.160 per GB – next 40 TB / month data transfer out
$0.130 per GB – data transfer out / month over 50 TB

New data transfer price (effective May 1, 2008)
$0.100 per GB – data transfer in
$0.170 per GB – first 10 TB / month data transfer out
$0.130 per GB – next 40 TB / month data transfer out
$0.110 per GB – next 100 TB / month data transfer out
$0.100 per GB – data transfer out / month over 150 TB