{"id":37161934,"url":"https://github.com/ptrcnull/vsock","last_synced_at":"2026-01-14T19:16:33.317Z","repository":{"id":57635510,"uuid":"426477341","full_name":"ptrcnull/vsock","owner":"ptrcnull","description":"Package vsock provides access to Linux VM sockets (AF_VSOCK) for communication between a hypervisor and its virtual machines.  MIT Licensed.","archived":false,"fork":true,"pushed_at":"2021-11-10T04:02:16.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-06-20T16:42:44.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mdlayher/vsock","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ptrcnull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-10T03:55:53.000Z","updated_at":"2021-11-10T04:02:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ptrcnull/vsock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ptrcnull/vsock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrcnull%2Fvsock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrcnull%2Fvsock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrcnull%2Fvsock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrcnull%2Fvsock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptrcnull","download_url":"https://codeload.github.com/ptrcnull/vsock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptrcnull%2Fvsock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28432078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T19:16:32.688Z","updated_at":"2026-01-14T19:16:33.309Z","avatar_url":"https://github.com/ptrcnull.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vsock [![builds.sr.ht status](https://builds.sr.ht/~mdlayher/vsock.svg)](https://builds.sr.ht/~mdlayher/vsock?) [![GoDoc](https://godoc.org/github.com/mdlayher/vsock?status.svg)](https://godoc.org/github.com/mdlayher/vsock) [![Go Report Card](https://goreportcard.com/badge/github.com/mdlayher/vsock)](https://goreportcard.com/report/github.com/mdlayher/vsock)\n\nPackage `vsock` provides access to Linux VM sockets (`AF_VSOCK`) for\ncommunication between a hypervisor and its virtual machines.  MIT Licensed.\n\nFor more information about VM sockets, check out my blog about\n[Linux VM sockets in Go](https://medium.com/@mdlayher/linux-vm-sockets-in-go-ea11768e9e67).\n\n## Go version support\n\nThis package supports varying levels of functionality depending on the version\nof Go used during compilation. The `Listener` and `Conn` types produced by this\npackage are backed by non-blocking I/O, in order to integrate with Go's runtime\nnetwork poller in Go 1.11+. Additional functionality is available starting in Go\n1.12+. The older Go 1.10 is only supported in a blocking-only mode.\n\nA comprehensive list of functionality for supported Go versions can be found on\n[package vsock's GoDoc page](https://godoc.org/github.com/mdlayher/vsock#hdr-Go_version_support).\n\n## Stability\n\nAt this time, package `vsock` is in a pre-v1.0.0 state. Changes are being made\nwhich may impact the exported API of this package and others in its ecosystem.\n\n**If you depend on this package in your application, please use Go modules when\nbuilding your application.**\n\n## Requirements\n\nTo make use of VM sockets with QEMU and virtio-vsock, you must have:\n\n- a Linux hypervisor with kernel 4.8+\n- a Linux virtual machine on that hypervisor with kernel 4.8+\n- QEMU 2.8+ on the hypervisor, running the virtual machine\n\nBefore using VM sockets, following modules must be removed on hypervisor:\n\n- `modprobe -r vmw_vsock_vmci_transport`\n- `modprobe -r vmw_vsock_virtio_transport_common`\n- `modprobe -r vsock`\n\nOnce removed, `vhost_vsock` module needs to be enabled on hypervisor:\n\n- `modprobe vhost_vsock`\n\nOn VM, you have to enable `vmw_vsock_virtio_transport` module.  This module should automatically load during boot when the vsock device is detected.\n\nTo utilize VM sockets, VM needs to be powered on with following `-device` flag:\n\n- `-device vhost-vsock-pci,id=vhost-vsock-pci0,guest-cid=3`\n\nCheck out the\n[QEMU wiki page on virtio-vsock](http://wiki.qemu-project.org/Features/VirtioVsock)\nfor more details.  More detail on setting up this environment will be provided\nin the future.\n\n## Usage\n\nTo try out VM sockets and see an example of how they work, see\n[cmd/vscp](https://github.com/mdlayher/vsock/tree/master/cmd/vscp).\nThis command shows usage of the `vsock.ListenStream` and `vsock.DialStream`\nAPIs, and allows users to easily test VM sockets on their systems.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptrcnull%2Fvsock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptrcnull%2Fvsock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptrcnull%2Fvsock/lists"}