<?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>Code Sleuth's Blog &#187; virtual server</title>
	<atom:link href="http://blog.codesleuth.co.uk/index.php/tag/virtual-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codesleuth.co.uk</link>
	<description>The .NET Pimp</description>
	<lastBuildDate>Wed, 24 Mar 2010 09:21:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Setting a Virtual Machine to Automatically Start</title>
		<link>http://blog.codesleuth.co.uk/index.php/2009/02/23/setting-a-virtual-machine-to-automatically-start/</link>
		<comments>http://blog.codesleuth.co.uk/index.php/2009/02/23/setting-a-virtual-machine-to-automatically-start/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:21:26 +0000</pubDate>
		<dc:creator>Sleuth</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[virtual server]]></category>

		<guid isPermaLink="false">http://blog.codesleuth.co.uk/?p=179</guid>
		<description><![CDATA[One of the problems I had with our development and testing virtual server at work was that automatic updates on the host machine (necessary to maintain security) would reboot the server and our virtual machines would no longer be running. Fair enough; you would expect that. And the solution is to obviously set them to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the problems I had with our development and testing virtual server at work was that automatic updates on the host machine (necessary to maintain security) would reboot the server and our virtual machines would no longer be running.</p>
<p>Fair enough; you would expect that. And the solution is to obviously set them to auto start once virtual server has booted and the service is running. Here are the steps to get the whole thing working:</p>
<h3>1. Create a user account</h3>
<p>The best way to tackle this step is to create a local user account that is dedicated to automating virtual machines. This user account should not be given any permissions on the server (preferably not even &#8216;<a title="Allow log on locally: Security Configuration Editor; Security Services" href="http://technet.microsoft.com/en-us/library/cc756809.aspx" target="_blank">Allow log on locally</a>&#8216; rights but unfortunately when I tested this it failed to start the VMs) and should be given a strong password. See below:</p>
<div id="attachment_180" class="wp-caption aligncenter" style="width: 404px"><img class="size-full wp-image-180" title="create-user-account" src="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/01-create-user-account.jpg" alt="Create the Local User account" width="394" height="388" /><p class="wp-caption-text">Create the Local User account</p></div>
<h3>2. Apply permissions to virtual machines</h3>
<p>Once you have your user account created and ready, you must give it permissions to <strong>read</strong>, <strong>write</strong>, and <strong>modify </strong>your virtual machine&#8217;s .VHD and .VMC files. When I did this, I added these permissions to my root virtual machines folder to allow all virtual machines to inherit the permissions and therefore start automatically from this account. See below:</p>
<div id="attachment_181" class="wp-caption aligncenter" style="width: 386px"><img class="size-full wp-image-181" title="apply-permissions" src="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/02-apply-permissions.jpg" alt="Applying permissions to the virtual machines folder" width="376" height="482" /><p class="wp-caption-text">Applying permissions to the virtual machines folder</p></div>
<h3>3. Apply permissions to virtual network configuration files</h3>
<p>In order to access the virtual networks (and physical networks!) permissions need to be added to <strong>read</strong>, <strong>write</strong>, and <strong>modify </strong>the .VNC files that represent each network available to the VM. You can find these configuration files (by default) in &#8220;C:\Documents and Settings\All Users\Documents\Shared Virtual Networks&#8221;, then add the permissions as shown:</p>
<div id="attachment_182" class="wp-caption aligncenter" style="width: 383px"><img class="size-full wp-image-182" title="apply-vnc-permissions" src="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/03-apply-vnc-permissions.jpg" alt="Applying virtual network permissions to the Shared Networks folder" width="373" height="479" /><p class="wp-caption-text">Applying virtual network permissions to the Shared Networks folder</p></div>
<h3>4. Set the virtual machine to automatically start using the new user account</h3>
<p>Head on over to your Virtual Server administration page and select <strong>Edit Configuration</strong> for the virtual machine you wish to automate. If the virtual machine is currently running, you must ensure it is fully stopped before setting it to automatically start (the site will prevent you from changing any settings):</p>
<div id="attachment_185" class="wp-caption aligncenter" style="width: 522px"><img class="size-full wp-image-185" title="edit-configuration" src="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/04-edit-configuration.jpg" alt="Edit configuration for the virtual machine" width="512" height="181" /><p class="wp-caption-text">Edit configuration for the virtual machine</p></div>
<p>Next select the <strong>General properties</strong> link to go to the required section to add automation for the virtual machine:</p>
<div id="attachment_186" class="wp-caption aligncenter" style="width: 502px"><img class="size-full wp-image-186" title="general-properties" src="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/05-general-properties.jpg" alt="General properties for the virtual machine" width="492" height="390" /><p class="wp-caption-text">General properties for the virtual machine</p></div>
<p>You should be presented with the following page, which is pretty self-explanitory:</p>
<div id="attachment_187" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/06-automatically-start.jpg"><img class="size-medium wp-image-187" title="automatically-start" src="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/06-automatically-start-300x101.jpg" alt="The General properties page for a virtual machine" width="300" height="101" /></a><p class="wp-caption-text">The General properties page for a virtual machine</p></div>
<p>Tick <strong>Run virtual machine under the following user account </strong>and enter the user account you created under <strong>User name</strong> and <strong>Password</strong> in the form of &lt;Server&gt;\&lt;Account&gt; (so in my example it is <strong>XAVIER\LocalVSUser</strong>) then select what conditions you wish the server to be started from, and what type of delay you would like to give before it starts. I usually give each VM a 360 second delay to allow adequate time for other services to finish loading before the Virtual Server takes over the system.</p>
<div id="attachment_188" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/07-automatically-start-filled-in.jpg"><img class="size-medium wp-image-188" title="automatically-start-filled-in" src="http://blog.codesleuth.co.uk/wp-content/uploads/2009/02/07-automatically-start-filled-in-300x100.jpg" alt="The final step to automate virtual machines" width="300" height="100" /></a><p class="wp-caption-text">The final step to automate virtual machines</p></div>
<h3>Done!</h3>
<p>This should be all you need to set the virtual machine to automatically start. One thing to remember is that most problems that arise from being unable to run or use a virtual machine when set to automatically start come from permissions. Extra help is available from Microsoft here: <a title="Modifying general virtual machine properties" href="http://technet.microsoft.com/en-us/library/cc708357.aspx" target="_blank">Modifying general virtual machine properties</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codesleuth.co.uk/index.php/2009/02/23/setting-a-virtual-machine-to-automatically-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
