<?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>Pillage and Plunder &#187; kvm</title>
	<atom:link href="http://pillageandplunder.net/tag/kvm/feed/" rel="self" type="application/rss+xml" />
	<link>http://pillageandplunder.net</link>
	<description>Viking's programming blog</description>
	<lastBuildDate>Tue, 25 Aug 2009 00:21:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Init.d script for mounting a KVM/QEmu image in Linux</title>
		<link>http://pillageandplunder.net/2009/04/initd-script-for-mounting-a-kvmqemu-image-in-linux/</link>
		<comments>http://pillageandplunder.net/2009/04/initd-script-for-mounting-a-kvmqemu-image-in-linux/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 18:36:47 +0000</pubDate>
		<dc:creator>viking</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://pillageandplunder.net/?p=63</guid>
		<description><![CDATA[I have a couple of projects that are deployed on Windows, so I use a virtual Windows machine on my Ubuntu box for development.  At first, I tried using Samba to mount a share to my virtual machine, but that ended up causing problems.  If my virtual server went down and I forgot [...]]]></description>
			<content:encoded><![CDATA[<p>I have a couple of projects that are deployed on Windows, so I use a virtual Windows machine on my Ubuntu box for development.  At first, I tried using Samba to mount a share to my virtual machine, but that ended up causing problems.  If my virtual server went down and I forgot to unmount, bad things happened.</p>
<p>Googling around, I discovered a <a href="http://equivocation.org/node/107">how-to</a> on how to mount the virtual machine disk directly via loopback.  I decided to write an init script for it:</p>
<div style="height: 20em; overflow: auto">

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/sh</span>
<span style="color: #666666; font-style: italic;">### BEGIN INIT INFO</span>
<span style="color: #666666; font-style: italic;"># Provides:          mount-windows-image</span>
<span style="color: #666666; font-style: italic;"># Required-Start:    $remote_fs</span>
<span style="color: #666666; font-style: italic;"># Required-Stop:     $remote_fs</span>
<span style="color: #666666; font-style: italic;"># Default-Start:     2 3 4 5</span>
<span style="color: #666666; font-style: italic;"># Default-Stop:      0 1 6</span>
<span style="color: #666666; font-style: italic;"># Short-Description: Mounts a KVM windows image</span>
<span style="color: #666666; font-style: italic;">### END INIT INFO</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Author: Jeremy Stephens &lt;viking415@gmail.com&gt;</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Please remove the &quot;Author&quot; lines above and replace them</span>
<span style="color: #666666; font-style: italic;"># with your own name if you copy and modify this script.</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Do NOT &quot;set -e&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># PATH should only include /usr/* if it runs after the mountnfs.sh script</span>
<span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #007800;">DESC</span>=<span style="color: #ff0000;">&quot;Mounts a KVM Windows image&quot;</span>
<span style="color: #007800;">SCRIPTNAME</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mount-windows-image
<span style="color: #007800;">DEV_FILE</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>mount-windows-image
&nbsp;
<span style="color: #007800;">MOUNT_DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>win
<span style="color: #007800;">IMAGE_FILE</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>libvirt<span style="color: #000000; font-weight: bold;">/</span>qemu<span style="color: #000000; font-weight: bold;">/</span>xp.img
<span style="color: #007800;">UID</span>=<span style="color: #000000;">1017</span>
<span style="color: #007800;">GID</span>=<span style="color: #000000;">1017</span>
<span style="color: #007800;">FMASK</span>=0137
<span style="color: #007800;">DMASK</span>=0027
&nbsp;
<span style="color: #666666; font-style: italic;"># Load the VERBOSE setting and other rcS variables</span>
. <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>init<span style="color: #000000; font-weight: bold;">/</span>vars.sh
&nbsp;
<span style="color: #666666; font-style: italic;"># Define LSB log_* functions.</span>
<span style="color: #666666; font-style: italic;"># Depend on lsb-base (&gt;= 3.0-6) to ensure that this file is present.</span>
. <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>lsb<span style="color: #000000; font-weight: bold;">/</span>init-functions
&nbsp;
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Function that starts the daemon/service</span>
<span style="color: #666666; font-style: italic;">#</span>
do_start<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #666666; font-style: italic;"># Return</span>
	<span style="color: #666666; font-style: italic;">#   0 if daemon has been started</span>
	<span style="color: #666666; font-style: italic;">#   1 if daemon was already running</span>
	<span style="color: #666666; font-style: italic;">#   2 if daemon could not be started</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$MOUNT_DIR</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> -l<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
          <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
        <span style="color: #000000; font-weight: bold;">else</span>
          <span style="color: #007800;">DEV</span>=<span style="color: #000000; font-weight: bold;">`</span>losetup -f<span style="color: #000000; font-weight: bold;">`</span>
          <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$DEV</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$DEV_FILE</span>
          losetup <span style="color: #007800;">$DEV</span> <span style="color: #007800;">$IMAGE_FILE</span>
          kpartx <span style="color: #660033;">-a</span> <span style="color: #007800;">$DEV</span>
          <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> ntfs <span style="color: #660033;">-o</span> <span style="color: #007800;">uid</span>=<span style="color: #007800;">$UID</span>,<span style="color: #007800;">gid</span>=<span style="color: #007800;">$GID</span>,<span style="color: #007800;">fmask</span>=<span style="color: #007800;">$FMASK</span>,<span style="color: #007800;">dmask</span>=<span style="color: #007800;">$DMASK</span> \
            <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$DEV</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> -F<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #ff0000;">'{print $3}'</span><span style="color: #000000; font-weight: bold;">`</span>p1 <span style="color: #007800;">$MOUNT_DIR</span>
          <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
            <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">0</span>
          <span style="color: #000000; font-weight: bold;">else</span>
            kpartx <span style="color: #660033;">-d</span> <span style="color: #007800;">$DEV</span>
            losetup <span style="color: #660033;">-d</span> <span style="color: #007800;">$DEV</span>
            <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$DEV_FILE</span>
            <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">2</span>
          <span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Function that stops the daemon/service</span>
<span style="color: #666666; font-style: italic;">#</span>
do_stop<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
	<span style="color: #666666; font-style: italic;"># Return</span>
	<span style="color: #666666; font-style: italic;">#   0 if daemon has been stopped</span>
	<span style="color: #666666; font-style: italic;">#   1 if daemon was already stopped</span>
	<span style="color: #666666; font-style: italic;">#   2 if daemon could not be stopped</span>
	<span style="color: #666666; font-style: italic;">#   other if a failure occurred</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$MOUNT_DIR</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> -l<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
          <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
        <span style="color: #000000; font-weight: bold;">else</span>
          <span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #007800;">$MOUNT_DIR</span>
          <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
            <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span>
            <span style="color: #007800;">DEV</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$DEV_FILE</span><span style="color: #000000; font-weight: bold;">`</span>
            kpartx <span style="color: #660033;">-d</span> <span style="color: #007800;">$DEV</span>
            losetup <span style="color: #660033;">-d</span> <span style="color: #007800;">$DEV</span>
            <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$DEV_FILE</span>
            <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">0</span>
          <span style="color: #000000; font-weight: bold;">else</span>
            <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">2</span>
          <span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Function that sends a SIGHUP to the daemon/service</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#do_reload() {</span>
<span style="color: #666666; font-style: italic;">#	#</span>
<span style="color: #666666; font-style: italic;">#	# If the daemon can reload its configuration without</span>
<span style="color: #666666; font-style: italic;">#	# restarting (for example, when it is sent a SIGHUP),</span>
<span style="color: #666666; font-style: italic;">#	# then implement that here.</span>
<span style="color: #666666; font-style: italic;">#	#</span>
<span style="color: #666666; font-style: italic;">#	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME</span>
<span style="color: #666666; font-style: italic;">#	return 0</span>
<span style="color: #666666; font-style: italic;">#}</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
  start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$VERBOSE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_daemon_msg <span style="color: #ff0000;">&quot;Starting <span style="color: #007800;">$DESC</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NAME</span>&quot;</span>
	do_start
	<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$?&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
		<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$VERBOSE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">;;</span>
		<span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$VERBOSE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">;;</span>
	<span style="color: #000000; font-weight: bold;">esac</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
  stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$VERBOSE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_daemon_msg <span style="color: #ff0000;">&quot;Stopping <span style="color: #007800;">$DESC</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$NAME</span>&quot;</span>
	do_stop
	<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$?&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
		<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$VERBOSE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">;;</span>
		<span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$VERBOSE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">;;</span>
	<span style="color: #000000; font-weight: bold;">esac</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #666666; font-style: italic;">#reload|force-reload)</span>
	<span style="color: #666666; font-style: italic;">#</span>
	<span style="color: #666666; font-style: italic;"># If do_reload() is not implemented then leave this commented out</span>
	<span style="color: #666666; font-style: italic;"># and leave 'force-reload' as an alias for 'restart'.</span>
	<span style="color: #666666; font-style: italic;">#</span>
	<span style="color: #666666; font-style: italic;">#log_daemon_msg &quot;Reloading $DESC&quot; &quot;$NAME&quot;</span>
	<span style="color: #666666; font-style: italic;">#do_reload</span>
	<span style="color: #666666; font-style: italic;">#log_end_msg $?</span>
	<span style="color: #666666; font-style: italic;">#;;</span>
<span style="color: #666666; font-style: italic;">#  restart|force-reload)</span>
<span style="color: #666666; font-style: italic;">#	#</span>
<span style="color: #666666; font-style: italic;">#	# If the &quot;reload&quot; option is implemented then remove the</span>
<span style="color: #666666; font-style: italic;">#	# 'force-reload' alias</span>
<span style="color: #666666; font-style: italic;">#	#</span>
<span style="color: #666666; font-style: italic;">#	log_daemon_msg &quot;Restarting $DESC&quot; &quot;$NAME&quot;</span>
<span style="color: #666666; font-style: italic;">#	do_stop</span>
<span style="color: #666666; font-style: italic;">#	case &quot;$?&quot; in</span>
<span style="color: #666666; font-style: italic;">#	  0|1)</span>
<span style="color: #666666; font-style: italic;">#		do_start</span>
<span style="color: #666666; font-style: italic;">#		case &quot;$?&quot; in</span>
<span style="color: #666666; font-style: italic;">#			0) log_end_msg 0 ;;</span>
<span style="color: #666666; font-style: italic;">#			1) log_end_msg 1 ;; # Old process is still running</span>
<span style="color: #666666; font-style: italic;">#			*) log_end_msg 1 ;; # Failed to start</span>
<span style="color: #666666; font-style: italic;">#		esac</span>
<span style="color: #666666; font-style: italic;">#		;;</span>
<span style="color: #666666; font-style: italic;">#	  *)</span>
<span style="color: #666666; font-style: italic;">#	  	# Failed to stop</span>
<span style="color: #666666; font-style: italic;">#		log_end_msg 1</span>
<span style="color: #666666; font-style: italic;">#		;;</span>
<span style="color: #666666; font-style: italic;">#	esac</span>
<span style="color: #666666; font-style: italic;">#	;;</span>
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
	<span style="color: #666666; font-style: italic;">#echo &quot;Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}&quot; &gt;&amp;2</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: <span style="color: #007800;">$SCRIPTNAME</span> {start|stop}&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">3</span>
	<span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
:</pre></div></div>

</div>
<p><br/></p>
<p>Install the script in <code>/etc/init.d</code> and make it executable.  Make sure you change the following variables in the script: UID, GID, MOUNT_DIR, IMAGE_FILE.  You can add the script to the boot process via the <code>update-rc.d</code> command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mount-windows-image
update-rc.d mount-windows-image defaults</pre></div></div>

<p>This script mounts the first partition on a Windows virtual image, and it assumes the disk is formatted as NTFS.  Tweaking the script to fit your needs shouldn&#8217;t be too difficult.  I use Ubuntu, although I imagine the script would work in Debian.  Your mileage may vary.</p>
<p><b>Note</b>: I believe this only works with raw virtual images.  Also, It&#8217;s probably a good idea to at least skim <a href="http://equivocation.org/node/107">the post I linked above</a> for additional information and caveats.</p>
<p><a href='http://pillageandplunder.net/wp-content/uploads/2009/04/mount-windows-image'>&raquo; Download script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pillageandplunder.net/2009/04/initd-script-for-mounting-a-kvmqemu-image-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
