Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@bergwolf
Copy link
Member

@bergwolf bergwolf commented Feb 22, 2017

The PR imports runv changes from hyperhq/runv#411 to add vsock support to hyperd.

vsock support is enabled via EnableVsock=true option in /etc/hyper/config and currently it only supports qemu/libvirt driver and does not work with template enabled.

Hypervisor=qemu
EnableVsock=true
[hypervsock@lib]$sudo hyperctl run -d busybox
POD id is busybox-2866232067
Time to run a POD is 3760 ms
[hypervsock@lib]$ps aux|grep vsock
root      92079 41.7  5.9 847492 106804 ?       Sl   15:42   0:03 /bin/qemu-system-x86_64 -machine pc-i440fx-2.1,accel=kvm,usb=off -global kvm-pit.lost_tick_policy=discard -cpu host -kernel /var/lib/hyper/kernel -initrd /var/lib/hyper/hyper-initrd.img -append console=ttyS0 panic=1 no_timer_check -realtime mlock=off -no-user-config -nodefaults -no-hpet -rtc base=utc,driftfix=slew -no-reboot -display none -boot strict=on -m size=64,slots=1,maxmem=32768M -smp cpus=1,maxcpus=8 -numa node,nodeid=0,cpus=0-7,mem=64 -qmp unix:/var/run/hyper/vm-mZnUhloRut/qmp.sock,server,nowait -serial unix:/var/run/hyper/vm-mZnUhloRut/console.sock,server,nowait -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -chardev socket,id=charch0,path=/var/run/hyper/vm-mZnUhloRut/hyper.sock,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charch0,id=channel0,name=sh.hyper.channel.0 -chardev socket,id=charch1,path=/var/run/hyper/vm-mZnUhloRut/tty.sock,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charch1,id=channel1,name=sh.hyper.channel.1 -fsdev local,id=virtio9p,path=/var/run/hyper/vm-mZnUhloRut/share_dir,security_model=none -device virtio-9p-pci,fsdev=virtio9p,mount_tag=share_dir -daemonize -pidfile /var/run/hyper/vm-mZnUhloRut/pidfile -D /var/log/hyper/qemu/vm-mZnUhloRut.log
-device vhost-vsock-pci,id=vsock0,bus=pci.0,addr=5,guest-cid=1025
[hypervsock@lib]$sudo hyperctl exec -t busybox-2866232067 lsmod
vmw_vsock_virtio_transport 5033 4 - Live 0xffffffffa0014000
vmw_vsock_virtio_transport_common 9538 1 vmw_vsock_virtio_transport, Live 0xffffffffa000b000
vsock 23269 6 vmw_vsock_virtio_transport,vmw_vsock_virtio_transport_common, Live 0xffffffffa0000000

Need to update golang.org/x/sys/unix separately because importing
runv does not solve the dependency.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
@bergwolf
Copy link
Member Author

travis (https://travis-ci.org/hyperhq/hyperd/builds/204104859) shows #1196 passed but somehow the result was not showed here.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
@bergwolf bergwolf force-pushed the vsock-rebased branch 2 times, most recently from a8a6e0a to 9f673d6 Compare March 1, 2017 02:02
Signed-off-by: Peng Tao <bergwolf@gmail.com>
@laijs laijs merged commit 87c38d1 into hyperhq:master Mar 3, 2017
@gnawux gnawux added this to the v0.8.1 milestone Mar 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants