search for: connect_vsock

Displaying 11 results from an estimated 11 matches for "connect_vsock".

2019 Oct 18
5
[PATCH libnbd 0/2] api: Add support for AF_VSOCK.
...kit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c 'print(h.get_size())' 1073741824 $ ./run nbdfuse mp --vsock 2 10809 & $ ll mp/ total 0 -rw-rw-rw-. 1 rjones rjones 1073741824 Oct 18 16:23 nbd $ dd if=/dev/random of=mp/nbd bs=1024 count=100 conv=notrunc,nocreat dd: warning: partial read (84 bytes); suggest iflag=full...
2019 Oct 18
4
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
On 10/18/19 10:39 AM, Richard W.M. Jones wrote: > This adds a new API for connecting to AF_VSOCK protocol > (https://wiki.qemu.org/Features/VirtioVsock). > > For example: > > nbd_connect_vsock (nbd, 2, 10809); > > There is no test of this feature because it only works between guest > and host. You cannot start a server and client on the host and talk > between them, which is what we'd need to write a sane test. > --- > @@ -357,6 +366,23 @@ main (int argc, char *a...
2019 Oct 18
0
[PATCH libnbd 2/2] api: Add support for AF_VSOCK.
This adds a new API for connecting to AF_VSOCK protocol (https://wiki.qemu.org/Features/VirtioVsock). For example: nbd_connect_vsock (nbd, 2, 10809); There is no test of this feature because it only works between guest and host. You cannot start a server and client on the host and talk between them, which is what we'd need to write a sane test. --- configure.ac | 2 ++ fuse/nbdfuse.c | 26 ++++++...
2019 Oct 18
0
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...o vsock. I'm afraid I don't understand this. > >@@ -2793,6 +2836,8 @@ let first_version = [ > > "aio_connect_systemd_socket_activation", (1, 2); > > "connect_socket", (1, 2); > > "aio_connect_socket", (1, 2); > >+ "connect_vsock", (1, 2); > >+ "aio_connect_vsock", (1, 2); > > As this is Linux-only (and for that matter, depends on kernel vsock > support), we probably need "supports_vsock" as an additional > function. We could add it, but equally client code can just check AF_VSO...
2019 Oct 18
2
[PATCH nbdkit] Add support for AF_VSOCK.
...kit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c 'print(h.get_size())' 1073741824 $ ./run nbdfuse mp --vsock 2 10809 & $ ll mp/ total 0 -rw-rw-rw-. 1 rjones rjones 1073741824 Oct 18 16:23 nbd $ dd if=/dev/random of=mp/nbd bs=1024 count=100 conv=notrunc,nocreat dd: warning: partial read (84 bytes); suggest iflag=full...
2020 Jul 10
0
[RFC nbdkit PATCH] server: Allow --run with --vsock
...25 @@ files="vsock.pid" rm -f $files cleanup_fn rm -f $files -# Run nbdkit. -start_nbdkit -P vsock.pid --vsock --port $port memory 1M - -export port -nbdsh -c - <<'EOF' +# An nbdsh script for connecting to vsock +export connect=' import os # 1 = VMADDR_CID_LOCAL h.connect_vsock (1, int (os.environ["port"])) +' +export check=' size = h.get_size () assert size == 1048576 -EOF +' + +# Run nbdkit. +start_nbdkit -P vsock.pid --vsock --port $port memory 1M + +export port +nbdsh -c "$connect" -c "$check" + +# Repeat on a different por...
2019 Oct 20
0
[PATCH libnbd] api: Allow NBD URIs to be restricted.
...Read from local files + +Default: denied + +To allow URIs to contain references to local files +(eg. for parameters like C<tls-psk-file>) call +L<nbd_set_uri_allow_local_file(3)>. =back @@ -2900,6 +3020,9 @@ let first_version = [ "aio_connect_socket", (1, 2); "connect_vsock", (1, 2); "aio_connect_vsock", (1, 2); + "set_uri_allow_transports", (1, 2); + "set_uri_allow_tls", (1, 2); + "set_uri_allow_local_file", (1, 2); (* These calls are proposed for a future version of libnbd, but * have not been added to any...
2019 Oct 18
0
[PATCH nbdkit] Add support for AF_VSOCK.
.../> + +If you see the error C<unable to open vhost-vsock device> then you may +have to unload the VMCI transport: + + modprobe -r vmw_vsock_vmci_transport + +Once nbdkit and the guest are running, from inside the guest you can +connect to nbdkit on the host using libnbd: + + nbdsh -c 'h.connect_vsock(2, 10809)' -c 'print(h.get_size())' + =head1 ENVIRONMENT VARIABLES =over 4 @@ -102,7 +148,8 @@ L<systemd(1)>, L<systemd.socket(5)>, L<syslog(3)>, L<rsyslogd(8)>, -L<journalctl(1)>. +L<journalctl(1)>, +L<nbdsh(1)>. =head1 AUTHORS diff...
2019 Oct 20
2
[PATCH libnbd] api: Allow NBD URIs to be restricted.
Previous discussion: https://www.redhat.com/archives/libguestfs/2019-August/msg00102.html Last night I experimentally added support for URIs that contain the query parameter tls-psk-file, as part of rewriting the tests to cover more of the URI code. So you can now have a URI like: nbds://alice@localhost/?tls-psk-file=keys.psk However there's an obvious security problem here because now
2019 Oct 18
1
[PATCH nbdkit v2] Add support for AF_VSOCK.
v1 was discussed here: https://www.redhat.com/archives/libguestfs/2019-October/thread.html#00100 v2: - Bind to VMADDR_CID_ANY (instead of HOST) and update the documentation accordingly. - Don't bother with SOCK_CLOEXEC fallback path that can never be used. Rich.
2019 Apr 04
1
Proof of concept for GPU forwarding for Linux guest on Linux host.
Hi, This is a proof of concept of GPU forwarding for Linux guest on Linux host. I'd like to get comments and suggestions from community before I put more time on it. To summarize what it is: 1. It's a solution to bring GPU acceleration for Linux vm guest on Linux host. It could works with different GPU although the current proof of concept only works with Intel GPU. 2. The basic idea