qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Consult] nfs-vsocks support
@ 2018-03-23  9:54 Liu, Jing2
  2018-03-23 16:02 ` Stefan Hajnoczi
  0 siblings, 1 reply; 7+ messages in thread
From: Liu, Jing2 @ 2018-03-23  9:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, stefanha

Hello,

I am currently trying to use nfs-vsocks on x86 for vitural machine 
filesystem by some manuals on 
https://www.spinics.net/lists/linux-nfs/msg64563.html
and https://lwn.net/Articles/647516/

It tells the quickstart steps with the following codes but I got some 
problems as listed.
  * Linux kernel: https://github.com/stefanha/linux.git vsock-nfs
  * QEMU virtio-vsock device: https://github.com/stefanha/qemu.git vsock
  * nfs-utils vsock: https://github.com/stefanha/nfs-utils.git vsock

1. I would like to ask what is the current status of these codes? If 
there're some updates? :)
2. nfs-utils codes could not compile for me... I refered to the README 
but failed for both ways. It seems no configure script and 
autoheader/automake... So I don't know how to install this.
3. For the 5th step (Start nfsd), I'd like to know the rpc.nfsd --vsock 
is enabled by which codes? Is it the CONFIG_VHOST_VSOCK kernel module in 
host? Because I installed the kernel with vsock-nfs repo with the 
specified config options but failed to do rpc.nfsd --vsock.


Could you give me some help and thanks in advance!

BRs,
Jing Liu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Consult] nfs-vsocks support
  2018-03-23  9:54 [Qemu-devel] [Consult] nfs-vsocks support Liu, Jing2
@ 2018-03-23 16:02 ` Stefan Hajnoczi
  2018-03-26 10:12   ` Liu, Jing2
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2018-03-23 16:02 UTC (permalink / raw)
  To: Liu, Jing2; +Cc: qemu-devel, yang.zhong

[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]

On Fri, Mar 23, 2018 at 05:54:53PM +0800, Liu, Jing2 wrote:
> I am currently trying to use nfs-vsocks on x86 for vitural machine
> filesystem by some manuals on
> https://www.spinics.net/lists/linux-nfs/msg64563.html
> and https://lwn.net/Articles/647516/
> 
> It tells the quickstart steps with the following codes but I got some
> problems as listed.
>  * Linux kernel: https://github.com/stefanha/linux.git vsock-nfs
>  * QEMU virtio-vsock device: https://github.com/stefanha/qemu.git vsock
>  * nfs-utils vsock: https://github.com/stefanha/nfs-utils.git vsock
> 
> 1. I would like to ask what is the current status of these codes? If
> there're some updates? :)

Please use https://github.com/stefanha/linux/commits/vsock-nfsd to get
both client and server support.  The vsock-nfs branch you posted only
contains client support.

> 2. nfs-utils codes could not compile for me... I refered to the README but
> failed for both ways. It seems no configure script and
> autoheader/automake... So I don't know how to install this.

Please see "2. COMPILING FROM GIT" in the nfs-utils ./README.  You need
to run ./autogen.sh to generate the ./configure script.

> 3. For the 5th step (Start nfsd), I'd like to know the rpc.nfsd --vsock is
> enabled by which codes? Is it the CONFIG_VHOST_VSOCK kernel module in host?
> Because I installed the kernel with vsock-nfs repo with the specified config
> options but failed to do rpc.nfsd --vsock.
> 
> 
> Could you give me some help and thanks in advance!

Here is a script that launches nfsd and runs a guest:
https://github.com/stefanha/linux/commit/38cbc15661a6dd44b69c4f318091f2047d707035#diff-05f3fe8941076453942a8c059b409009

Regarding rpc.nfsd, on my Fedora 27 system rfc.nfsd is launched by
/usr/lib/systemd/system/nfs.service.  When developing NFS over AF_VSOCK
I disable the NFS service and launch nfsd manually from the script
above.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Consult] nfs-vsocks support
  2018-03-23 16:02 ` Stefan Hajnoczi
@ 2018-03-26 10:12   ` Liu, Jing2
  2018-03-28 11:25     ` Liu, Jing2
  0 siblings, 1 reply; 7+ messages in thread
From: Liu, Jing2 @ 2018-03-26 10:12 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, yang.zhong

Hi Stefan,

Thank you very much for the response! It truly gave me much help.

