How to share filesystem
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
For example, I would like to restore files from backup using the host, but write to filesystems used by the guest.
I have previously used kvm mostly with disks that are based on LVM logical volumes, e.g. -hda /dev/turtle/Squeeze00. Since the LVs are virtual disks, I can't just mount them in the host AFAIK.
Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
Host: Debian GNU/Linux wheezy, amd64 architecture, qemu-kvm 1.1.2
Guest: Debian GNU/Linux lenny i386.
Host processor is a recent i5 with good virtualization (flaga: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms)
Thanks.
Ross Boylan
Am Tue, 24 Sep 2013 01:38:39 -0700
schrieb Ross Boylan <[email protected]>:
Quoted 4 lines
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
[...]
Quoted 3 lines
Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
I've never tried it on my own, but there is also virtio-9p:
http://wiki.qemu.org/Documentation/9psetup
Maybe that's what you need?
Thomas
You can as well try Qemu-GuestAgent which uses Virtio-Serial communication for Guest and Host.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Thomas Huth
Sent: Tuesday, September 24, 2013 3:54 PM
To: Ross Boylan
Cc: [email protected]
Subject: Re: How to share filesystem
Am Tue, 24 Sep 2013 01:38:39 -0700
schrieb Ross Boylan <[email protected]>:
Quoted 4 lines
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
[...]
Quoted 3 lines
Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
I've never tried it on my own, but there is also virtio-9p:
http://wiki.qemu.org/Documentation/9psetup
Maybe that's what you need?
Thomas
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Thomas Huth
Am Tue, 24 Sep 2013 01:38:39 -0700
schrieb Ross Boylan <[email protected]>:Quoted 4 lines
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
[...]
Quoted 3 lines
Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
Quoted 8 lines
I've never tried it on my own, but there is also virtio-9p:
http://wiki.qemu.org/Documentation/9psetup
Maybe that's what you need?
Thomas
At first I saw Plan 9 and figured it was irrelevant to linux, but the example seems to be Linux. So I'm puzzled.
Ross
You。can use. Virtio-9p. In. Linux.
发自我的 iPhone
Quoted 30 lines · 在 2013年9月25日,0:37,Ross Boylan <[email protected]> 写道:
Quoted 14 lines · Thomas Huth
Am Tue, 24 Sep 2013 01:38:39 -0700
schrieb Ross Boylan <[email protected]>:Quoted 4 lines
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
[...]
Quoted 3 lines
Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
Quoted 7 lines
I've never tried it on my own, but there is also virtio-9p:
http://wiki.qemu.org/Documentation/9psetup
Maybe that's what you need?
Thomas
At first I saw Plan 9 and figured it was irrelevant to linux, but the example seems to be Linux. So I'm puzzled.
Ross--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
9p is a protocol that is created by plan 9 operation system. linux can use virtio-9p.
发自我的 iPhone
Quoted 36 lines · 在 2013年9月25日,3:03,[email protected] 写道:
You。can use. Virtio-9p. In. Linux.
发自我的 iPhone
Quoted 30 lines
Quoted 15 lines · 在 2013年9月25日,0:37,Ross Boylan <[email protected]> 写道:
On Tue, 2013-09-24 at 12:24 +0200, Thomas Huth wrote:
Am Tue, 24 Sep 2013 01:38:39 -0700
schrieb Ross Boylan <[email protected]>:Quoted 4 lines
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
[...]
Quoted 3 lines
Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
Quoted 7 lines
I've never tried it on my own, but there is also virtio-9p:
http://wiki.qemu.org/Documentation/9psetup
Maybe that's what you need?
Thomas
At first I saw Plan 9 and figured it was irrelevant to linux, but the example seems to be Linux. So I'm puzzled.
Ross--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · On Wed, 2013-09-25 at 03:06 +0800, [email protected] wrote:
9p is a protocol that is created by plan 9 operation system. linux can use virtio-9p.
发自我的 iPhone
Is this the preferred way to go?
At any rate, I don't think I can use it easily because the wiki says it needs linux 2.6.36.rc4 or newer, and Lenny uses 2.6.26 and backports only has 2.6.32.
Ross
Quoted 37 lines
Quoted 37 lines · 在 2013年9月25日,3:03,[email protected] 写道:
You。can use. Virtio-9p. In. Linux.
发自我的 iPhone
Quoted 30 lines
Quoted 15 lines · 在 2013年9月25日,0:37,Ross Boylan <[email protected]> 写道:
On Tue, 2013-09-24 at 12:24 +0200, Thomas Huth wrote:
Am Tue, 24 Sep 2013 01:38:39 -0700
schrieb Ross Boylan <[email protected]>:Quoted 4 lines
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
[...]
Quoted 3 lines
Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
Quoted 7 lines
I've never tried it on my own, but there is also virtio-9p:
http://wiki.qemu.org/Documentation/9psetup
Maybe that's what you need?
Thomas
At first I saw Plan 9 and figured it was irrelevant to linux, but the example seems to be Linux. So I'm puzzled.
Ross--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Ross Boylan
I would like to have access to the same file system from the host and the guest. Can anyone recommend the best way to do this, considering ease of use, safety (concurrent access from guest and host does not corrupt) and performance?
For example, I would like to restore files from backup using the host, but write to filesystems used by the guest.
Quoted 7 lines
I have previously used kvm mostly with disks that are based on LVM logical volumes, e.g. -hda
/dev/turtle/Squeeze00. Since the LVs are virtual disks, I can't just mount them in the host AFAIK.Among the alternatives I can think of are using NFS and using NBD. Maybe there's some kind of loopback device I could use on the disk image to access it from the host.
I would suggest NFS/CIFS generally speaking. 9p/virtio is an option, but NFS and CIFS are going to be far more stable, tested, and fast.
Quoted 21 lines
Host: Debian GNU/Linux wheezy, amd64 architecture, qemu-kvm 1.1.2
Guest: Debian GNU/Linux lenny i386.
Host processor is a recent i5 with good virtualization (flaga: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lmconstant_tscarch_perfmonpebs btsrep_goodnopl xtopologynonstop_tscaperfmperf pni pclmulqdq dtes64 monitords_cplvmx smx est tm2 ssse3 cx16 xtpr pdcm pcidsse4_1sse4_2x2apic popcnttsc_deadline_timeraes xsave avx f16c rdrandlahf_lmida arat epb xsaveopt pln pts dthermtpr_shadowvnmi flexpriority ept vpid fsgsbase smep erms)Thanks.
Ross Boylan--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html