<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8992165011308618361</id><updated>2012-02-16T07:22:34.057-08:00</updated><category term='vix api'/><category term='rakefile'/><category term='ruby'/><category term='desktop cloud'/><category term='watir'/><category term='ec2'/><category term='vmware'/><category term='rake'/><category term='netbeans'/><title type='text'>VMBed</title><subtitle type='html'>Machines when you want them</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-3496088674835847465</id><published>2010-02-14T13:58:00.000-08:00</published><updated>2010-02-14T15:13:30.589-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='desktop cloud'/><title type='text'>Moving your desktop to the cloud</title><content type='html'>When I started &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt; three years ago I saw it as a tool for developers to try out applications in environments that they did not have immediate access too.  Which would save them the effort in building and maintaining the matrix of software configurations necessary to get good test coverage.  Over time I've noticed other use patterns.  One that I did not expect is people looking to &lt;a href="http://superuser.com/questions/49897/remote-computer-renting-moving-my-desktop-to-the-cloud"&gt;move their desktop to the cloud&lt;/a&gt;.  Using a &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt; machine for this gives you the windows applications you are familiar with accessed via a remote desktop viewer.  An alternate approach are services where a web browser essentially becomes a window to your desktop.  While the applications run locally in your browser the data is stored remotely by the service.  If you can get access to a browser you can access your data.  One such service that impressed me is &lt;a href="http://eyeos.org/"&gt;eyeOS&lt;/a&gt;.  I am quite amazed by the usefulness and depth of their applications.  I'm not sure I will be untethered from a physical machine anytime soon but if it happens I could see going with &lt;a href="http://eyeos.org/"&gt;eyeOS&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-3496088674835847465?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/3496088674835847465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=3496088674835847465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/3496088674835847465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/3496088674835847465'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2010/02/moving-your-desktop-to-cloud.html' title='Moving your desktop to the cloud'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-4366581755114092335</id><published>2009-05-28T16:48:00.000-07:00</published><updated>2009-05-28T17:06:24.968-07:00</updated><title type='text'>Using rdp://host/ and vnc://host/ links</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i5aXak1HR-0/Sh8lVNTO8SI/AAAAAAAAAW4/oAT7WVA20EM/s1600-h/booking.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 299px; height: 239px;" src="http://4.bp.blogspot.com/_i5aXak1HR-0/Sh8lVNTO8SI/AAAAAAAAAW4/oAT7WVA20EM/s320/booking.png" alt="" id="BLOGGER_PHOTO_ID_5341028729362510114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;These links appear in the booking panel once your VMBed rental has started. Without some configuration they won't work. Luckily &lt;a href="http://rogierg.blogspot.com/2007/03/run-vnc-and-rdp-from-hyperlinks.html"&gt;someone&lt;/a&gt; has already figured it out for us Windows users. Make the changes as described by Electronic Samurai: &lt;a href="http://rogierg.blogspot.com/2007/03/run-vnc-and-rdp-from-hyperlinks.html"&gt;"Run VNC and RDP from hyperlinks"&lt;/a&gt; and you will be good to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-4366581755114092335?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/4366581755114092335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=4366581755114092335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/4366581755114092335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/4366581755114092335'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2009/05/using-rdphost-and-vnchost-links.html' title='Using rdp://host/ and vnc://host/ links'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_i5aXak1HR-0/Sh8lVNTO8SI/AAAAAAAAAW4/oAT7WVA20EM/s72-c/booking.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-1387269402955862591</id><published>2009-05-28T10:50:00.001-07:00</published><updated>2009-05-28T11:17:46.532-07:00</updated><title type='text'>Remote Desktop Access for Windows XP Home Edition</title><content type='html'>Windows XP home edition does not allow RDP access. So at &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt; we resort to using VNC to access these machines. VNC is fine but not optimal. I find that all VNC server offerings have some reliability or usability problems. Particularly with authentication, loss off interaction and connectivity. I do not mean in any way to disparage the fine work of the VNC server groups, it is understandably a tough undertaking to deal with all the Microsoft Windows versions and changing APIs. &lt;br /&gt;&lt;br /&gt;There is a &lt;a href="http://www.mydigitallife.info/2008/06/14/install-and-enable-remote-desktop-in-windows-xp-home-edition/"&gt;workaround&lt;/a&gt; but it entails converting the machine to XP Professional which somewhat defeats the VMBed purpose in that the machine you are testing in would no longer be a true XP Home machine. It is also not allowed by the Microsoft EULA. And so for now we are sticking with &lt;a href="http://www.tightvnc.com/"&gt;TightVNC&lt;/a&gt; which I have found to be the most reliable of the VNC servers out there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-1387269402955862591?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/1387269402955862591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=1387269402955862591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/1387269402955862591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/1387269402955862591'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2009/05/remote-desktop-access-for-windows-xp.html' title='Remote Desktop Access for Windows XP Home Edition'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-8286254416923068761</id><published>2009-04-01T20:04:00.000-07:00</published><updated>2009-04-03T14:57:08.467-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rakefile'/><category scheme='http://www.blogger.com/atom/ns#' term='rake'/><title type='text'>Dynamic Rakefile Test Environments For VMBed</title><content type='html'>I want to be able to run tests against various web servers (targets) and have them run on my local desktop or on various VMBed machines (environments). The following Rakefile will do just that for a NetBeans project. It makes a few assumptions:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Your tests are in a top level directory 'tests' (the &lt;a href="http://wiki.netbeans.org/Ruby"&gt;NetBeans Ruby&lt;/a&gt; standard)&lt;/li&gt;&lt;li&gt;Your test cases are named tc_xxx.rb&lt;/li&gt;&lt;li&gt;Your test suites are named ts_xxx.rb&lt;/li&gt;&lt;li&gt;You have grabbed the files vmbed.rb and test.rb from the VMBed test API and dropped them into your test directory. See &lt;a href="http://vmbed.com/?page/automate"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;You will need a .vmbed file to define your targets and environments. If you do not want to use VMBed environments that is ok, a default environment where the tests are executed locally will always be created.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Config file:&lt;/h3&gt;&lt;pre class="mycode"&gt;&amp;lt;config user="you" pass="yourpass"&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;!-- An already rented VMBed machine --&amp;gt;&lt;br /&gt;  &amp;lt;environment name="field" type="vmbed" args='-n "field - 17"' /&amp;gt;&lt;br /&gt;  &amp;lt;!-- On demand renting, released only if the test passes --&amp;gt;&lt;br /&gt;  &amp;lt;environment name="ondemand" type="vmbed" args="--noconfirm --release=success" /&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;target name="google UK"    args="--url=http://google.co.uk" /&amp;gt;&lt;br /&gt;  &amp;lt;target name="google main"  args="--url=http://google.com" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/config&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Rakefile:&lt;/h3&gt;&lt;pre class="mycode"&gt;# Rakefile which creates test targets for NetBeans Rake task runner that&lt;br /&gt;# get handled by the NetBeans Ruby test results viewer.&lt;br /&gt;&lt;br /&gt;# Tasks are extrapolated to run against a configured set of targets and&lt;br /&gt;# environments. These are defined in a ~/.vmbed config file.&lt;br /&gt;&lt;br /&gt;# vmbed.rb and test.rb should be dropped into your test scripts dir&lt;br /&gt;# (see http://vmbed.com/demo/code-examples/api-latest.tgz)&lt;br /&gt;$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__)) + "/test"&lt;br /&gt;&lt;br /&gt;require 'rubygems'&lt;br /&gt;require 'rake'&lt;br /&gt;require 'vmbed'&lt;br /&gt;&lt;br /&gt;# Handle running under NetBeans.&lt;br /&gt;ruby_opts = ""&lt;br /&gt;if ENV['NB_TEST_RUNNER']&lt;br /&gt;  ruby_opts = "-r\"#{ENV['NB_TEST_RUNNER']}\""&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# Load test targets (configurations) and test environments from the&lt;br /&gt;# VMBed configuration file.&lt;br /&gt;config = VMBed.load_config()&lt;br /&gt;targets = []&lt;br /&gt;(config/:target).each do |target|&lt;br /&gt;  raise "target without a name" if !target["name"] || target["name"].empty?&lt;br /&gt;  target["args"] = "" unless target["args"]&lt;br /&gt;  targets.push target&lt;br /&gt;end&lt;br /&gt;if targets.length == 0&lt;br /&gt;  # With no targets configured we can assume the tests will run&lt;br /&gt;  # fine with no arguments.&lt;br /&gt;  targets.push({ "name" =&gt; "noargs", "args" =&gt; "" })&lt;br /&gt;end&lt;br /&gt;environments = []&lt;br /&gt;(config/:environment).each do |environment|&lt;br /&gt;  raise "environment without a name" if !environment["name"] || environment["name"].empty?&lt;br /&gt;  raise "environment without a type (should be local or vmbed)" if !environment["type"] || environment["type"].empty?&lt;br /&gt;  environments.push environment&lt;br /&gt;end&lt;br /&gt;unless environments.find { |e| e["type"] == "local" }&lt;br /&gt;  # Always include a localhost environment&lt;br /&gt;  environments.unshift({ "name" =&gt; "localhost", "type" =&gt; "local" })&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;# Build test targets for each environment, configuration and file&lt;br /&gt;&lt;br /&gt;environments.each do |environment|&lt;br /&gt;  targets.each do |target|&lt;br /&gt;&lt;br /&gt;    all_test_cases = []&lt;br /&gt;    all_test_suites = []&lt;br /&gt;&lt;br /&gt;    FileList['test/*.rb'].each do |t|&lt;br /&gt;      if t =~ /t._/&lt;br /&gt;        testfile = File.basename(t)&lt;br /&gt;        taskname = testfile.sub('.rb', '')&lt;br /&gt;        taskdesc = taskname&lt;br /&gt;        taskname += "-" + environment["name"]&lt;br /&gt;        taskname += "-" + target["name"]&lt;br /&gt;        taskname.gsub!(' ', '_')&lt;br /&gt;        taskdesc += ", " + environment["name"]&lt;br /&gt;        taskdesc += ", " + target["name"]&lt;br /&gt;&lt;br /&gt;        # Defines the task&lt;br /&gt;        desc "Test #{taskdesc}"&lt;br /&gt;        sym = "test:#{taskname}".intern&lt;br /&gt;        task sym do&lt;br /&gt;          Dir.chdir "test" do&lt;br /&gt;            if environment["type"] == "local"&lt;br /&gt;              ruby "#{ruby_opts} #{testfile} -- #{target['args']}"&lt;br /&gt;            elsif environment["type"] == "vmbed"&lt;br /&gt;              ruby "test.rb " + environment["args"] + " #{testfile} -- -- " + target["args"]&lt;br /&gt;            else&lt;br /&gt;              raise "Unsupported environment type #{environment['type']}"&lt;br /&gt;            end&lt;br /&gt;          end&lt;br /&gt;        end&lt;br /&gt;      end&lt;br /&gt;      if t =~ /tc_/&lt;br /&gt;        # Test cases by our convention start with tc_&lt;br /&gt;        all_test_cases.push sym&lt;br /&gt;      elsif t =~ /ts_/&lt;br /&gt;        # Test suites with ts_&lt;br /&gt;        all_test_suites.push sym&lt;br /&gt;      else&lt;br /&gt;        # NOP: test class or script&lt;br /&gt;      end&lt;br /&gt;    end&lt;br /&gt;&lt;br /&gt;    # Define tasks for all the cases and suites defined for this&lt;br /&gt;    # target and environment.&lt;br /&gt;    taskname = "All_Cases-#{environment['name']}-#{target['name']}".gsub(' ', '_')&lt;br /&gt;    taskdesc = "All Cases, #{environment['name']}, #{target['name']}"&lt;br /&gt;    desc taskdesc&lt;br /&gt;    task "test:#{taskname}".intern =&gt; all_test_cases&lt;br /&gt;&lt;br /&gt;    if all_test_suites.length != 0&lt;br /&gt;      taskname = "All_Suites-#{environment['name']}-#{target['name']}".gsub(' ', '_')&lt;br /&gt;      taskdesc = "All Suites, #{environment['name']}, #{target['name']}"&lt;br /&gt;      desc taskdesc&lt;br /&gt;      task "test:#{taskname}".intern =&gt; all_test_suites&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-8286254416923068761?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/8286254416923068761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=8286254416923068761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/8286254416923068761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/8286254416923068761'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2009/04/dynamic-rakefile-test-environments-for.html' title='Dynamic Rakefile Test Environments For VMBed'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-9106462553867848930</id><published>2009-03-26T16:29:00.000-07:00</published><updated>2009-04-01T14:34:51.649-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='rakefile'/><category scheme='http://www.blogger.com/atom/ns#' term='rake'/><title type='text'>Rakefile test targets for NetBeans</title><content type='html'>The following Rakefile will dynamically create test targets based on the contents of a projects test directory. I find this useful for NetBeans IDE integration. The rake task names are such that the test results are handled by the NetBeans Ruby test runner. So they are nicely formatted and allow you to jump to any failure locations quickly.&lt;br /&gt;&lt;br /&gt;&lt;pre class="mycode"&gt;require 'rubygems'&lt;br /&gt;require 'rake'&lt;br /&gt;&lt;br /&gt;# Handle running under NetBeans.&lt;br /&gt;test_runner = ENV['NB_TEST_RUNNER']&lt;br /&gt;opts = ""&lt;br /&gt;if test_runner&lt;br /&gt;  opts = "-r\"#{test_runner}\""&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;all_test_cases = []&lt;br /&gt;all_test_suites = []&lt;br /&gt;&lt;br /&gt;FileList['test/*.rb'].each do |t|&lt;br /&gt;  taskname = File.basename(t).sub!('.rb', '')&lt;br /&gt;  desc "Test #{taskname}"&lt;br /&gt;  sym = "test:#{taskname}".intern&lt;br /&gt;  task sym do&lt;br /&gt;    ruby "#{opts} #{t}"&lt;br /&gt;  end&lt;br /&gt;  # Test cases by convention start with tc_&lt;br /&gt;  if t =~ /tc_/&lt;br /&gt;    all_test_cases.push sym&lt;br /&gt;  elsif t =~ /ts_/&lt;br /&gt;    all_test_suites.push sym&lt;br /&gt;  else&lt;br /&gt;    raise "#{t} not a test nor a suite"&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;desc "Run all test cases"&lt;br /&gt;task :test =&gt; all_test_cases&lt;br /&gt;&lt;br /&gt;desc "Run all test suites"&lt;br /&gt;task "test:suites".intern =&gt; all_test_suites&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-9106462553867848930?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/9106462553867848930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=9106462553867848930' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/9106462553867848930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/9106462553867848930'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2009/03/rakefile-test-targets-for-netbeans.html' title='Rakefile test targets for NetBeans'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-4724924197214924308</id><published>2009-03-24T18:36:00.000-07:00</published><updated>2009-04-01T14:40:43.867-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='watir'/><title type='text'>Watir tests under NetBeans</title><content type='html'>&lt;h3&gt;Background&lt;/h3&gt;This post covers writing a Watir web page test in a NetBeans IDE in preparation for running the test remotely using a &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt; machine. The test will accept a single --url parameter to simulate how you might configure NetBeans to run against a development, staging or production website. In this case the test will connect to different Googles, search for &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt; and expect the &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt; welcome page.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Install the latest &lt;a href="http://www.ruby-lang.org/"&gt;Ruby&lt;/a&gt; and &lt;a href="http://wtr.rubyforge.org/"&gt;Watir&lt;/a&gt;.&lt;/h3&gt;Use the links above to get the latest Ruby and Watir. Note: Watir does not run under the JRuby that comes bundled with NetBeans as of Mar/25/2009.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Install &lt;a href="http://www.netbeans.org/kb/docs/ruby/setting-up.html"&gt;NetBeans&lt;/a&gt; with Ruby support.&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Create a test project.&lt;/h3&gt;NetBeans -&gt; File -&gt; New Project -&gt; Ruby Application&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Call it "Search"&lt;/li&gt;&lt;li&gt;Uncheck 'Create Main File'&lt;/li&gt;&lt;li&gt;Select your installed Ruby for 'Ruby Platform' e.g. "Ruby 1.8.6-p111"&lt;/li&gt;&lt;li&gt;Finish&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Create a test script.&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;In the new "Search" project right click on "Test Files"&lt;/li&gt;&lt;li&gt;Select New -&gt; Unit Test&lt;/li&gt;&lt;li&gt;Change the class name to "Search"&lt;/li&gt;&lt;li&gt;Finish&lt;/li&gt;&lt;/ul&gt;This will have created a ruby test file called "search.rb". NetBeans gives us a nice template and we can add to that to create something like:&lt;pre class="mycode"&gt;# VMBed Search Test&lt;br /&gt;&lt;br /&gt;$:.unshift File.join(File.dirname(__FILE__),'..','lib')&lt;br /&gt;&lt;br /&gt;require 'test/unit'&lt;br /&gt;require 'watir'&lt;br /&gt;&lt;br /&gt;class VMBedTest &amp;lt; Test::Unit::TestCase&lt;br /&gt;def test_vmbed_in_results&lt;br /&gt; br = Watir::Browser.new&lt;br /&gt; br.goto("http://google.com/")&lt;br /&gt; br.text_field(:name, "q").set "vmbed"&lt;br /&gt; br.button(:name, "btnG").click&lt;br /&gt; assert(br.text.include?("Machines when you want them"), "VMBed appears in the results")&lt;br /&gt; br.close&lt;br /&gt;end&lt;br /&gt;end&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Run The Test&lt;/h3&gt;From the top menu select Run -&gt; Test Project&lt;span style="font-weight: bold;"&gt; OR &lt;/span&gt;Alt - F6&lt;br /&gt;&lt;h3&gt;Parameterize The Test&lt;/h3&gt;We'll use the Ruby Gem "getoptlong" to help with command line argument parsing. The test becomes:&lt;pre class="mycode"&gt;# VMBed Search Test&lt;br /&gt;&lt;br /&gt;$:.unshift File.join(File.dirname(__FILE__),'..','lib')&lt;br /&gt;&lt;br /&gt;require 'test/unit'&lt;br /&gt;require 'watir'&lt;br /&gt;require 'getoptlong'&lt;br /&gt;&lt;br /&gt;class Search &amp;lt; Test::Unit::TestCase&lt;br /&gt;&lt;br /&gt;# Avoid parsing args for each and every test run&lt;br /&gt;$args_parsed = false;&lt;br /&gt;&lt;br /&gt;def setup&lt;br /&gt; unless (true &amp;amp;&amp;amp; $args_parsed)&lt;br /&gt;   opts = GetoptLong.new(&lt;br /&gt;     [ '--help',    '-h', GetoptLong::NO_ARGUMENT ],&lt;br /&gt;     [ '--url',           GetoptLong::REQUIRED_ARGUMENT ]&lt;br /&gt;   )&lt;br /&gt;&lt;br /&gt;   opts.each do |opt, arg|&lt;br /&gt;     case opt&lt;br /&gt;     when '--url'&lt;br /&gt;       $url = arg&lt;br /&gt;     when '--help'&lt;br /&gt;       puts "USAGE: $0 --url=http://..."&lt;br /&gt;       exit 1&lt;br /&gt;     end&lt;br /&gt;   end&lt;br /&gt;   raise "Missing required --url" if defined?($url) == nil&lt;br /&gt;   $args_parsed = true&lt;br /&gt; end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def test_vmbed_in_results&lt;br /&gt; br = Watir::Browser.new&lt;br /&gt; br.goto($url)&lt;br /&gt; br.text_field(:name, "q").set "vmbed"&lt;br /&gt; br.button(:name, "btnG").click&lt;br /&gt; assert(br.text.include?("Machines when you want them"), "VMBed appears in the results")&lt;br /&gt; br.close&lt;br /&gt;end&lt;br /&gt;end&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Running A Parameterized Test&lt;/h3&gt;With NetBeans 6.5 there are two approaches. Use the project context menu option "Run/Debug Rake Task (Alt-Shift-R)". Or select the menu option "Run -&gt; Test Project (Alt-F6)". Both of these options have one significant problem. You cannot pass parameters with a space in them e.g. --name="fred bloggs". This is a limitation in Rakes test loader and cannot be worked around with escapes etc. Believe me I've tried. Lets repeat that for emphasis: &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;Don't use spaces in your test parameters, it will ruin your day.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;For Run/Debug Rake Task&lt;/h3&gt;Set 'Parameters' to &lt;blockquote&gt;TESTOPTS=-- --url=http://google.com/&lt;/blockquote&gt; or &lt;blockquote&gt;TESTOPTS=-- --url=http://google.co.co/uk/&lt;/blockquote&gt; to pick the target for your test.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;For Test Project&lt;/h3&gt;This approach is more configurable. From the configuration drop down you can customize an environment and then switch to the environment you want when you want to test. For this example I created two, "google.com" and "google.co.uk". For the former I set 'Rake Arguments' to &lt;blockquote&gt;-- TESTOPTS='-- --url=http://google.com/'&lt;/blockquote&gt; and in the later &lt;blockquote&gt;-- TESTOPTS='-- --url=http://google.co.uk/'&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The exact syntax is important.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-4724924197214924308?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/4724924197214924308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=4724924197214924308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/4724924197214924308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/4724924197214924308'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2009/03/vmbed-example-watir-tests-under.html' title='Watir tests under NetBeans'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-6533773652026794518</id><published>2008-09-16T16:35:00.000-07:00</published><updated>2009-04-01T20:03:22.953-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='vix api'/><category scheme='http://www.blogger.com/atom/ns#' term='watir'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><title type='text'>Automated Watir install in an XP VMWare Virtual Machine</title><content type='html'>On &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt; we pretty much want to automate everything. We particularly want to automate anything we have to do on one or more VMs. Ideally all our VMs are already setup with all the software we want but as time progresses we find ourselves having to go back and add missing pieces or upgrading existing pieces.&lt;br /&gt;&lt;br /&gt;VMWare has the handy VIX API for automation so here is the Perl and CMD.EXE scripts that we use to install Watir under an XP VM.&lt;br /&gt;&lt;br /&gt;&lt;pre class="mycode"&gt;#!/usr/bin/perl                                                                                                                                             &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;# Install Ruby and then Watir on a running windows VM                                                                                                       &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;use strict;                                                                                                                                                 &lt;br /&gt;use VMware::Vix::Simple;                                                                                                                                    &lt;br /&gt;use VMware::Vix::API::Constants;                                                                                                                            &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;# Hardcoded parameters - you will need to change for your environment                                                                                       &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;my $hostName = '1.2.3.4';                                                                                                                                   &lt;br /&gt;my $vh_userName = 'vmware';                                                                                                                                 &lt;br /&gt;my $vh_password = 'xxxxxx';                                                                                                                                 &lt;br /&gt;my $vmx = '/var/lib/vmware/Virtual Machines/donleavy - 14/Windows XP Professional.vmx';                                                                     &lt;br /&gt;my $vm_userName = 'admin';                                                                                                                                  &lt;br /&gt;my $vm_password = 'xxxxxx';                                                                                                                                 &lt;br /&gt;my $cmdScript = '/vmbed/packages/install.cmd';                                                                                                              &lt;br /&gt;my $rubyRelease = '/vmbed/packages/ruby186-26.exe';                                                                                                         &lt;br /&gt;my $rubyVer = '1-8-6';                                                                                                                                      &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;# Connect to the VMs Host                                                                                                                                   &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;my $err = VIX_OK;                                                                                                                                           &lt;br /&gt;my $hostHandle = VIX_INVALID_HANDLE;                                                                                                                        &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;($err, $hostHandle) = HostConnect(VIX_API_VERSION,                                                                                                          &lt;br /&gt;                                  VIX_SERVICEPROVIDER_VMWARE_SERVER,                                                                                        &lt;br /&gt;                                  $hostName,                                                                                                                &lt;br /&gt;                                  0,                                                                                                                        &lt;br /&gt;                                  $vh_userName,                                                                                                             &lt;br /&gt;                                  $vh_password,                                                                                                             &lt;br /&gt;                                  0,                                                                                                                        &lt;br /&gt;                                  VIX_INVALID_HANDLE);                                                                                                      &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;if ($err != VIX_OK) {                                                                                                                                       &lt;br /&gt;    die "HostConnect() failed: ".GetErrorText($err);                                                                                                        &lt;br /&gt;}                                                                                                                                                           &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;# Register                                                                                                                                                  &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;$err = RegisterVM($hostHandle, $vmx);                                                                                                                       &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;if ($err != VIX_OK) {                                                                                                                                       &lt;br /&gt;    die "RegisterVM() failed: ".GetErrorText($err);                                                                                                         &lt;br /&gt;}                                                                                                                                                           &lt;br /&gt;                                                                                                                                                            &lt;br /&gt;# Connect and login      &lt;br /&gt;&lt;br /&gt;($err, my $vm) = VMOpen($hostHandle, $vmx);                                                                                                                  &lt;br /&gt;if ($err != VIX_OK) {                                                                                                                                        &lt;br /&gt;    die "VMOpen() failed: ".GetErrorText($err);                                                                                                              &lt;br /&gt;}                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;$err = VMLoginInGuest($vm,                                                                                                                                   &lt;br /&gt;                      $vm_userName,                                                                                                                          &lt;br /&gt;                      $vm_password,                                                                                                                          &lt;br /&gt;                      0);                                                                                                                                    &lt;br /&gt;if ($err != VIX_OK) {                                                                                                                                        &lt;br /&gt;    die "VMLoginInGuest() failed: ".GetErrorText($err);                                                                                                      &lt;br /&gt;}                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;# Create working dirs on the VM                                                                                                                              &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;my $root = 'C:\vmbed';                                                                                                                                       &lt;br /&gt;my @dependent_dirs =                                                                                                                                         &lt;br /&gt;  (                                                                                                                                                          &lt;br /&gt;   $root,                                                                                                                                                    &lt;br /&gt;   $root.'\packages',                                                                                                                                        &lt;br /&gt;   $root.'\results',                                                                                                                                         &lt;br /&gt;  );                                                                                                                                                         &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;foreach my $dep (@dependent_dirs) {                                                                                                                          &lt;br /&gt;    # (VIX API for server 1.0 does not support the VMDirectory commands)                                                                                     &lt;br /&gt;    $err = VMRunProgramInGuest($vm, 'CMD.EXE', "/C MKDIR $dep", 0, VIX_INVALID_HANDLE);                                                                      &lt;br /&gt;    die "VMRunProgramInGuest() failed: ".GetErrorText($err) if $err != VIX_OK;                                                                               &lt;br /&gt;    sleep 2; # (VMRunProgramInGuest() seems to return before the mkdir is done)                                                                              &lt;br /&gt;}                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;# Copy over the packages as needed                                                                                                                           &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;print "Copying Ruby release...\n";                                                                                                                           &lt;br /&gt;$err = VMCopyFileFromHostToGuest($vm, $rubyRelease, $root.'\packages\ruby-'.$rubyVer.'.exe', 0, VIX_INVALID_HANDLE);                                         &lt;br /&gt;die "VMCopyFileFromHostToGuest() failed: ".GetErrorText($err) if $err != VIX_OK;                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;my $remInstall = $root.'\packages\install.cmd';                                                                                                              &lt;br /&gt;$err = VMCopyFileFromHostToGuest($vm, $cmdScript, $remInstall, 0, VIX_INVALID_HANDLE);                                                                       &lt;br /&gt;die "VMCopyFileFromHostToGuest() failed: ".GetErrorText($err) if $err != VIX_OK;                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;# Run the cmd.exe install script - executed via CALL to block until it has completed                                                                         &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;print "Installing Ruby &amp; Watir...\n";                                                                                                                        &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;my $remResults = $root.'\results\install.res';                                                                                                               &lt;br /&gt;$err = VMRunProgramInGuest($vm, "CMD.EXE", '/C CALL '.$remInstall.' &gt; '.$remResults, 0, VIX_INVALID_HANDLE);                                                 &lt;br /&gt;die "VMRunProgramInGuest() failed: ".GetErrorText($err) if $err != VIX_OK;                                                                                   &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;# Check the outcome.                                                                                                                                         &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;my $locResults = "/tmp/install.res";                                                                                                                         &lt;br /&gt;$err = VMCopyFileFromGuestToHost($vm, $remResults, $locResults, 0, VIX_INVALID_HANDLE);                                                                      &lt;br /&gt;die "VMCopyFileFromGuestToHost() failed: ".GetErrorText($err) if $err != VIX_OK;                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;my $results = `cat $locResults`;                                                                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;if ($results !~ /Watir Stack Installed OK/) {                                                                                                                &lt;br /&gt;    print $results;                                                                                                                                          &lt;br /&gt;    die "Install failed";                                                                                                                                    &lt;br /&gt;}                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;print "Done.\n";                                                                                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;exit 0;                                                                                                                                                                                                                                                                                                         &lt;/pre&gt;&lt;br /&gt;                                                                                                                                                          &lt;br /&gt;Still here?! The following is the install.cmd batch file to do the actual work:&lt;br /&gt;&lt;br /&gt;&lt;pre class="mycode"&gt;@echo off                                                                                                                                                    &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;echo %time%                                                                                                                                                  &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;REM Automate the install of Ruby and then Watir                                                                                                              &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;SET rubyDest=C:\ruby                                                                                                                                         &lt;br /&gt;SET rubyRelease=C:\vmbed\packages\ruby-1-8-6.exe                                                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;REM try to remove any existing ruby install                                                                                                                  &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;IF EXIST "%rubyDest%" (                                                                                                                                      &lt;br /&gt;    echo %time% Removing previous install                                                                                                                    &lt;br /&gt;    %rubyDest%\uninstall.exe /S                                                                                                                              &lt;br /&gt;)                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;REM wait for the uninstall to complete                                                                                                                       &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;set count=1                                                                                                                                                  &lt;br /&gt;set limit=1111111111                                                                                                                                         &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;:_uninst_ruby_loop                                                                                                                                           &lt;br /&gt;if EXIST "%rubyDest%" (                                                                                                                                      &lt;br /&gt;    echo %time% Removing                                                                                                                                     &lt;br /&gt;    ping 127.0.0.1 -n 4 -w 1000 &gt; nul                                                                                                                        &lt;br /&gt;    set count=%count%1                                                                                                                                       &lt;br /&gt;    IF NOT [%count%]==[%limit%] goto _uninst_ruby_loop                                                                                                       &lt;br /&gt;)                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;IF EXIST "%rubyDest%" (                                                                                                                                      &lt;br /&gt;    echo %time% Failed to remove Ruby                                                                                                                        &lt;br /&gt;    goto :EOF                                                                                                                                                &lt;br /&gt;)                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;REM install ruby                                                                                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;echo %time% Installing Ruby                                                                                                                                  &lt;br /&gt;%rubyRelease% /S                                                                                                                                             &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;REM Check for install completion - the install blocks the script until                                                                                       &lt;br /&gt;REM it completes unlike the uninstall.                                                                                                                       &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;REM (the uninstaller is the last file to arrive)                                                                                                             &lt;br /&gt;set rubyCheck=%rubyDest%\uninstall.exe                                                                                                                       &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;IF NOT EXIST "%rubyCheck%" (                                                                                                                                 &lt;br /&gt;    echo %time% Failed to install Ruby                                                                                                                       &lt;br /&gt;    goto :EOF                                                                                                                                                &lt;br /&gt;)                                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;echo %time% Ruby Installed                                                                                                                                   &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;REM install watir                                                                                                                                            &lt;br /&gt;                                                                                                                                                             &lt;br /&gt;echo %time% Updating Gem                                                                                                                                     &lt;br /&gt;cd C:\ruby\bin                                                                                                                                               &lt;br /&gt;call gem.bat update --system                                                                                                                                 &lt;br /&gt;echo %time% Installing Watir                                                                                                                                 &lt;br /&gt;call gem.bat install watir                                                                                                                                   &lt;br /&gt;echo %time% Watir Stack Installed OK                                                                                                                                                                                                                                                                                                                                                                                                                              &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now that you have Ruby installed you should not have to do any CMD.EXE scripting again. Yay!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-6533773652026794518?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/6533773652026794518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=6533773652026794518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/6533773652026794518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/6533773652026794518'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2008/09/automated-watir-install-in-xp-vmware.html' title='Automated Watir install in an XP VMWare Virtual Machine'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-7735353561436064874</id><published>2008-07-22T16:44:00.000-07:00</published><updated>2009-04-01T14:38:42.542-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><title type='text'>VHD to VMDK conversion for VMWare Server 1.0.4</title><content type='html'>It would be real nice to give people access to &lt;a href="http://technet.microsoft.com/en-us/bb738372.aspx"&gt;Microsofts trial VHD&lt;/a&gt; format machines at &lt;a href="http://vmbed.com/"&gt;vmbed&lt;/a&gt;. And as I'm not planning on running Windows Server anytime soon I'll need to convert to VMDK format. Various blogs &lt;a href="http://www.ntpro.nl/blog/archives/194-Convert-Virtual-Disks-from-VHD-to-VMDK.html"&gt;[1]&lt;/a&gt; tout &lt;a href="http://www.winimage.com/winimage.htm"&gt;WinImage&lt;/a&gt; as being the way to go.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;An account is required to download one of the trial VHDs. (I had to use IE to complete the registration process *sigh*).&lt;/li&gt;&lt;li&gt;Pick a trial VHD. I decided to go with "Microsoft Windows Vista 30-Day Eval VHD". However this presented me with 18 file parts to download! Not exactly a compelling trial.&lt;/li&gt;&lt;li&gt;After downloading all the parts run the .exe this should extract to a .vhd file in the same directory. &lt;span style="color: rgb(204, 0, 0);"&gt;You'll need a large amount of free disk space for all this, 5GB for the .vhd and 5GB for the .vmdk.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Get a copy of winimage. &lt;a href="http://winimage.com/"&gt;http://winimage.com/&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Start winimage.&lt;/li&gt;&lt;li&gt;Select Disk --&gt; Convert Virtual Hard Disk Image&lt;/li&gt;&lt;li&gt;Select Create Dynamically Expanding Virtual Hard Disk&lt;/li&gt;&lt;li&gt;Click OK&lt;/li&gt;&lt;li&gt;Save As vista.vmdk&lt;/li&gt;&lt;li&gt;Wait a while...&lt;/li&gt;&lt;li&gt;Copy the vmdk file to the machine running vmware server.&lt;/li&gt;&lt;li&gt;Run VMWare Server Console and connect to the server.&lt;/li&gt;&lt;li&gt;Create a new virtual machine.&lt;/li&gt;&lt;li&gt;In the wizard choose "Custom configuration".&lt;/li&gt;&lt;li&gt;Choose other options as you see fit.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;When prompted to "Select a Disk" choose "Use an existing virtual disk".&lt;/li&gt;&lt;li&gt;Browse to the vmdk file.&lt;/li&gt;&lt;li&gt;Click Finish.&lt;/li&gt;&lt;li&gt;Start the new VM and voila!&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-7735353561436064874?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/7735353561436064874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=7735353561436064874' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/7735353561436064874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/7735353561436064874'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2008/07/vhd-to-vmdk-conversion-for-vmware.html' title='VHD to VMDK conversion for VMWare Server 1.0.4'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992165011308618361.post-1486230176107564238</id><published>2008-07-17T12:36:00.000-07:00</published><updated>2009-04-01T14:37:41.294-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ec2'/><title type='text'>Trying out Amazon EC2</title><content type='html'>I am intrigued by Amazons &lt;a href="http://www.amazon.com/gp/browse.html?node=201590011"&gt;Compute Cloud&lt;/a&gt;. So I thought I'd try it out. To see if I could get a machine up and running with an end user desktop accessible via VNC in a  few hours.&lt;br /&gt;&lt;br /&gt;EC2 has some parallels with what I'm doing with &lt;a href="http://vmbed.com/"&gt;VMBed&lt;/a&gt;. But it is more developer oriented and Linux only as far as I can tell.&lt;br /&gt;&lt;h3&gt;Setup&lt;/h3&gt;I'm working on my laptop: XP with cygwin.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Read over the &lt;a href="http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide/"&gt;getting started guide&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Sign up to AWS, Storage and EC2.&lt;/li&gt;&lt;li&gt;Install JRE on your machine. http://java.sun.com/j2se/1.5.0/&lt;/li&gt;&lt;li&gt;Add some environment variables.&lt;/li&gt;&lt;/ul&gt;I ended up with the following additions to my ~/.bashrc:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export EC2_PRIVATE_KEY=~/.ec2/pk-XXXXXXXXXXXXXX.pem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export EC2_CERT=~/.ec2/cert-XXXXXXXXXXXXXX.pem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export JAVA_HOME=/cygdrive/c/Program\ Files/Java/jre1.5.0_16&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export EC2_HOME=/home/gavin/work/ec2/ec2-api-tools-1.3-19403&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export PATH=$PATH:$EC2_HOME/bin:$JAVA_HOME/bin&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;Finding a suitable machine&lt;/h3&gt;I went with a base ubuntu "Ubuntu 8.04 LTS Hardy" &lt;span style="font-weight: bold;"&gt;ami-26bc584f&lt;/span&gt;  from &lt;a href="http://alestic.com/"&gt;alestic&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For this machine I needed a key for root access once the system starts.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ec2-add-keypair gsg-keypair &gt; ~/.ssh/id_rsa-gsg-keypair &amp;amp;&amp;amp; chmod 0600 ~/.ssh/id_rsa-gsg-keypair&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To start it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ec2-run-instances ami-26bc584f -k gsg-keypair&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;RESERVATION     r-158d437c      082676351450    default&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;INSTANCE        &lt;/span&gt;&lt;span style="color: rgb(204, 0, 0);font-family:courier new;" &gt;i-a38b59ca&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;      ami-26bc584f                    pending gsg-keypair     0               m1.small        2008-07-18T02:14:51+0000        us-east-1c      aki-a71cf9ce    ari-a51cf9cc&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The output shows the instance id (i-a38b59ca) required for future operations.&lt;br /&gt;&lt;br /&gt;To allow ping, ssh and vnc on port 5900:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ec2-authorize default -P icmp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ec2-authorize default -P tcp -p 22&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ec2-authorize default -P tcp -p 5900&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Login with:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ssh -i ~/.ssh/id_rsa-gsg-keypair root@ec2-75-101-207-240.compute-1.amazonaws.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run tasksel and select Ubuntu Desktop. This will take quite some time to complete with no initial status indication for the first few minutes.&lt;br /&gt;&lt;br /&gt;Then install tightvncserver:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ apt-get install tightvncserver&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create a user for the desktop:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ apt-get install user-setup&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ user-setup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As the new user you should now be able to run tightvncserver:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ su - &lt;/span&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;newuser&lt;/span&gt;&lt;user&gt;&lt;br /&gt;&lt;user&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;newuser&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;$ tightvncserver :0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Enter a password for your server and then connect from your desktop machine using your favorite VNC client (e.g. &lt;a href="http://www.tightvnc.com/"&gt;tightvnc&lt;/a&gt;) and the IP of the server.&lt;br /&gt;&lt;br /&gt;When you connect there is no gnome-desktop but there should be a terminal window. You can use gnome-session to start gnome. (This worked for me with lots of errors but at this point I'd gotten as far as I wanted and felt no need to perfect the environment.)&lt;br /&gt;&lt;/user&gt;&lt;/user&gt;&lt;h3&gt;Cleanup&lt;/h3&gt;You had better stop what you started or Amazon will continue to charge you:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ec2-describe-instances&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RESERVATION     r-158d437c      082676351450    default&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;INSTANCE        i-a38b59ca      ami-26bc584f    ec2-75-101-207-240.compute-1.amazonaws.com      ip-10-251-91-116.ec2.internal   running gsg-keypair     0               m1.small        2008-07-18T02:14:51+0000     us-east-1c      aki-a71cf9ce    ari-a51cf9cc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ ec2-terminate-instances i-a38b59ca&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;INSTANCE        i-a38b59ca      running shutting-down&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8992165011308618361-1486230176107564238?l=vmbed.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vmbed.blogspot.com/feeds/1486230176107564238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8992165011308618361&amp;postID=1486230176107564238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/1486230176107564238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992165011308618361/posts/default/1486230176107564238'/><link rel='alternate' type='text/html' href='http://vmbed.blogspot.com/2008/07/trying-out-amazon-ec2.html' title='Trying out Amazon EC2'/><author><name>VMBed</name><uri>http://www.blogger.com/profile/04828006151857217783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
