<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Richard WM Jones</title>
	<atom:link href="http://rwmj.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rwmj.wordpress.com</link>
	<description>Virtualization, tools and tips</description>
	<lastBuildDate>Sat, 18 May 2013 08:24:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='rwmj.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Richard WM Jones</title>
		<link>http://rwmj.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rwmj.wordpress.com/osd.xml" title="Richard WM Jones" />
	<atom:link rel='hub' href='http://rwmj.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Fedora 19 virtualization test day 2013-05-28</title>
		<link>http://rwmj.wordpress.com/2013/05/17/fedora-19-virtualization-test-day-2013-05-28/</link>
		<comments>http://rwmj.wordpress.com/2013/05/17/fedora-19-virtualization-test-day-2013-05-28/#comments</comments>
		<pubDate>Fri, 17 May 2013 18:51:55 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[test day]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[virt-tools]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4370</guid>
		<description><![CDATA[Put it in your calendars .. May 28th is Fedora 19 virtualization test day. New features include nested virtualization on Intel, new Boxes, new libosinfo, new qemu, KMS-based spice driver, live storage migration and virtio RNG. Every day is libguestfs &#8230; <a href="http://rwmj.wordpress.com/2013/05/17/fedora-19-virtualization-test-day-2013-05-28/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4370&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Put it in your calendars ..  <a href="https://fedoraproject.org/wiki/Test_Day:2013-05-28_Virtualization">May 28th is Fedora 19 virtualization test day</a>.</p>
<p>New features include <a href="http://kashyapc.wordpress.com/">nested virtualization on Intel</a>, new <a href="https://live.gnome.org/Boxes">Boxes</a>, new <a href="http://libosinfo.org/">libosinfo</a>, new qemu, <a href="https://fedoraproject.org/wiki/Features/QXLKMSSupport">KMS-based spice driver</a>, <a href="https://fedoraproject.org/wiki/Features/Virt_Storage_Migration">live storage migration</a> and <a href="https://fedoraproject.org/wiki/Features/Virtio_RNG">virtio RNG</a>.</p>
<p>Every day is libguestfs test day.  Just <a href="http://libguestfs.org/guestfs-testing.1.html">follow the instructions here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4370/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4370&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/17/fedora-19-virtualization-test-day-2013-05-28/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Scanning offline guests using OpenSCAP and guestmount</title>
		<link>http://rwmj.wordpress.com/2013/05/16/scanning-offline-guests-using-openscap-and-guestmount/</link>
		<comments>http://rwmj.wordpress.com/2013/05/16/scanning-offline-guests-using-openscap-and-guestmount/#comments</comments>
		<pubDate>Thu, 16 May 2013 21:41:16 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cve]]></category>
		<category><![CDATA[guestmount]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[openscap]]></category>
		<category><![CDATA[scap]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4367</guid>
		<description><![CDATA[OpenSCAP is a project that lets you scan physical machines looking for known vulnerabilities or configuration problems (like public-writable directories). Obviously it would be good to use this to scan guests, especially in a cloud scenario where you want to &#8230; <a href="http://rwmj.wordpress.com/2013/05/16/scanning-offline-guests-using-openscap-and-guestmount/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4367&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.open-scap.org/page/Main_Page">OpenSCAP</a> is a project that lets you scan physical machines looking for <a href="http://scap.nist.gov/">known vulnerabilities</a> or configuration problems (like public-writable directories).</p>
<p>Obviously it would be good to use this to scan guests, especially in a cloud scenario where you want to help naive users not to deploy guests that are just going to get pwned the minute they go online.</p>
<p><a href="https://www.redhat.com/archives/open-scap-list/2013-May/msg00007.html">New upstream in OpenSCAP</a> is the ability to scan chroots.  You can use this to scan containers, or <a href="http://libguestfs.org/guestmount.1.html">using guestmount</a>, scan offline guests.</p>
<p>Usage with guestmount is described <a href="https://www.redhat.com/archives/open-scap-list/2013-May/msg00007.html">here</a> or <a href="https://www.redhat.com/archives/open-scap-list/2013-May/msg00021.html">here</a>.</p>
<p><i>(Thanks Daniel Kopecek and Peter Vrabec)</i></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4367&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/16/scanning-offline-guests-using-openscap-and-guestmount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing exabyte-sized filesystems using qcow2 and guestfish</title>
		<link>http://rwmj.wordpress.com/2013/05/13/testing-exabyte-sized-filesystems-using-qcow2-and-guestfish/</link>
		<comments>http://rwmj.wordpress.com/2013/05/13/testing-exabyte-sized-filesystems-using-qcow2-and-guestfish/#comments</comments>
		<pubDate>Mon, 13 May 2013 10:53:07 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[exabyte]]></category>
		<category><![CDATA[guestfish]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[qcow2]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4358</guid>
		<description><![CDATA[You can use qcow2 backing files as a convenient way to test what happens when you try to create exabyte-sized filesystems. Just to remind you, 1 exabyte is a million terabytes, or a pile of ordinary hard disks stacked 8 &#8230; <a href="http://rwmj.wordpress.com/2013/05/13/testing-exabyte-sized-filesystems-using-qcow2-and-guestfish/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4358&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>You can use qcow2 backing files as a convenient way to test what happens when you try to create exabyte-sized filesystems.  Just to remind you, 1 exabyte is a million terabytes, or a pile of ordinary hard disks stacked 8 miles high.</p>
<p>There is a <a href="https://bugs.launchpad.net/qemu/+bug/865518">bug in qemu that prevents you from creating very large disks</a> unless you adjust the <code>cluster_size</code> option <i>(thanks Kevin Wolf)</i>:</p>
<pre>
$ <b>qemu-img create -f qcow2 huge.qcow2 \
      $((1024*1024))T -o cluster_size=2M</b>
Formatting 'huge.qcow2', fmt=qcow2 size=1152921504606846976 encryption=off cluster_size=2097152 lazy_refcounts=off 
</pre>
<p>After that you can just attach the disk to <a href="http://libguestfs.org/guestfish.1.html">guestfish</a> and start playing with huge filesystems.</p>
<p><i>[I should note that <a href="http://libguestfs.org/virt-rescue.1.html">virt-rescue</a> is probably a better choice of tool here, especially for people who need to experiment with unusual filesystem or LVM options]</i></p>
<pre>
$ <b>guestfish -a huge.qcow2</b>

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

&gt;&lt;fs&gt; <b>run</b>
&gt;&lt;fs&gt; <b>blockdev-getsize64 /dev/sda</b>
1152921504606846976
&gt;&lt;fs&gt; <b>part-disk /dev/sda gpt</b>
</pre>
<p>Ext4 (<a href="http://en.wikipedia.org/wiki/Ext4">according to Wikipedia</a>) is supposed to support 1 exabyte disks, but I couldn&#8217;t get that to work, possibly because there was not enough RAM:</p>
<pre>
&gt;&lt;fs&gt; <b>mkfs ext4 /dev/sda1</b>
libguestfs: error: mkfs: ext4: /dev/sda1: mke2fs 1.42.5 (29-Jul-2012)
/dev/sda1: Not enough space to build proposed filesystem while setting up superblock
</pre>
<p>XFS could create a filesystem, but I didn&#8217;t let it run to completion because <a href="https://rwmj.wordpress.com/2009/11/08/filesystem-metadata-overhead/">it would need about 5 petabytes to store the filesystem metadata</a>:</p>
<pre>
&gt;&lt;fs&gt; <b>mkfs xfs /dev/sda1</b>
<i>[ disks churn for many minutes while qcow2 file grows
and grows and grows ... ]</i>
</pre>
<p>LVM2 PVs are possible, but creating a VG requires us to adjust the extent size:</p>
<pre>
&gt;&lt;fs&gt; <b>pvcreate /dev/sda1</b>
&gt;&lt;fs&gt; <b>vgcreate VG /dev/sda1</b>
libguestfs: error: vgcreate:   PV /dev/sda1 too large for extent size 4.00 MiB.
  Format-specific setup of physical volume '/dev/sda1' failed.
  Unable to add physical volume '/dev/sda1' to volume group 'VG'.
&gt;&lt;fs&gt; <b>debug sh "vgcreate -s 1G VG /dev/sda1"</b>
  Volume group "VG" successfully created
&gt;&lt;fs&gt; <b>lvcreate LV VG 1000000000</b>
&gt;&lt;fs&gt; <b>lvs-full</b>
[0] = {
  lv_name: LV
[...]
  lv_size: 1048576536870912
}
</pre>
<p><a href="http://rwmj.wordpress.com/2009/11/04/petabytes-exabytes-why-not/#content">Previously &#8230;</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4358/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4358&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/13/testing-exabyte-sized-filesystems-using-qcow2-and-guestfish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Using libguestfs over HTTP (and FTP)</title>
		<link>http://rwmj.wordpress.com/2013/05/11/using-libguestfs-over-http-and-ftp/</link>
		<comments>http://rwmj.wordpress.com/2013/05/11/using-libguestfs-over-http-and-ftp/#comments</comments>
		<pubDate>Sat, 11 May 2013 17:49:06 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[ftps]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[tftp]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4354</guid>
		<description><![CDATA[New in libguestfs upstream and 1.21.39 is the ability to access disks over FTP, FTPS, HTTP, HTTPS and TFTP (read-only). You can use it like this: $ export LIBGUESTFS_BACKEND=direct $ guestfish --ro -a http://x.x.x.x/scratch/winxp.img -i Welcome to guestfish, the guest &#8230; <a href="http://rwmj.wordpress.com/2013/05/11/using-libguestfs-over-http-and-ftp/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4354&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>New in <a href="http://libguestfs.org">libguestfs</a> <a href="https://github.com/libguestfs/libguestfs/commit/83f74f5c564c51a1324b12e5edc4b50356d49dc6">upstream and 1.21.39</a> is the ability to access disks over FTP, FTPS, HTTP, HTTPS and TFTP (read-only).</p>
<p>You can use it like this:</p>
<pre>
$ <b>export LIBGUESTFS_BACKEND=direct</b>
$ <b>guestfish --ro -a http://x.x.x.x/scratch/winxp.img -i</b>

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

Operating system: Microsoft Windows XP
/dev/sda1 mounted on /

&gt;&lt;fs&gt; <b>ll /</b>
total 1573209
drwxrwxrwx  1 root root       4096 Apr 16  2012 .
drwxr-xr-x 23 1000 1000       4096 May 11 18:45 ..
-rwxrwxrwx  1 root root          0 Oct 11  2011 AUTOEXEC.BAT
-rwxrwxrwx  1 root root          0 Oct 11  2011 CONFIG.SYS
drwxrwxrwx  1 root root       4096 Oct 11  2011 Documents and Settings
-rwxrwxrwx  1 root root          0 Oct 11  2011 IO.SYS
-rwxrwxrwx  1 root root          0 Oct 11  2011 MSDOS.SYS
-rwxrwxrwx  1 root root      47564 Apr 14  2008 NTDETECT.COM
drwxrwxrwx  1 root root       4096 Oct 11  2011 Program Files
drwxrwxrwx  1 root root       4096 Oct 11  2011 System Volume Information
drwxrwxrwx  1 root root      28672 Oct 11  2011 WINDOWS
-rwxrwxrwx  1 root root        211 Oct 11  2011 boot.ini
-rwxrwxrwx  1 root root     250048 Apr 14  2008 ntldr
-rwxrwxrwx  1 root root 1610612736 Oct 11  2011 pagefile.sys
</pre>
<p>Apart from being a tiny bit slower, it just works as if the disk was local.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4354&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/11/using-libguestfs-over-http-and-ftp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Using libguestfs to access iSCSI disks</title>
		<link>http://rwmj.wordpress.com/2013/05/11/using-libguestfs-to-access-iscsi-disks/</link>
		<comments>http://rwmj.wordpress.com/2013/05/11/using-libguestfs-to-access-iscsi-disks/#comments</comments>
		<pubDate>Sat, 11 May 2013 16:19:37 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[guestfish]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[tgtd]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4352</guid>
		<description><![CDATA[In libguestfs &#8805; 1.21.38 you can access at least some iSCSI disks. On my server (RHEL 6 in this case) I create an iSCSI target backed by a Windows XP disk image: # service tgtd start Starting SCSI target daemon: &#8230; <a href="http://rwmj.wordpress.com/2013/05/11/using-libguestfs-to-access-iscsi-disks/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4352&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In <a href="http://libguestfs.org">libguestfs &ge; 1.21.38</a> you can access at least some iSCSI disks.</p>
<p>On my server (RHEL 6 in this case) I create an iSCSI target backed by a Windows XP disk image:</p>
<pre>
# <b>service tgtd start</b>
Starting SCSI target daemon:                       [  OK  ]
# <b>tgtadm --lld iscsi --op new --mode target --tid 1 \
      -T iqn.1994-05.com.redhat</b>
# <b>chcon system_u:object_r:tgtd_var_lib_t:s0 /tmp/winxp.img</b>
# <b>tgtadm --lld iscsi --op new --mode logicalunit --tid 1 \
      --lun 1 -b /tmp/winxp.img</b>
# <b>tgt-admin -s</b>
...
</pre>
<p>Previously I opened port 3250 on the server.  Because libguestfs doesn&#8217;t yet support authentication against the iSCSI server, I had to bypass that:</p>
<pre>
# <b>tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL</b>
</pre>
<p>Now on the client, I can connect to the iSCSI target using libguestfs like this:</p>
<pre>
$ <b>export LIBGUESTFS_BACKEND=direct</b>
$ <b>guestfish --format=raw -a iscsi://x.x.x.x/iqn.1994-05.com.redhat/1 -i</b>

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

Operating system: Microsoft Windows XP
/dev/sda1 mounted on /

&gt;&lt;fs&gt; <b>ll /</b>
total 1573209
drwxrwxrwx  1 root root       4096 Apr 16  2012 .
drwxr-xr-x 23 1000 1000       4096 May 11 17:16 ..
-rwxrwxrwx  1 root root          0 Oct 11  2011 AUTOEXEC.BAT
-rwxrwxrwx  1 root root          0 Oct 11  2011 CONFIG.SYS
drwxrwxrwx  1 root root       4096 Oct 11  2011 Documents and Settings
-rwxrwxrwx  1 root root          0 Oct 11  2011 IO.SYS
-rwxrwxrwx  1 root root          0 Oct 11  2011 MSDOS.SYS
-rwxrwxrwx  1 root root      47564 Apr 14  2008 NTDETECT.COM
drwxrwxrwx  1 root root       4096 Oct 11  2011 Program Files
drwxrwxrwx  1 root root       4096 Oct 11  2011 System Volume Information
drwxrwxrwx  1 root root      28672 Oct 11  2011 WINDOWS
-rwxrwxrwx  1 root root        211 Oct 11  2011 boot.ini
-rwxrwxrwx  1 root root     250048 Apr 14  2008 ntldr
-rwxrwxrwx  1 root root 1610612736 Oct 11  2011 pagefile.sys
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4352/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4352&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/11/using-libguestfs-to-access-iscsi-disks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Using libguestfs to read Hyper-V VHDX disk images</title>
		<link>http://rwmj.wordpress.com/2013/05/10/using-libguestfs-to-read-hyper-v-vhdx-disk-images/</link>
		<comments>http://rwmj.wordpress.com/2013/05/10/using-libguestfs-to-read-hyper-v-vhdx-disk-images/#comments</comments>
		<pubDate>Fri, 10 May 2013 15:18:13 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[guestfish]]></category>
		<category><![CDATA[hyper-v]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[vhdx]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4350</guid>
		<description><![CDATA[(Thanks to Jeff Cody for both writing the code and helping me to get it to work). New in qemu 1.5 is read-only support for Hyper-V&#8216;s native disk format, vhdx. You can now open vhdx files in libguestfs just like &#8230; <a href="http://rwmj.wordpress.com/2013/05/10/using-libguestfs-to-read-hyper-v-vhdx-disk-images/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4350&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><i>(Thanks to Jeff Cody for both writing the code and helping me to get it to work).</i></p>
<p>New in qemu 1.5 is read-only support for <a href="http://www.microsoft.com/hyper-v-server">Hyper-V</a>&#8216;s native disk format, <a href="http://technet.microsoft.com/en-us/library/hh831446.aspx">vhdx</a>.  You can now open vhdx files in <a href="http://libguestfs.org">libguestfs</a> just like any other:</p>
<pre>
$ <b>guestfish --ro --format=vhdx -a /tmp/f18x64.vhdx -i</b>

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

<b>Operating system: Fedora release 18 (Spherical Cow)
/dev/fedora/root mounted on /
/dev/sda1 mounted on /boot</b>
</pre>
<p>Notes:</p>
<ol>
<li> As stated above, you will need the very latest qemu for this to work.
<li> You must specify <code>--format=vhdx</code> at the moment because of a missing feature in libvirt.
<li> You must specify <code>--ro</code> because writing is not supported (by the qemu driver).
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4350/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4350&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/10/using-libguestfs-to-read-hyper-v-vhdx-disk-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Tip: Convert a Windows DVD ISO to a bootable USB key using guestfish</title>
		<link>http://rwmj.wordpress.com/2013/05/09/tip-convert-a-windows-dvd-iso-to-a-bootable-usb-key-using-guestfish/</link>
		<comments>http://rwmj.wordpress.com/2013/05/09/tip-convert-a-windows-dvd-iso-to-a-bootable-usb-key-using-guestfish/#comments</comments>
		<pubDate>Thu, 09 May 2013 14:11:25 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[guestfish]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[syslinux]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[virt-tools]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 8]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4347</guid>
		<description><![CDATA[Situation: You have a Windows DVD (or ISO), but like any sane person in 2013 you don&#8217;t have a DVD drive on the computer. You want to convert the Windows DVD into a bootable USB key. There are many recipes &#8230; <a href="http://rwmj.wordpress.com/2013/05/09/tip-convert-a-windows-dvd-iso-to-a-bootable-usb-key-using-guestfish/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4347&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Situation: You have a Windows DVD (or ISO), but like any sane person in 2013 you don&#8217;t have a DVD drive on the computer.  You want to convert the Windows DVD into a bootable USB key.  There are many recipes for this online, but they all require another Windows machine and of course cannot be automated.</p>
<p>However with <a href="http://libguestfs.org/guestfish.1.html">guestfish</a> (and the always brilliant <a href="http://www.syslinux.org">SYSLINUX</a> doing most of the heavy lifting), this script will unpack the ISO and turn it into a bootable USB key.</p>
<p><b>Notes:</b></p>
<ol>
<li> I am not going to support this script.  You will need to read the script, look up the commands in the <a href="http://libguestfs.org/guestfish.1.html">guestfish</a> man page, and understand what it does.  Any requests for help will be deleted unread.
<li> You need to edit the USB key device before using the script.
<li> You need libguestfs &ge; 1.21 with SYSLINUX support compiled in.
</ol>
<pre><tt><i><font color="#9A1900">#!/bin/bash -</font></i>

guestfish <font color="#990000">&lt;&lt;</font><font color="#FF0000">'EOF'</font>
trace on

add-ro en_microsoft_hyper-v_server_2012_x64_dvd_915600<font color="#990000">.</font>iso

<i><font color="#9A1900"># NB: The next line MUST be changed to your USB drive.</font></i>
<i><font color="#9A1900"># ANYTHING ON THIS DRIVE WILL BE OVERWRITTEN WITHOUT WARNING.</font></i>
add /dev/sdX

run

<i><font color="#9A1900"># Inside the appliance, /dev/sda = DVD, /dev/sdb = USB.</font></i>
<i><font color="#9A1900"># THESE ARE NOT RELATED TO HOST DISK NAMES.</font></i>

echo <font color="#FF0000">"Partitioning the USB disk ..."</font>
part-init /dev/sdb mbr
part-add /dev/sdb p <font color="#993399">63</font> -<font color="#993399">1</font>
part-set-mbr-id /dev/sdb <font color="#993399">1</font> <font color="#993399">0xb</font>
part-set-bootable /dev/sdb <font color="#993399">1</font> <b><font color="#0000FF">true</font></b>
mkfs vfat /dev/sdb<font color="#993399">1</font>

echo <font color="#FF0000">"Copying the contents of the DVD to the USB key ..."</font>
mkmountpoint /cd
mkmountpoint /usb
mount /dev/sda /cd
mount /dev/sdb<font color="#993399">1</font> /usb
<i><font color="#9A1900"># XXX We should add cp-r command XXX</font></i>
debug sh <font color="#FF0000">"cp -rP /sysroot/cd/* /sysroot/usb"</font>
<i><font color="#9A1900">#glob cp-a /cd/* /usb</font></i>
umount /cd
umount /usb
rmmountpoint /cd
rmmountpoint /usb

echo <font color="#FF0000">"Making the USB key bootable using SYSLINUX ..."</font>
syslinux /dev/sdb<font color="#993399">1</font>
mount /dev/sdb<font color="#993399">1</font> <font color="#990000">/</font>
upload /usr/share/syslinux/chain<font color="#990000">.</font>c32 /chain<font color="#990000">.</font>c32
write /syslinux<font color="#990000">.</font>cfg <font color="#FF0000">"DEFAULT windows</font><font color="#CC33CC">\n\n</font><font color="#FF0000">LABEL windows</font><font color="#CC33CC">\n</font><font color="#FF0000">COM32 chain.c32</font><font color="#CC33CC">\n</font><font color="#FF0000">APPEND fs ntldr=/bootmgr</font><font color="#CC33CC">\n</font><font color="#FF0000">"</font>
umount /dev/sdb<font color="#993399">1</font>
upload /usr/share/syslinux/mbr<font color="#990000">.</font>bin /dev/sdb

echo <font color="#FF0000">"Finished."</font>

EOF

</tt></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4347/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4347/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4347&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/09/tip-convert-a-windows-dvd-iso-to-a-bootable-usb-key-using-guestfish/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Using libguestfs remotely with Python and rpyc</title>
		<link>http://rwmj.wordpress.com/2013/05/07/using-libguestfs-remotely-with-python-and-rpyc/</link>
		<comments>http://rwmj.wordpress.com/2013/05/07/using-libguestfs-remotely-with-python-and-rpyc/#comments</comments>
		<pubDate>Tue, 07 May 2013 12:30:17 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rpyc]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4344</guid>
		<description><![CDATA[libguestfs has high quality Python bindings. Using rpyc you can make a remote libguestfs server with almost no effort at all. Firstly start an rpyc server: $ /usr/lib/python2.7/site-packages/rpyc/servers/classic_server.py [SLAVE INFO 13:21:17 tid=140019939981120] server started on 0.0.0.0:18812 [SLAVE INFO 13:21:17 tid=140019784894208] &#8230; <a href="http://rwmj.wordpress.com/2013/05/07/using-libguestfs-remotely-with-python-and-rpyc/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4344&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://libguestfs.org/">libguestfs</a> has <a href="http://libguestfs.org/guestfs-python.3.html">high quality Python bindings</a>.  Using <a href="http://rpyc.readthedocs.org/">rpyc</a> you can make a remote libguestfs server with almost no effort at all.</p>
<p>Firstly start an rpyc server:</p>
<pre>
$ <b>/usr/lib/python2.7/site-packages/rpyc/servers/classic_server.py</b>
[SLAVE      INFO       13:21:17 tid=140019939981120] server started on 0.0.0.0:18812
[SLAVE      INFO       13:21:17 tid=140019784894208] started background auto-register thread (interval = 60)
[REGCLNT    INFO       13:21:17] registering on 255.255.255.255:18811
[REGCLNT    WARNING    13:21:19] no registry acknowledged
</pre>
<p>Now, possibly from the same machine or some other machine, you can connect to this server and use Python objects remotely as if they were local:</p>
<pre>
$ python
Python 2.7.3 (default, Aug  9 2012, 17:23:57) 
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; <b>import rpyc</b>
&gt;&gt;&gt; <b>c = rpyc.classic.connect('localhost')</b>
</pre>
<p>You can now create a libguestfs handle, following the <a href="http://libguestfs.org/guestfs-python.3.html#example-2:-inspect-a-virtual-machine-disk-image">example here</a>.</p>
<pre>
&gt;&gt;&gt; <b>g = c.modules.guestfs.GuestFS()</b>
&gt;&gt;&gt; <b>g.version()</b>
{'release': 36L, 'major': 1L, 'minor': 21L, 'extra': 'fedora=20,release=1.fc20,libvirt'}
&gt;&gt;&gt; <b>g.add_drive('/dev/fedora/f18x64', readonly=True)</b>
&gt;&gt;&gt; <b>g.launch()</b>
&gt;&gt;&gt; <b>roots = g.inspect_os()</b>
&gt;&gt;&gt; <b>g.inspect_get_product_name(roots[0])</b>
'Fedora release 18 (Spherical Cow)'
&gt;&gt;&gt; <b>g.inspect_get_mountpoints(roots[0])</b>
[('/', '/dev/mapper/fedora-root'), ('/boot', '/dev/sda1')]
</pre>
<p>As you can see, the <code>g</code> object is transparently remoted without you needing to do anything.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4344&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/05/07/using-libguestfs-remotely-with-python-and-rpyc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Brian Steven&#8217;s keynote at OpenStack Summit</title>
		<link>http://rwmj.wordpress.com/2013/04/26/brian-stevens-keynote-at-openstack-summit/</link>
		<comments>http://rwmj.wordpress.com/2013/04/26/brian-stevens-keynote-at-openstack-summit/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 18:17:31 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4339</guid>
		<description><![CDATA[Brian is Red Hat&#8217;s CTO, and hence my boss&#8217;s boss&#8217;s boss (or something like that). This is a pretty good (and honest) talk about Red Hat&#8217;s plans for OpenStack. Edit: By the way, the thumbnail (the one I see at &#8230; <a href="http://rwmj.wordpress.com/2013/04/26/brian-stevens-keynote-at-openstack-summit/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4339&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='560' height='315' src='http://www.youtube.com/embed/uwQ9bQ5h_MA?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>Brian is Red Hat&#8217;s CTO, and hence my boss&#8217;s boss&#8217;s boss (or something like that).  This is a pretty good (and honest) talk about Red Hat&#8217;s plans for OpenStack.</p>
<p>Edit: By the way, the thumbnail (the one I see at any rate) is <i>not</i> Brian.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4339/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4339&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/26/brian-stevens-keynote-at-openstack-summit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Amazon (or just &#8220;online ordering&#8221;) rant</title>
		<link>http://rwmj.wordpress.com/2013/04/23/amazon-or-just-online-ordering-rant/</link>
		<comments>http://rwmj.wordpress.com/2013/04/23/amazon-or-just-online-ordering-rant/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 19:46:54 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4334</guid>
		<description><![CDATA[There are some items which are just not possible to order online any more, assuming you want something of minimal quality. These include: chargers for mobile phones &#8212; all now fake as far as I can tell batteries for older &#8230; <a href="http://rwmj.wordpress.com/2013/04/23/amazon-or-just-online-ordering-rant/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4334&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There are some items which are just not possible to order online any more, assuming you want something of minimal quality.  These include:</p>
<ol>
<li> chargers for mobile phones &#8212; all now <a href="http://www.righto.com/2012/03/inside-cheap-phone-charger-and-why-you.html">fake</a> as far as I can tell
<li> batteries for older mobile phones &#8212; second hand, dead, fake, or simply the wrong battery
<li> consumer cables, like USB to micro USB
<li> <a href="http://www.amazon.co.uk/review/R1JAVCVL2MTUCS/ref=cm_cr_dp_title?ie=UTF8&amp;ASIN=B006FL60T8&amp;channel=detail-glance&amp;nodeID=11052681&amp;store=kitchen">convection heaters</a> &#8212; didn&#8217;t expect this, but I can&#8217;t find a reliable one (for the new office) online
</ol>
<p>That&#8217;s not counting the stuff where it&#8217;s still just about possible to get non-fake stuff, but it&#8217;s a crapshoot, eg. computer memory, hard disks, batteries, flash memory.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4334/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4334&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/23/amazon-or-just-online-ordering-rant/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Using rsync with libguestfs</title>
		<link>http://rwmj.wordpress.com/2013/04/22/using-rsync-with-libguestfs/</link>
		<comments>http://rwmj.wordpress.com/2013/04/22/using-rsync-with-libguestfs/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 09:09:56 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[guestfish]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4323</guid>
		<description><![CDATA[Since libguestfs 1.20 it has been possible to use rsync to upload or download files to a disk image incrementally. This is one way to do backups, but note that it won&#8217;t work on live guests unless you take a &#8230; <a href="http://rwmj.wordpress.com/2013/04/22/using-rsync-with-libguestfs/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4323&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Since <a href="http://libguestfs.org/">libguestfs</a> 1.20 it has been possible to use <a href="http://rsync.samba.org/">rsync</a> to upload or download files to a disk image incrementally.  This is one way to do <a href="http://libguestfs.org/guestfs-faq.1.html#can-i-use-guestfish---ro-as-a-way-to-backup-my-virtual-machines-">backups</a>, but <a href="http://libguestfs.org/guestfs-faq.1.html#why-cant-i-run-fsck-on-a-live-filesystem-using-guestfish---ro-">note that it won&#8217;t work on live guests unless you take a snapshot</a>.</p>
<p>rsync involves using a network connection into or out of the appliance, and is therefore a lot more involved to set up.  The script below shows one way to do this, by running an <a href="http://rsync.samba.org/ftp/rsync/rsyncd.conf.html">rsync daemon</a> on the host, and letting the libguestfs appliance connect to it.</p>
<p>The script runs rsync inside the appliance, copying <code>/home</code> from the attached disk image out to <code>/tmp/backup</code> on the host.  If the operation is repeated, then only incrementally changed files will be copied out.  (To incrementally delete files on the target, add the <code>deletedest:true</code> flag).</p>
<p>Note you will need to open port 2999 on your host&#8217;s firewall for this to work.</p>
<pre>
<i><font color="#9A1900">#!/bin/bash -</font></i>

<b><font color="#0000FF">set</font></b> -x

<i><font color="#9A1900"># The target directory.</font></i>
mkdir -p /tmp/backup

<i><font color="#9A1900"># Create the daemon.</font></i>
rm -f /tmp/rsyncd<font color="#990000">.</font>pid

cat <font color="#990000">&lt;&lt;</font>EOF <font color="#990000">&gt;</font> /tmp/rsyncd<font color="#990000">.</font>conf
port <font color="#990000">=</font> <font color="#993399">2999</font>
pid file <font color="#990000">=</font> /tmp/rsyncd<font color="#990000">.</font>pid

<font color="#990000">[</font>backup<font color="#990000">]</font>
  path <font color="#990000">=</font> /tmp/backup
  use chroot <font color="#990000">=</font> <b><font color="#0000FF">false</font></b>
  <b><font color="#0000FF">read</font></b> only <font color="#990000">=</font> <b><font color="#0000FF">false</font></b>
EOF

rsync --daemon --config<font color="#990000">=</font>/tmp/rsyncd<font color="#990000">.</font>conf

<i><font color="#9A1900"># Run guestfish and attach to the guest.</font></i>
guestfish --ro --network -a /dev/fedora/f19rawhidex32 -i <font color="#990000">&lt;&lt;</font>EOF
trace on
rsync-out /home rsync<font color="#990000">:</font>//rjones@<font color="#993399">192.168</font><font color="#990000">.</font><font color="#993399">122.1</font><font color="#990000">:</font><font color="#993399">2999</font>/backup archive<font color="#990000">:</font><b><font color="#0000FF">true</font></b>
EOF

<i><font color="#9A1900"># Kill the rsync daemon.</font></i>
kill `cat /tmp/rsyncd<font color="#990000">.</font>pid`
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4323/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4323&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/22/using-rsync-with-libguestfs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Garden office &#8211; undercoat done</title>
		<link>http://rwmj.wordpress.com/2013/04/20/garden-office-undercoat-done/</link>
		<comments>http://rwmj.wordpress.com/2013/04/20/garden-office-undercoat-done/#comments</comments>
		<pubDate>Sat, 20 Apr 2013 16:59:43 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[garden office]]></category>

		<guid isPermaLink="false">https://rwmj.wordpress.com/?p=4319</guid>
		<description><![CDATA[Inside there&#8217;s a ring for sockets and a lighting circuit. The windows and doors are pre-made double-glazed units.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4319&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://rwmj.files.wordpress.com/2013/04/wpid-20130420_175641.jpg"><img title="" class="alignnone size-full" alt="image" src="http://rwmj.files.wordpress.com/2013/04/wpid-20130420_175641.jpg?w=500" /></a></p>
<p>Inside there&#8217;s a ring for sockets and a lighting circuit.  The windows and doors are pre-made double-glazed units.</p>
<p><a href="http://rwmj.files.wordpress.com/2013/04/wpid-20130420_175710.jpg"><img title="20130420_175710.jpg" class="alignnone size-full" alt="image" src="http://rwmj.files.wordpress.com/2013/04/wpid-20130420_175710.jpg?w=500" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4319&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/20/garden-office-undercoat-done/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/wpid-20130420_175641.jpg" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/wpid-20130420_175710.jpg" medium="image">
			<media:title type="html">20130420_175710.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Garden office &#8211; roof going on</title>
		<link>http://rwmj.wordpress.com/2013/04/19/garden-office-roof-going-on/</link>
		<comments>http://rwmj.wordpress.com/2013/04/19/garden-office-roof-going-on/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 14:15:21 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[garden office]]></category>

		<guid isPermaLink="false">https://rwmj.wordpress.com/?p=4315</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4315&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://rwmj.files.wordpress.com/2013/04/wpid-20130419_144703.jpg"><img title="" class="alignnone size-full" alt="image" src="http://rwmj.files.wordpress.com/2013/04/wpid-20130419_144703.jpg?w=500" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4315/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4315/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4315&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/19/garden-office-roof-going-on/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/wpid-20130419_144703.jpg" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Garden office &#8211; construction continues</title>
		<link>http://rwmj.wordpress.com/2013/04/18/garden-office-construction-continues/</link>
		<comments>http://rwmj.wordpress.com/2013/04/18/garden-office-construction-continues/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 17:39:01 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://rwmj.wordpress.com/?p=4309</guid>
		<description><![CDATA[Update: Further progress this morning &#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4309&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_183001.jpg"><img title="" class="alignnone size-full" alt="image" src="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_183001.jpg?w=500" /></a></p>
<p><b>Update:</b> Further progress this morning &#8230;</p>
<p><a href="http://rwmj.files.wordpress.com/2013/04/wpid-20130419_094942.jpg"><img title="20130419_094942.jpg" class="alignnone size-full" alt="image" src="http://rwmj.files.wordpress.com/2013/04/wpid-20130419_094942.jpg?w=500" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4309&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/18/garden-office-construction-continues/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_183001.jpg" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/wpid-20130419_094942.jpg" medium="image">
			<media:title type="html">20130419_094942.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>5 minute introduction to Augeas (config file editing library)</title>
		<link>http://rwmj.wordpress.com/2013/04/18/5-minute-introduction-to-augeas-config-file-editing-library/</link>
		<comments>http://rwmj.wordpress.com/2013/04/18/5-minute-introduction-to-augeas-config-file-editing-library/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 16:26:46 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[augeas]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4303</guid>
		<description><![CDATA[Dominic Cleal&#8217;s short introduction to the Augeas configuration API. We use Augeas a lot in libguestfs and virt-v2v, and it&#8217;s been very effective for us. I asked Dominic how he made this video. He uses gtk-recordmydesktop, max 100/100 audio/video quality, &#8230; <a href="http://rwmj.wordpress.com/2013/04/18/5-minute-introduction-to-augeas-config-file-editing-library/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4303&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Dominic Cleal&#8217;s short introduction to the <a href="http://augeas.net/">Augeas</a> configuration API.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='420' height='315' src='http://www.youtube.com/embed/ufRzrXNKgoo?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>We use Augeas a lot in libguestfs and virt-v2v, and it&#8217;s been very effective for us.</p>
<hr />
<p>I asked Dominic how he made this video.</p>
<p>He uses <a href="http://recordmydesktop.sourceforge.net/about.php">gtk-recordmydesktop</a>, max 100/100 audio/video quality, 30fps, 2 channel audio at 48kHz.</p>
<p>Sound and video are recorded at the same time, with a Sennheiser headset.</p>
<p>Editing is done in <a href="http://www.kdenlive.org/">kdenlive</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4303/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4303&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/18/5-minute-introduction-to-augeas-config-file-editing-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>Garden office &#8211; construction starts</title>
		<link>http://rwmj.wordpress.com/2013/04/18/garden-office-construction-starts/</link>
		<comments>http://rwmj.wordpress.com/2013/04/18/garden-office-construction-starts/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 13:55:06 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[garden office]]></category>

		<guid isPermaLink="false">https://rwmj.wordpress.com/?p=4298</guid>
		<description><![CDATA[The cabin has a double wall which will contain insulation. Shown here is the ring main for the four sets of sockets around the room.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4298&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_145101.jpg"><img title="" class="alignnone size-full" alt="image" src="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_145101.jpg?w=500" /></a></p>
<p>The cabin has a double wall which will contain insulation.  Shown here is the <a href="http://en.wikipedia.org/wiki/Ring_circuit">ring main</a> for the four sets of sockets around the room.</p>
<p><a href="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_145150.jpg"><img title="20130418_145150.jpg" class="alignnone size-full" alt="image" src="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_145150.jpg?w=500" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4298&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/18/garden-office-construction-starts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_145101.jpg" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/wpid-20130418_145150.jpg" medium="image">
			<media:title type="html">20130418_145150.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Garden office &#8211; constructing the base</title>
		<link>http://rwmj.wordpress.com/2013/04/17/garden-office-constructing-the-base/</link>
		<comments>http://rwmj.wordpress.com/2013/04/17/garden-office-constructing-the-base/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 13:31:39 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[garden office]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4285</guid>
		<description><![CDATA[Also (not shown) they dug a trench down the side of the garden for electrics and network cables. We&#8217;re going to run some hefty armoured cable, plus two or three cat 7 network cables, covered with bricks and warning tape, &#8230; <a href="http://rwmj.wordpress.com/2013/04/17/garden-office-constructing-the-base/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4285&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://rwmj.files.wordpress.com/2013/04/office-base1.jpg?w=500"></p>
<p>Also (not shown) they dug a trench down the side of the garden for electrics and network cables.  We&#8217;re going to run some hefty armoured cable, plus two or three <a href="http://en.wikipedia.org/wiki/Category_7_cable"><q>cat 7</q> network cables</a>, covered with bricks and warning tape, at a depth of 18&#8243; (mandated by building regulations).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4285/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4285&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/17/garden-office-constructing-the-base/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/office-base1.jpg" medium="image" />
	</item>
		<item>
		<title>Garden office</title>
		<link>http://rwmj.wordpress.com/2013/04/16/garden-office/</link>
		<comments>http://rwmj.wordpress.com/2013/04/16/garden-office/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 15:11:42 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[garden office]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4278</guid>
		<description><![CDATA[As some readers might know, I work from home, and have worked from home for about 12 years. However I&#8217;ve never had a proper dedicated office, just a corner of a second bedroom or a bit of space on a &#8230; <a href="http://rwmj.wordpress.com/2013/04/16/garden-office/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4278&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As some readers might know, I work from home, and have worked from home for about 12 years.  However I&#8217;ve never had a proper dedicated office, just <a href="http://rwmj.wordpress.com/2010/01/25/treadmill-desk-part-6-hopefully-the-final-summary/#content">a corner of a second bedroom</a> or a bit of space on a sofa.  That&#8217;s about to change.</p>
<p>Tomorrow, work starts on constructing a real office in my garden.</p>
<p>Work already started (for me) about a month ago, when I took down a shed and jack-hammered a patio to bits:</p>
<p><a href="http://rwmj.files.wordpress.com/2013/04/office-1.jpg"><img src="http://rwmj.files.wordpress.com/2013/04/office-1.jpg?w=500&#038;h=375" alt="office-1" width="500" height="375" class="aligncenter size-full wp-image-4279" /></a></p>
<p>Shifting the whole lot into two skips:</p>
<p><a href="http://rwmj.files.wordpress.com/2013/04/office-2.jpg"><img src="http://rwmj.files.wordpress.com/2013/04/office-2.jpg?w=500" alt="office-2"   class="aligncenter size-full wp-image-4280" /></a></p>
<p>Resulting in this empty, mostly flat space (about 20&#8242; wide and 16&#8242; deep, damn you council for chopping that tree down at the back &#8230;):</p>
<p><a href="http://rwmj.files.wordpress.com/2013/04/office-3.jpg"><img src="http://rwmj.files.wordpress.com/2013/04/office-3.jpg?w=500&#038;h=375" alt="office-3" width="500" height="375" class="aligncenter size-large wp-image-4281" /></a></p>
<p><i>To be continued &#8230;</i></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4278/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4278&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/16/garden-office/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/office-1.jpg" medium="image">
			<media:title type="html">office-1</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/office-2.jpg" medium="image">
			<media:title type="html">office-2</media:title>
		</media:content>

		<media:content url="http://rwmj.files.wordpress.com/2013/04/office-3.jpg?w=500" medium="image">
			<media:title type="html">office-3</media:title>
		</media:content>
	</item>
		<item>
		<title>Use guestfish, virt tools with remote disks</title>
		<link>http://rwmj.wordpress.com/2013/04/16/use-guestfish-virt-tools-with-remote-disks/</link>
		<comments>http://rwmj.wordpress.com/2013/04/16/use-guestfish-virt-tools-with-remote-disks/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 14:23:29 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ceph]]></category>
		<category><![CDATA[FUSE]]></category>
		<category><![CDATA[gluster]]></category>
		<category><![CDATA[guestmount]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[nbd]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[sheepdog]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[virt-df]]></category>
		<category><![CDATA[virt-rescue]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4274</guid>
		<description><![CDATA[New in libguestfs &#8805; 1.21.30 is the ability to use guestfish and some of the virt tools with remote disks. Currently you can use remote disks over NBD, GlusterFS, Ceph, Sheepdog and (recently upstream) SSH. For this example I&#8217;ll use &#8230; <a href="http://rwmj.wordpress.com/2013/04/16/use-guestfish-virt-tools-with-remote-disks/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4274&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>New in <a href="http://libguestfs.org">libguestfs &ge; 1.21.30</a> is the ability to use <a href="http://libguestfs.org/guestfish.1.html">guestfish</a> and some of the virt tools with remote disks.</p>
<p>Currently you can use remote disks over <a href="http://en.wikipedia.org/wiki/Network_block_device">NBD</a>, <a href="http://www.gluster.org/">GlusterFS</a>, <a href="http://ceph.com/">Ceph</a>, <a href="http://www.osrg.net/sheepdog/">Sheepdog</a> and (<a href="http://git.qemu.org/?p=qemu.git;a=commit;h=0a12ec87a513b31eb3b6e035d30649e483322270">recently upstream</a>) <a href="https://rwmj.wordpress.com/2013/04/05/libguestfs-and-qemu-ssh-driver/">SSH</a>.</p>
<p>For this example I&#8217;ll use SSH because it needs no setup, although this requires absolutely the latest qemu and libguestfs (both from git).</p>
<p>Since we don&#8217;t have <a href="https://www.redhat.com/archives/libvir-list/2013-April/thread.html#00803">libvirt support for ssh</a> yet, so this only works with the <a href="https://www.redhat.com/archives/libguestfs/2013-April/msg00000.html">direct backend</a>:</p>
<pre>
$ <b>export LIBGUESTFS_BACKEND=direct</b>
</pre>
<p>I can use a <code>ssh://</code> URI to add disks with guestfish, <a href="http://libguestfs.org/guestmount.1.html">guestmount</a> and most of the virt tools.  For example:</p>
<pre>
$ <b><a href="http://libguestfs.org/virt-rescue.1.html">virt-rescue</a> -a ssh://localhost/tmp/f17x64.img</b>
<i>[... lots of boot messages ...]</i>
Welcome to virt-rescue, the libguestfs rescue shell.

Note: The contents of / are the rescue appliance.
You have to mount the guest's partitions under /sysroot
before you can examine them.

&gt;&lt;rescue&gt; <b>mount /dev/vg_f17x64/lv_root /sysroot</b>
&gt;&lt;rescue&gt; <b>cat /sysroot/etc/redhat-release</b>
Fedora release 17 (Beefy Miracle)
</pre>
<p>Apart from being a tiny bit slower, it just works as if the disk was local:</p>
<pre>
$ <b><a href="http://libguestfs.org/virt-df.1.html">virt-df</a> -a ssh://localhost/tmp/f17x64.img</b>
Filesystem                           1K-blocks       Used  Available  Use%
f17x64.img:/dev/sda1                    487652      63738     398314   14%
f17x64.img:/dev/vg_f17x64/lv_root     28316680    4285576   22586036   16%
</pre>
<pre>
$ <b>guestmount -a ssh://localhost/tmp/f17x64.img -i /tmp/mnt</b>
$ <b>ls /tmp/mnt</b>
bin   dev  home  lib64       media  opt   root  sbin  sys  usr
boot  etc  lib   lost+found  mnt    proc  run   srv   tmp  var
$ <b>cat /tmp/mnt/etc/redhat-release</b>
Fedora release 17 (Beefy Miracle)
$ <b>guestunmount /tmp/mnt</b>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4274/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4274&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/16/use-guestfish-virt-tools-with-remote-disks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
		<item>
		<title>libguestfs and qemu ssh driver</title>
		<link>http://rwmj.wordpress.com/2013/04/05/libguestfs-and-qemu-ssh-driver/</link>
		<comments>http://rwmj.wordpress.com/2013/04/05/libguestfs-and-qemu-ssh-driver/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 20:56:06 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[guestfish]]></category>
		<category><![CDATA[libguestfs]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[virt-tools]]></category>

		<guid isPermaLink="false">http://rwmj.wordpress.com/?p=4266</guid>
		<description><![CDATA[The qemu ssh block device is now up to version 7 &#8230; although sadly not upstream yet. Nevertheless by applying this patch to libguestfs you can use libguestfs to access remote disks over ssh: $ export LIBGUESTFS_QEMU=~/d/qemu/qemu.wrapper $ export LIBGUESTFS_BACKEND=direct &#8230; <a href="http://rwmj.wordpress.com/2013/04/05/libguestfs-and-qemu-ssh-driver/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4266&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The <a href="http://rwmj.wordpress.com/2013/03/21/qemu-ssh-block-device/">qemu ssh block device</a> is now <a href="http://www.mail-archive.com/qemu-devel@nongnu.org/msg164860.html">up to version 7</a> &#8230; although sadly not upstream yet.</p>
<p>Nevertheless by applying <a href="https://www.redhat.com/archives/libguestfs/2013-April/msg00021.html">this patch to libguestfs</a> you can use libguestfs to access remote disks over ssh:</p>
<pre>
$ <b>export LIBGUESTFS_QEMU=~/d/qemu/<a href="http://libguestfs.org/guestfs.3.html#qemu-wrappers">qemu.wrapper</a></b>
$ <b>export <a href="https://www.redhat.com/archives/libguestfs/2013-April/msg00000.html">LIBGUESTFS_BACKEND=direct</a></b>
$ <b><a href="https://github.com/libguestfs/libguestfs/blob/6582d4ad9fdb15edc346f6420b01c707e40f8541/README#L257">./run</a> ./fish/guestfish</b>

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

&gt;&lt;fs&gt; <b>add /tmp/f17x64.img readonly:true format:raw \
        protocol:ssh server:onuma</b>
&gt;&lt;fs&gt; <b>run</b>
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00
&gt;&lt;fs&gt; <b><a href="http://libguestfs.org/guestfs.3.html#inspection">inspect-os</a></b>
/dev/vg_f17x64/lv_root
&gt;&lt;fs&gt; <b>inspect-get-product-name /dev/vg_f17x64/lv_root</b>
Fedora release 17 (Beefy Miracle)
&gt;&lt;fs&gt; <b>list-filesystems</b>
/dev/sda1: ext4
/dev/vg_f17x64/lv_root: ext4
/dev/vg_f17x64/lv_swap: swap
&gt;&lt;fs&gt; <b>mount /dev/vg_f17x64/lv_root /</b>
&gt;&lt;fs&gt; <b>cat /etc/redhat-release</b>
Fedora release 17 (Beefy Miracle)
</pre>
<p>Everything just works as if this were a local disk.</p>
<p>There are a couple of minor caveats (the <i>major</i> caveat being none of this is upstream):  Firstly you have to have ssh-agent set up.  Secondly the remote host must be in your <code>known_hosts</code> file (if not, do <code>ssh remotehost</code> first to add it).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rwmj.wordpress.com/4266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rwmj.wordpress.com/4266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rwmj.wordpress.com&#038;blog=6840703&#038;post=4266&#038;subd=rwmj&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rwmj.wordpress.com/2013/04/05/libguestfs-and-qemu-ssh-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e3ec39948aca0fe41ac29e3e9f8a2649?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">rich</media:title>
		</media:content>
	</item>
	</channel>
</rss>