On 3/24/2018 12:02 AM, Stefan Hajnoczi wrote:
> On Fri, Mar 23, 2018 at 05:54:53PM +0800, Liu, Jing2 wrote:
>> I am currently trying to use nfs-vsocks on x86 for vitural machine
>> filesystem by some manuals on
>> https://www.spinics.net/lists/linux-nfs/msg64563.html
>> and https://lwn.net/Articles/647516/
>>
[...]
> 
>> 3. For the 5th step (Start nfsd), I'd like to know the rpc.nfsd --vsock is
>> enabled by which codes? Is it the CONFIG_VHOST_VSOCK kernel module in host?
>> Because I installed the kernel with vsock-nfs repo with the specified config
>> options but failed to do rpc.nfsd --vsock.
>>
>>
>> Could you give me some help and thanks in advance!
> 
> Here is a script that launches nfsd and runs a guest:
> https://github.com/stefanha/linux/commit/38cbc15661a6dd44b69c4f318091f2047d707035#diff-05f3fe8941076453942a8c059b409009

I have updated both host and guest kernel with vsock-nfsd repo and 
installed nfs-utils in both host and guest successfully.

There're two different manuals in 
https://www.spinics.net/lists/linux-nfs/msg64563.html(Quickstart 3~7) 
and nfs-utils (README step 3 DAEMON STARTUP ORDER).
Which one should be the best usage?

For the first quickstart manual step 7-Mount the export from the guest, 
two questions as follows.
1. why hypervisor's CID is 2? I didn't notice when it is specified?
2. Though I did step 3~7 successfully, I can't see the synchronistical 
changing on host folder /export/ and guest /mnt? So how to test the 
communcation between host and guest on the folder?

Thanks again!

Jing

> 
> Regarding rpc.nfsd, on my Fedora 27 system rfc.nfsd is launched by
> /usr/lib/systemd/system/nfs.service.  When developing NFS over AF_VSOCK
> I disable the NFS service and launch nfsd manually from the script
> above.
> 
> Stefan
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Consult] nfs-vsocks support
  2018-03-26 10:12   ` Liu, Jing2
@ 2018-03-28 11:25     ` Liu, Jing2
  2018-04-04  9:45       ` Stefan Hajnoczi
  0 siblings, 1 reply; 7+ messages in thread
From: Liu, Jing2 @ 2018-03-28 11:25 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: yang.zhong, qemu-devel



On 3/26/2018 6:12 PM, Liu, Jing2 wrote:
> Hi Stefan,
> 
> Thank you very much for the response! It truly gave me much help.
> 
> On 3/24/2018 12:02 AM, Stefan Hajnoczi wrote:
[...]
>>> Could you give me some help and thanks in advance!
>>
>> Here is a script that launches nfsd and runs a guest:
>> https://github.com/stefanha/linux/commit/38cbc15661a6dd44b69c4f318091f2047d707035#diff-05f3fe8941076453942a8c059b409009 
>>

Using the script, I met some problems making the
initramfs.gz. It confused me a lot... I don't have busybox under
/usr/bin or /usr/sbin. Where to get it?

(host)$./go.sh nfs_tcp

File /usr/sbin/busybox could not be opened for reading
  line 55
File /lib64/libtirpc.so.3 could not be opened for reading
  line 306
File nc-vsock could not be opened for reading
  line 321
File ../netperf-2.7.0/src/netserver could not be opened for reading
  line 325

It results in guest kernel_panic when gdb launches the guest:

[    0.425738] Failed to execute /init (error -2)
[    0.426074] Kernel panic - not syncing: No working init found.  Try 
passing .
[    0.427077] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0+ #3
[    0.427507] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), 
BIOS rel-4
[    0.428354] Call Trace:
[    0.428538]  dump_stack+0x63/0x89
[    0.428774]  ? rest_init+0x60/0xc0
[    0.429017]  panic+0xeb/0x245
[    0.429225]  ? putname+0x53/0x60
[    0.429455]  ? rest_init+0xc0/0xc0
[    0.429722]  kernel_init+0xf1/0x104
[    0.430017]  ret_from_fork+0x25/0x30

Looking forward to the kind reply.
BTW, for the following questions that I sent two days ago, I have some
ideas in mind and it could be ignored now.

Jing

> I have updated both host and guest kernel with vsock-nfsd repo and 
> installed nfs-utils in both host and guest successfully.
> 
> There're two different manuals in 
> https://www.spinics.net/lists/linux-nfs/msg64563.html(Quickstart 3~7) 
> and nfs-utils (README step 3 DAEMON STARTUP ORDER).
> Which one should be the best usage?
> 
> For the first quickstart manual step 7-Mount the export from the guest, 
> two questions as follows.
> 1. why hypervisor's CID is 2? I didn't notice when it is specified?
> 2. Though I did step 3~7 successfully, I can't see the synchronistical 
> changing on host folder /export/ and guest /mnt? So how to test the 
> communcation between host and guest on the folder?
> 
> Thanks again!
> 
> Jing
[...]
>>
>> Stefan
>>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Consult] nfs-vsocks support
  2018-03-28 11:25     ` Liu, Jing2
