Add VirtioVsock to guest

m4rcs

New Member
Nov 15, 2018
4
0
1
34
For one of my applications it would be very nice to use a VirtioVsock. (Link: hxxps://wiki.qemu.org/Features/VirtioVsock)

I tried adding
Code:
...
args: -device vhost-vsock-pci,guest-cid=3
...

to the <vmid>.conf file. But the machine would start because of:
Code:
Use of uninitialized value in split at /usr/share/perl5/PVE/QemuServer/Cloudinit.pm line 88.

Did someone get the VirtioVsock to work?
 
Hi,

I guess you are on an old version.

Please update your system.
 
I think I am on the latest version:

Code:
root@proxmox ~ # pveversion
pve-manager/5.2-10/6f892b40 (running kernel: 4.15.18-5-pve)

So this should be the problem.
 
Can you please send your VM Config.
 
108.conf
Code:
agent: 1,fstrim_cloned_disks=1
args: -device vhost-vsock-pci,guest-cid=5
boot: c
bootdisk: scsi0
ciuser: ms
ide2: vms:vm-108-cloudinit,media=cdrom
ipconfig0: ...
memory: 512
name: ...
net0: virtio=E2:7F:37:35:19:08,bridge=vmbr1
ostype: l26
scsi0: vms:vm-108-disk-0,size=4812M
scsihw: virtio-scsi-pci
serial0: socket
serial1: socket
smbios1: uuid=8b0bf5ed-4d98-4a3f-8299-ab2a13ab0332
sshkeys: ...
vmgenid: 9d70f70c-bef2-4a2c-b283-0b21b1b1df72

Error when starting:
Code:
Use of uninitialized value in split at /usr/share/perl5/PVE/QemuServer/Cloudinit.pm line 88.
Total translation table size: 0
Total rockridge attributes bytes: 417
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
178 extents written (0 MB)
kvm: -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3: PCI: slot 3 function 0 not available for virtio-balloon-pci, in use by vhost-vsock-pci
TASK ERROR: start failed: command '/usr/bin/kvm -id 108 -name ... -chardev 'socket,id=qmp,path=/var/run/qemu-server/108.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qemu-server/108-event.qmp,server,nowait' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/108.pid -daemonize -smbios 'type=1,uuid=8b0bf5ed-4d98-4a3f-8299-ab2a13ab0332' -smp '1,sockets=1,cores=1,maxcpus=1' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga std -vnc unix:/var/run/qemu-server/108.vnc,x509,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 512 -device 'vhost-vsock-pci,guest-cid=5' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'vmgenid,guid=9d70f70c-bef2-4a2c-b283-0b21b1b1df72' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -chardev 'socket,id=serial0,path=/var/run/qemu-server/108.serial0,server,nowait' -device 'isa-serial,chardev=serial0' -chardev 'socket,id=serial1,path=/var/run/qemu-server/108.serial1,server,nowait' -device 'isa-serial,chardev=serial1' -chardev 'socket,path=/var/run/qemu-server/108.qga,server,nowait,id=qga0' -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -drive 'file=/dev/vg0/vm-108-cloudinit,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2' -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' -drive 'file=/dev/vg0/vm-108-disk-0,if=none,id=drive-scsi0,format=raw,cache=none,aio=native,detect-zeroes=on' -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap108i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=E2:7F:37:35:19:08,netdev=net0,bus=pci.0,addr=0x12,id=net0'' fail
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!