<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.tordeu.com &#187; VirtualBox</title>
	<atom:link href="http://blog.tordeu.com/?cat=42&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.tordeu.com</link>
	<description>a blog about stuff</description>
	<lastBuildDate>Thu, 25 Apr 2013 07:03:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2</generator>
		<item>
		<title>How to use Ctrl+Alt+F1 etc. in a Virtual Machine in VirtualBox</title>
		<link>http://blog.tordeu.com/?p=322</link>
		<comments>http://blog.tordeu.com/?p=322#comments</comments>
		<pubDate>Sat, 07 Jan 2012 08:56:22 +0000</pubDate>
		<dc:creator>tordeu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://blog.tordeu.com/?p=322</guid>
		<description><![CDATA[Problem When using a virtual machine in VirtualBox you might want to switch to a different console by hitting Ctrl+Alt+F&#60;n&#62;   where &#60;n&#62; stands for the number of the console you want to access (like Ctrl+Alt+F1 to get a text console and Ctrl+Alt+F7 to get back to your X session). Unfortunately, key combinations with Ctrl+Alt <a href='http://blog.tordeu.com/?p=322'>[...]</a>]]></description>
				<content:encoded><![CDATA[<h2>Problem</h2>
<p>When using a virtual machine in VirtualBox you might want to switch to a different console by hitting</p>
<address>Ctrl+Alt+F&lt;n&gt;</address>
<address> </address>
<p>where &lt;n&gt; stands for the number of the console you want to access (like Ctrl+Alt+F1 to get a text console and Ctrl+Alt+F7 to get back to your X session).</p>
<p>Unfortunately, key combinations with Ctrl+Alt like the mentioned Ctrl+Alt+F&lt;n&gt; or Ctrl+Alt+Del will not be sent to the guest operating system. <span id="more-322"></span>Instead, Ctrl+Alt+F&lt;n&gt; will only let you change consoles on your host and Ctrl+Alt+Del will magically disappear and effect neither the host nor the guest OS.</p>
<p>VirtualBox offers two menu entries (under the menu entry &#8220;Machine&#8221;) to send Ctrl+Alt+Del and Ctrl+Alt+Backspace to the guest OS, but does not offer such a feature for other key combinations.</p>
<p>&nbsp;</p>
<h2>Solution</h2>
<p>Fortunately, you can use the host key (the right Ctrl key by default) as a substitute for Ctrl+Alt. Therefore when pressing</p>
<pre>HOST+F&lt;n&gt;</pre>
<p>VirtualBox will send</p>
<address>Ctrl+Alt+F&lt;n&gt;</address>
<address> </address>
<p>to the guest OS and this will let you change consoles in your guest and also use other key combination that include Ctrl+Alt.</p>
<p>&nbsp;</p>
<h2>Links</h2>
<p><a title="Link to the corresponding section in the VirtualBox User Manual" href="https://www.virtualbox.org/manual/ch01.html#idp7685232">https://www.virtualbox.org/manual/ch01.html#idp7685232</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tordeu.com/?feed=rss2&#038;p=322</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Creating Screenshots of Virtual Machines [VirtualBox]</title>
		<link>http://blog.tordeu.com/?p=130</link>
		<comments>http://blog.tordeu.com/?p=130#comments</comments>
		<pubDate>Sun, 27 Nov 2011 23:54:16 +0000</pubDate>
		<dc:creator>tordeu</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[virtual machine]]></category>

		<guid isPermaLink="false">http://blog.tordeu.com/?p=130</guid>
		<description><![CDATA[If you ever wanted to create screenshots of a virtual machine (for a tutorial, a presentation, a forum post or any other reason), you probably already noticed that the VirtualBox GUI does not offer a screenshot function. Although using additional programs (like GIMP, for example) would get the job done, you do not need them, <a href='http://blog.tordeu.com/?p=130'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>If you ever wanted to create screenshots of a virtual machine (for a tutorial, a presentation, a forum post or any other reason), you probably already noticed that the VirtualBox GUI does not offer a screenshot function.</p>
<p><span id="more-130"></span>Although using additional programs (like GIMP, for example) would get the job done, you do not need them, because VirtualBox does offer screenshot functionality on the command line. And using the built-in function has two advantages:</p>
<ul>
<li>The screenshot will only include what is seen in the virtual machine and won&#8217;t include the VirtualBox window the machine is running in or even the whole Desktop, so there is no need to edit the screenshot.</li>
<li>The screenshots can be made without user-interaction, which is nice if you need to create screenshots automatically with a script or a cron job (e.g. if you want to take a screenshot every 5 minutes &#8211; for whatever reason you might have &#8211; you could completely automate the task).</li>
</ul>
<p>The command to take a screenshot generally looks like this:</p>
<pre>VBoxManage controlvm &lt;uuid&gt; screenshotpng &lt;file&gt;</pre>
<p>or like this</p>
<pre>VBoxManage controlvm &lt;name&gt; screenshotpng &lt;file&gt;</pre>
<p>depending on whether you want to use the UUID or the name of the virtual machine. The name for the virtual machine can be obtained directly from the VirtualBox Manager window or from the window of the running virtual machine:</p>
<div id="attachment_227" class="wp-caption aligncenter" style="width: 703px"><a href="http://blog.tordeu.com/wp-content/uploads/2011/11/VirtualBox-Screenshot3.png"><img class="size-full wp-image-227" title="VirtualBox-Screenshot3" src="http://blog.tordeu.com/wp-content/uploads/2011/11/VirtualBox-Screenshot3.png" alt="Obtaining the name of a virtual machine" width="693" height="379" /></a><p class="wp-caption-text">Obtaining the name of a virtual machine</p></div>
<p>As you can see in the screenshot, the name of the virtual machine is &#8220;Debian Server 1&#8243;.</p>
<p>If we wanted to take a screenshot of the machine and save it as &#8220;server.png&#8221;, we could therefore use the following command:</p>
<pre>VBoxManage controlvm "Debian Server 1" screenshotspng server.png</pre>
<p>And this is what the screenshot would look like:</p>
<div id="attachment_228" class="wp-caption aligncenter" style="width: 730px"><a href="http://blog.tordeu.com/wp-content/uploads/2011/11/snapshot.png"><img class="size-full wp-image-228" title="snapshot" src="http://blog.tordeu.com/wp-content/uploads/2011/11/snapshot.png" alt="Screenshot of a virtual machine" width="720" height="400" /></a><p class="wp-caption-text">Screenshot of the virtual machine</p></div>
<p>&nbsp;</p>
<h2>Appendix: Using UUIDs</h2>
<h3>UUIDs vs Names</h3>
<p>You might also want to think about using the UUID instead of the name of a virtual machine, depending on your situation. Both have their advantages and disadvantages, especially when working with scripts. I am not going to cover this topic in-depth, but let give you something to think about. The advantage of using UUIDs is that you can rename your virtual machines without having to edit the scripts which reference the, directly, because the UUID will stay the same. This is especially useful if you might want to migrate your virtual machine to a different host, because if the new host already has a virtual machine with the same name you have to rename one of them.</p>
<p>But now think of the following situation: You have a virtual machine named &#8220;server&#8221; that you want to migrate to a new host. And you wrote some scripts that somehow work with this VM by using it&#8217;s name. The new host already has a VM named &#8220;server&#8221;, which prevents importing the VM.  So you just rename the VM you want to migreate to &#8220;server2&#8243; and add it, which works great, because there was no VM with the name &#8220;server2&#8243; before.  But now your scripts, which reference a VM called &#8220;server&#8221;, suddenly work on the VM which was already there and not on the VM you migrated (which is now called &#8220;server2&#8243;) and for which the scripts were written. It&#8217;s very easy to forget to alter your scripts to reflect the name change after renaming a virtual machine. But an even bigger problem is: Because there still is a VM called &#8220;server&#8221;, you don&#8217;t even get an error message.</p>
<p>On the other side, two advantages of using the name of the virtual machine that I can think of, are the fact that the name is very easy to see and change in the VirtualBox GUI, so working with VM names in VirtualBox is easier. And if you use the command line,  typing a name is certainly easier and faster (depending on the names you use, of course) than typing the UUID.</p>
<p>Therefore, I personally prefer using the names when using the command line directly and using the UUIDs in scripts.</p>
<h3>Getting the UUID</h3>
<p>In case you want to get the UUID of a virtual machine, you can type the following:</p>
<pre>VBoxManage showvminfo &lt;name&gt;</pre>
<p>This will print a  lot of info, though. To just get the line with the UUID, you can type:</p>
<pre>VBoxManage showvminfo &lt;name&gt; | grep ^UUID</pre>
<p>In this example, you would type:</p>
<pre> VBoxManage showvminfo "Debian Server 1" | grep ^UUID</pre>
<p>which  gives you something like this:</p>
<pre>UUID:        e9e99378-3332-42f4-a6a3-d5490123fe33</pre>
<p>And if you really just want the UUID, you might use the following:</p>
<pre>VBoxManage showvminfo "Debian Server 1" | grep ^UUID | sed 's/UUID: *//'</pre>
<p>to get an output like this:</p>
<p>9e99378-3332-42f4-a6a3-d5490123fe33</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tordeu.com/?feed=rss2&#038;p=130</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