@ 2018-04-04  9:45       ` Stefan Hajnoczi
  2018-04-16  6:21         ` Liu, Jing2
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2018-04-04  9:45 UTC (permalink / raw)
  To: Liu, Jing2; +Cc: Stefan Hajnoczi, yang.zhong, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3362 bytes --]

On Wed, Mar 28, 2018 at 07:25:21PM +0800, Liu, Jing2 wrote:
> On 3/26/2018 6:12 PM, Liu, Jing2 wrote:
> > Hi Stefan,
> > 
> > Thank you very much for the response! It truly gave me much help.
> > 
> > On 3/24/2018 12:02 AM, Stefan Hajnoczi wrote:
> [...]
> > > > Could you give me some help and thanks in advance!
> > > 
> > > Here is a script that launches nfsd and runs a guest:
> > > https://github.com/stefanha/linux/commit/38cbc15661a6dd44b69c4f318091f2047d707035#diff-05f3fe8941076453942a8c059b409009
> > > 
> 
> Using the script, I met some problems making the
> initramfs.gz. It confused me a lot... I don't have busybox under
> /usr/bin or /usr/sbin. Where to get it?

It may be easier to use a full guest disk image instead of the disk
image generation in my go.sh script.  The initramfs is very specific to
the development machine I was using at the time.  The main thing to look
at the in the go.sh script is how the NFS services are launched on the
host.

Busybox is a package that is available on most Linux distributions.

Before you spend more time on this, NFS over AF_VSOCK is only suitable
for developers right now.  It is not ready for production and I am not
supporting it for end users.  So if you want to hack on NFS, please go
ahead, but otherwise it's probably not what you want.

Stefan

> (host)$./go.sh nfs_tcp
> 
> File /usr/sbin/busybox could not be opened for reading
>  line 55
> File /lib64/libtirpc.so.3 could not be opened for reading
>  line 306
> File nc-vsock could not be opened for reading
>  line 321
> File ../netperf-2.7.0/src/netserver could not be opened for reading
>  line 325
> 
> It results in guest kernel_panic when gdb launches the guest:
> 
> [    0.425738] Failed to execute /init (error -2)
> [    0.426074] Kernel panic - not syncing: No working init found.  Try
> passing .
> [    0.427077] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0+ #3
> [    0.427507] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
> rel-4
> [    0.428354] Call Trace:
> [    0.428538]  dump_stack+0x63/0x89
> [    0.428774]  ? rest_init+0x60/0xc0
> [    0.429017]  panic+0xeb/0x245
> [    0.429225]  ? putname+0x53/0x60
> [    0.429455]  ? rest_init+0xc0/0xc0
> [    0.429722]  kernel_init+0xf1/0x104
> [    0.430017]  ret_from_fork+0x25/0x30
> 
> Looking forward to the kind reply.
> BTW, for the following questions that I sent two days ago, I have some
> ideas in mind and it could be ignored now.
> 
> Jing
> 
> > I have updated both host and guest kernel with vsock-nfsd repo and
> > installed nfs-utils in both host and guest successfully.
> > 
> > There're two different manuals in
> > https://www.spinics.net/lists/linux-nfs/msg64563.html(Quickstart 3~7)
> > and nfs-utils (README step 3 DAEMON STARTUP ORDER).
> > Which one should be the best usage?
> > 
> > For the first quickstart manual step 7-Mount the export from the guest,
> > two questions as follows.
> > 1. why hypervisor's CID is 2? I didn't notice when it is specified?
> > 2. Though I did step 3~7 successfully, I can't see the synchronistical
> > changing on host folder /export/ and guest /mnt? So how to test the
> > communcation between host and guest on the folder?
> > 
> > Thanks again!
> > 
> > Jing
> [...]
> > > 
> > > Stefan
> > > 
> > 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Consult] nfs-vsocks support
  2018-04-04  9:45       ` Stefan Hajnoczi
@ 2018-04-16  6:21         ` Liu, Jing2
  0 siblings, 0 replies; 7+ messages in thread
From: Liu, Jing2 @ 2018-04-16  6:21 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: yang.zhong, qemu-devel, Stefan Hajnoczi



