<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linux-kvm.org/index.php?action=history&amp;feed=atom&amp;title=9p_virtio</id>
	<title>9p virtio - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://linux-kvm.org/index.php?action=history&amp;feed=atom&amp;title=9p_virtio"/>
	<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=9p_virtio&amp;action=history"/>
	<updated>2026-04-22T18:04:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://linux-kvm.org/index.php?title=9p_virtio&amp;diff=173318&amp;oldid=prev</id>
		<title>Bsd: added categories</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=9p_virtio&amp;diff=173318&amp;oldid=prev"/>
		<updated>2015-05-31T13:39:31Z</updated>

		<summary type="html">&lt;p&gt;added categories&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:39, 31 May 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.  (Note: likely to hit some issues w/ privileges since Fedora libvirt runs guests unprivileged and with SELinux confinement...careful use of chown, chmod and chcon should get it working).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.  (Note: likely to hit some issues w/ privileges since Fedora libvirt runs guests unprivileged and with SELinux confinement...careful use of chown, chmod and chcon should get it working).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Docs]][[Category:HowTo]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key kvmwiki-kvmwiki_:diff::1.12:old-4570:rev-173318 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bsd</name></author>
	</entry>
	<entry>
		<id>https://linux-kvm.org/index.php?title=9p_virtio&amp;diff=4570&amp;oldid=prev</id>
		<title>Steil at 06:27, 1 August 2012</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=9p_virtio&amp;diff=4570&amp;oldid=prev"/>
		<updated>2012-08-01T06:27:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:27, 1 August 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l18&quot;&gt;Line 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mkdir /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mkdir /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mount -t 9p -&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;otrans&lt;/del&gt;=virtio,version=9p2000.L hostshare /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mount -t 9p -&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;o trans&lt;/ins&gt;=virtio,version=9p2000.L hostshare /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot;&gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mkdir /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mkdir /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mount -t 9p -&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;otrans&lt;/del&gt;=virtio,version=9p2000.L /hostshare /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  # mount -t 9p -&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;o trans&lt;/ins&gt;=virtio,version=9p2000.L /hostshare /tmp/host_files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.  (Note: likely to hit some issues w/ privileges since Fedora libvirt runs guests unprivileged and with SELinux confinement...careful use of chown, chmod and chcon should get it working).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.  (Note: likely to hit some issues w/ privileges since Fedora libvirt runs guests unprivileged and with SELinux confinement...careful use of chown, chmod and chcon should get it working).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key kvmwiki-kvmwiki_:diff::1.12:old-4013:rev-4570 --&gt;
&lt;/table&gt;</summary>
		<author><name>Steil</name></author>
	</entry>
	<entry>
		<id>https://linux-kvm.org/index.php?title=9p_virtio&amp;diff=4013&amp;oldid=prev</id>
		<title>Chrisw at 00:08, 16 September 2011</title>
		<link rel="alternate" type="text/html" href="https://linux-kvm.org/index.php?title=9p_virtio&amp;diff=4013&amp;oldid=prev"/>
		<updated>2011-09-16T00:08:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Example Sharing Host files with the Guest ==&lt;br /&gt;
&lt;br /&gt;
This example is based on qemu-kvm (0.15.0) as installed in Fedora 15.&lt;br /&gt;
Will first show how to do this manually, and second how to do it using the virt-manager tool.  This HOWTO is documenting 9p virtio as the transport for sharing files.&lt;br /&gt;
&lt;br /&gt;
In both cases we&amp;#039;ll share files in /tmp/share on the host.  In the guest, they&amp;#039;ll show up in /tmp/host_files.&lt;br /&gt;
&lt;br /&gt;
== Manually, using qemu-kvm command line ==&lt;br /&gt;
&lt;br /&gt;
There are a nice set of details on the [http://wiki.qemu.org/Documentation/9psetup QEMU wiki] describing this, so this section will be quite short.  To share host files w/ the guest, we use 9p over virtio in conjunction w/ a filesystem device exporting the portion of the host filesystem that we&amp;#039;d like to share with the guest.&lt;br /&gt;
&lt;br /&gt;
 # /usr/bin/qemu-kvm -m 1024 -name f15 -drive file=/images/f15.img,if=virtio&lt;br /&gt;
 -fsdev local,security_model=passthrough,id=fsdev0,path=/tmp/share -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare&lt;br /&gt;
&lt;br /&gt;
This tells qemu to create a 9pvirtio device exposing the mount_tag &amp;lt;code&amp;gt;hostshare&amp;lt;/code&amp;gt; (just a name to identify the mount point).  That device is coupled to an fsdev named &amp;lt;code&amp;gt;fsdev0&amp;lt;/code&amp;gt;, which specifies which portion of the host filesystem we are sharing, and in which mode (see [http://wiki.qemu.org/Documentation/9psetup QEMU wiki] for details on the security models).&lt;br /&gt;
&lt;br /&gt;
Now, in the guest we need to mount the 9p filesystem from the host using the virtio transport.  The mount_tag is used to identify the host&amp;#039;s share.&lt;br /&gt;
&lt;br /&gt;
 # mkdir /tmp/host_files&lt;br /&gt;
 # mount -t 9p -otrans=virtio,version=9p2000.L hostshare /tmp/host_files&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.&lt;br /&gt;
&lt;br /&gt;
== Managed, using virt-manager ==&lt;br /&gt;
&lt;br /&gt;
This assumes you&amp;#039;ve already installed a guest with virt-manager or virt-install and it&amp;#039;s shut off.&lt;br /&gt;
&lt;br /&gt;
Start virt-manager, and open your VM by double clicking on it.  Click the virtual hardware details (lightbulb).  Click Add Hardware, and choose a Filesystem.  Chose the mode, we chose squash which translates to none (see [http://wiki.qemu.org/Documentation/9psetup QEMU wiki] for details on the security models), the source (we are sharing /tmp/share), and the target (we called this /hostshare).&lt;br /&gt;
&lt;br /&gt;
[[Image:Screenshot-add-filesystem-share.png]]&lt;br /&gt;
&lt;br /&gt;
Now, start the VM.  In the guest we need to mount the  9p filesystem from the host using the virtio transport.  The mount_tag is used to identify the host&amp;#039;s share.&lt;br /&gt;
&lt;br /&gt;
 # mkdir /tmp/host_files&lt;br /&gt;
 # mount -t 9p -otrans=virtio,version=9p2000.L /hostshare /tmp/host_files&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it...now we can read/write files in that directory from either the host or the guest.  (Note: likely to hit some issues w/ privileges since Fedora libvirt runs guests unprivileged and with SELinux confinement...careful use of chown, chmod and chcon should get it working).&lt;/div&gt;</summary>
		<author><name>Chrisw</name></author>
	</entry>
</feed>