On 4/4/2018 5:45 PM, Stefan Hajnoczi wrote:
> On Wed, Mar 28, 2018 at 07:25:21PM +0800, Liu, Jing2 wrote:
>> On 3/26/2018 6:12 PM, Liu, Jing2 wrote:
>>> Hi Stefan,
>>>
>>> Thank you very much for the response! It truly gave me much help.
>>>
>>> On 3/24/2018 12:02 AM, Stefan Hajnoczi wrote:
>> [...]
>>>>> Could you give me some help and thanks in advance!
>>>>
>>>> Here is a script that launches nfsd and runs a guest:
>>>> https://github.com/stefanha/linux/commit/38cbc15661a6dd44b69c4f318091f2047d707035#diff-05f3fe8941076453942a8c059b409009
>>>>
>>
>> Using the script, I met some problems making the
>> initramfs.gz. It confused me a lot... I don't have busybox under
>> /usr/bin or /usr/sbin. Where to get it?
> 

> It may be easier to use a full guest disk image instead of the disk
> image generation in my go.sh script.  The initramfs is very specific to
> the development machine I was using at the time.  The main thing to look
> at the in the go.sh script is how the NFS services are launched on the
> host.
> 
> Busybox is a package that is available on most Linux distributions.

I realized the rhel-7.x doesn't has busybox anymore. And yes, I used 
some other image to continue.

> Before you spend more time on this, NFS over AF_VSOCK is only suitable
> for developers right now.  It is not ready for production and I am not
> supporting it for end users.  So if you want to hack on NFS, please go
> ahead, but otherwise it's probably not what you want.
> 
Yes, so far we didn't plan for production. And thank you very much for 
your kind response.

Jing

> Stefan
> 
>> (host)$./go.sh nfs_tcp
>>
>> File /usr/sbin/busybox could not be opened for reading
>>   line 55
>> File /lib64/libtirpc.so.3 could not be opened for reading
>>   line 306
>> File nc-vsock could not be opened for reading
>>   line 321
>> File ../netperf-2.7.0/src/netserver could not be opened for reading
>>   line 325
>>
>> It results in guest kernel_panic when gdb launches the guest:
>>
>> [    0.425738] Failed to execute /init (error -2)
>> [    0.426074] Kernel panic - not syncing: No working init found.  Try
>> passing .
>> [    0.427077] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0+ #3
>> [    0.427507] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
>> rel-4
>> [    0.428354] Call Trace:
>> [    0.428538]  dump_stack+0x63/0x89
>> [    0.428774]  ? rest_init+0x60/0xc0
>> [    0.429017]  panic+0xeb/0x245
>> [    0.429225]  ? putname+0x53/0x60
>> [    0.429455]  ? rest_init+0xc0/0xc0
>> [    0.429722]  kernel_init+0xf1/0x104
>> [    0.430017]  ret_from_fork+0x25/0x30
>>
>> Looking forward to the kind reply.
>> BTW, for the following questions that I sent two days ago, I have some
>> ideas in mind and it could be ignored now.
>>
>> Jing
>>
>>> I have updated both host and guest kernel with vsock-nfsd repo and
>>> installed nfs-utils in both host and guest successfully.
>>>
>>> There're two different manuals in
>>> https://www.spinics.net/lists/linux-nfs/msg64563.html(Quickstart 3~7)
>>> and nfs-utils (README step 3 DAEMON STARTUP ORDER).
>>> Which one should be the best usage?
>>>
>>> For the first quickstart manual step 7-Mount the export from the guest,
>>> two questions as follows.
>>> 1. why hypervisor's CID is 2? I didn't notice when it is specified?
>>> 2. Though I did step 3~7 successfully, I can't see the synchronistical
>>> changing on host folder /export/ and guest /mnt? So how to test the
>>> communcation between host and guest on the folder?
>>>
>>> Thanks again!
>>>
>>> Jing
>> [...]
>>>>
>>>> Stefan
>>>>
>>>
>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Consult] nfs-vsocks support
@ 2018-04-16 23:45 Roy, Arindam
  0 siblings, 0 replies; 7+ messages in thread
From: Roy, Arindam @ 2018-04-16 23:45 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

Hi Jing,
Busybox is a standalone statically linked bash env.
You can download the source from here:
https://busybox.net/downloads/

Or you can just download and copy it to your /usr/sbin :
https://busybox.net/downloads/binaries/

The script is creating a runtime filesystem for your guest.
Its linking all the standard shell commands to busybox, so in the guest runtime those are executed by busybox.

Arindam

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-16 23:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-23  9:54 [Qemu-devel] [Consult] nfs-vsocks support Liu, Jing2
2018-03-23 16:02 ` Stefan Hajnoczi
2018-03-26 10:12   ` Liu, Jing2
2018-03-28 11:25     ` Liu, Jing2
2018-04-04  9:45       ` Stefan Hajnoczi
2018-04-16  6:21         ` Liu, Jing2
  -- strict thread matches above, loose matches on Subject: below --
2018-04-16 23:45 Roy, Arindam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).