Arc-Compute/LibVF.IO

/dev/shm/* device not created?

tgharib opened this issue · 1 comments

This is a fresh ubuntu 20.04 install that I've decided to install to try libvfio. I followed the instructions exactly but after executing arcd start /path/to/your/yaml/file.yaml --preinstall --save in section 5.3.2, I get an error about a non-existent /dev/shm device.

Here is the error:

owner@owner-desktop:~$ arcd create ~/Desktop/nvidia-mdev.yaml ~/Desktop/en_windows_10_enterprise_ltsc_2019_x64_dvd_5795bb03.iso 100
Formatting '/home/owner/.local/libvf.io/live/89fae1f2-48c5-49f8-a90e-014f799ff984', fmt=qcow2 size=107374182400 cluster_size=65536 lazy_refcounts=off refcount_bits=16
owner@owner-desktop:~$ /bin/sudo /bin/qemu-system-x86_64 -D /home/owner/.local/libvf.io/logs/qemu/89fae1f2-48c5-49f8-a90e-014f799ff984-session.txt -no-hpet -uuid 89fae1f2-48c5-49f8-a90e-014f799ff984 -machine pc-q35-4.2,accel=kvm,usb=off,vmport=off,dump-guest-core=off -cpu IvyBridge-IBRS,ss=on,vmx=on,pcid=on,hypervisor=on,arat=on,tsc-adjust=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaveopt=on,pdpe1gb=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,hv-vapic,hv-spinlocks=0x1fff,hv-vendor-id=1234567890ab,kvm=off -rtc clock=host,base=localtime -m 8192 -smp cores=4,threads=1,sockets=1 -hda /home/owner/.local/libvf.io/live/89fae1f2-48c5-49f8-a90e-014f799ff984 --enable-kvm -device vfio-pci,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/765d5476-84fc-4ef8-92e4-ba24d4ca8b22,display=off --soundhw all -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22 -qmp unix:/tmp/sockets/89fae1f2-48c5-49f8-a90e-014f799ff984/main.sock,server,nowait -qmp unix:/tmp/sockets/89fae1f2-48c5-49f8-a90e-014f799ff984/master.sock,server,nowait -cdrom /home/owner/Desktop/en_windows_10_enterprise_ltsc_2019_x64_dvd_5795bb03.iso -set device.hostdev0.x-pci-device-id=6960
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-register [bit 8]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-vid [bit 9]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48DH).vmx-posted-intr [bit 7]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-register [bit 8]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-vid [bit 9]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48DH).vmx-posted-intr [bit 7]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-register [bit 8]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-vid [bit 9]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48DH).vmx-posted-intr [bit 7]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-register [bit 8]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48BH).vmx-apicv-vid [bit 9]
qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48DH).vmx-posted-intr [bit 7]
qemu-system-x86_64: -device vfio-pci,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/765d5476-84fc-4ef8-92e4-ba24d4ca8b22,display=off: warning: vfio 765d5476-84fc-4ef8-92e4-ba24d4ca8b22: Could not enable error recovery for the device
[2021-10-17 12:22:49] - INFO: Connecting to the socket
qemu-system-x86_64: Slirp: Failed to send packet, ret: -1
[2021-10-17 12:39:09] - INFO: Cleaning up VM
[sudo] password for owner: 
sudo: unable to read password: Input/output error
[2021-10-17 12:39:09] - INFO: Deleted MDEV: hostdev0
[sudo] password for owner: 
sudo: unable to read password: Input/output error
[2021-10-17 12:39:09] - INFO: Cleaned up VM
[2021-10-17 12:39:09] - INFO: Installing to base kernel

owner@owner-desktop:~$ arcd start ~/Desktop/nvidia-mdev.yaml --preinstall --save
[sudo] password for owner: 
[2021-10-17 12:44:17] - INFO: Saving new config file.
owner@owner-desktop:~$ /bin/sudo /bin/qemu-system-x86_64 -D /home/owner/.local/libvf.io/logs/qemu/13c54650-6da6-4808-96e0-ec24b76bb977-session.txt -no-hpet -device ivshmem-plain,id=shmem0,memdev=ivshmem -object memory-backend-file,id=ivshmem,mem-path=/dev/shm/kvmfr-13c54650-6da6-4808-96e0-ec24b76bb977,size=128M,share=yes -uuid 13c54650-6da6-4808-96e0-ec24b76bb977 -machine pc-q35-4.2,accel=kvm,usb=off,vmport=off,dump-guest-core=off -cpu IvyBridge-IBRS,ss=on,vmx=on,pcid=on,hypervisor=on,arat=on,tsc-adjust=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaveopt=on,pdpe1gb=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,hv-vapic,hv-spinlocks=0x1fff,hv-vendor-id=1234567890ab,kvm=off -rtc clock=host,base=localtime -m 8192 -smp cores=4,threads=1,sockets=1 -hda /home/owner/.local/libvf.io/live/13c54650-6da6-4808-96e0-ec24b76bb977 --enable-kvm -device vfio-pci,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/0c9dd019-5dac-4e75-b8c1-45b6e0dfafcc,display=off --soundhw all -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22 -qmp unix:/tmp/sockets/13c54650-6da6-4808-96e0-ec24b76bb977/main.sock,server,nowait -qmp unix:/tmp/sockets/13c54650-6da6-4808-96e0-ec24b76bb977/master.sock,server,nowait -cdrom /home/owner/.local/libvf.io/introspection-installations.rom -set device.hostdev0.x-pci-device-id=6960
qemu-system-x86_64: -cdrom /home/owner/.local/libvf.io/introspection-installations.rom: Could not open '/home/owner/.local/libvf.io/introspection-installations.rom': No such file or directory
/usr/bin/chgrp: cannot access '/dev/shm/kvmfr-13c54650-6da6-4808-96e0-ec24b76bb977': No such file or directory
[2021-10-17 12:44:20] - ERROR: Could not change socket information correctly cleaning up.
[2021-10-17 12:44:20] - INFO: Cleaning up VM
[2021-10-17 12:44:20] - INFO: Deleted MDEV: hostdev0
[2021-10-17 12:44:20] - INFO: Cleaned up VM
[2021-10-17 12:44:21] - INFO: Saving new config file.

And some additional log/debug information:

owner@owner-desktop:~/.local/libvf.io$ pwd
/home/owner/.local/libvf.io
owner@owner-desktop:~/.local/libvf.io$ find
.
./logs
./logs/qemu
./logs/qemu/89fae1f2-48c5-49f8-a90e-014f799ff984-session.txt
./logs/qemu/442888b9-2c50-49fd-8ee5-3750c35890fb-session.txt
./logs/qemu/e87cc8c9-f0e8-424a-8ed1-772a9d2ba8fa-session.txt
./logs/qemu/040ea120-9bc0-4da5-882f-07851967a68a-session.txt
./logs/qemu/f8556921-b5e7-40d1-a76b-a87615c45922-session.txt
./logs/qemu/13c54650-6da6-4808-96e0-ec24b76bb977-session.txt
./logs/qemu/6c63971c-d9ee-4d17-bbb8-0c83362441b4-session.txt
./logs/arcd
./logs/arcd/dba4d3c3-94bc-43db-a7c8-e1364d36aa6f.log
./logs/arcd/f8556921-b5e7-40d1-a76b-a87615c45922.log
./logs/arcd/442888b9-2c50-49fd-8ee5-3750c35890fb.log
./logs/arcd/6c63971c-d9ee-4d17-bbb8-0c83362441b4.log
./logs/arcd/13c54650-6da6-4808-96e0-ec24b76bb977.log
./logs/arcd/e87cc8c9-f0e8-424a-8ed1-772a9d2ba8fa.log
./logs/arcd/99e28c36-ad76-445d-84ee-a312c286882b.log
./logs/arcd/040ea120-9bc0-4da5-882f-07851967a68a.log
./logs/arcd/89fae1f2-48c5-49f8-a90e-014f799ff984.log
./logs/arcd/0b0488d1-0e03-4b1a-8401-c060de844ddf.log
./kernel
./kernel/windows.arc
./states
./lock
./live
owner@owner-desktop:~/.local/libvf.io/logs/arcd$ ls -lt
total 28
-rw-rw-r-- 1 owner owner 340 Oct 17 12:44 13c54650-6da6-4808-96e0-ec24b76bb977.log
-rw-rw-r-- 1 owner owner 253 Oct 17 12:39 89fae1f2-48c5-49f8-a90e-014f799ff984.log
-rw-rw-r-- 1 owner owner   0 Oct 17 12:21 0b0488d1-0e03-4b1a-8401-c060de844ddf.log
-rw-rw-r-- 1 owner owner   0 Oct 17 12:21 99e28c36-ad76-445d-84ee-a312c286882b.log
-rw-rw-r-- 1 owner owner 340 Oct 17 12:20 f8556921-b5e7-40d1-a76b-a87615c45922.log
-rw-rw-r-- 1 owner owner 340 Oct 17 12:14 442888b9-2c50-49fd-8ee5-3750c35890fb.log
-rw-rw-r-- 1 owner owner 340 Oct 17 12:11 040ea120-9bc0-4da5-882f-07851967a68a.log
-rw-rw-r-- 1 owner owner 340 Oct 17 12:08 6c63971c-d9ee-4d17-bbb8-0c83362441b4.log
-rw-rw-r-- 1 owner owner 253 Oct 17 12:04 e87cc8c9-f0e8-424a-8ed1-772a9d2ba8fa.log
-rw-rw-r-- 1 owner owner   0 Oct 17 01:41 dba4d3c3-94bc-43db-a7c8-e1364d36aa6f.log
owner@owner-desktop:~/.local/libvf.io/logs/arcd$ cat 13c54650-6da6-4808-96e0-ec24b76bb977.log 
[2021-10-17 12:44:17] - INFO: Saving new config file.
[2021-10-17 12:44:20] - ERROR: Could not change socket information correctly cleaning up.
[2021-10-17 12:44:20] - INFO: Cleaning up VM
[2021-10-17 12:44:20] - INFO: Deleted MDEV: hostdev0
[2021-10-17 12:44:20] - INFO: Cleaned up VM
[2021-10-17 12:44:21] - INFO: Saving new config file.
owner@owner-desktop:~/.local/libvf.io/logs/qemu$ ls -lt
total 0
-rw-r--r-- 1 root root 0 Oct 17 12:44 13c54650-6da6-4808-96e0-ec24b76bb977-session.txt
-rw-r--r-- 1 root root 0 Oct 17 12:22 89fae1f2-48c5-49f8-a90e-014f799ff984-session.txt
-rw-r--r-- 1 root root 0 Oct 17 12:20 f8556921-b5e7-40d1-a76b-a87615c45922-session.txt
-rw-r--r-- 1 root root 0 Oct 17 12:14 442888b9-2c50-49fd-8ee5-3750c35890fb-session.txt
-rw-r--r-- 1 root root 0 Oct 17 12:11 040ea120-9bc0-4da5-882f-07851967a68a-session.txt
-rw-r--r-- 1 root root 0 Oct 17 12:08 6c63971c-d9ee-4d17-bbb8-0c83362441b4-session.txt
-rw-r--r-- 1 root root 0 Oct 17 11:45 e87cc8c9-f0e8-424a-8ed1-772a9d2ba8fa-session.txt
owner@owner-desktop:~/.local/libvf.io/logs/qemu$ cat 13c54650-6da6-4808-96e0-ec24b76bb977-session.txt 
owner@owner-desktop:~/.local/libvf.io/logs/qemu$ 
owner@owner-desktop:/dev/shm$ pwd
/dev/shm
owner@owner-desktop:/dev/shm$ ls -al
total 0
drwxrwxrwt  2 root root   40 Oct 17 12:52 .
drwxr-xr-x 21 root root 4500 Oct 17 12:22 ..

Here is my yaml config:

%YAML 1.2
%TAG !n! tag:nimyaml.org,2016:
--- !n!custom:Config 
startintro: false
nographics: false
spice: false
introspect: "looking-glass"
shareddir: !!null ~
connectivity: 
  exposedPorts: 
    - 
      guest: 22
      host: 2222
container: 
  kernel: windows.arc
  state: []
  initialSize: 20
  iso: "/home/owner/.local/libvf.io/introspection-installations.rom"
cpus: 
  cores: 4
  sockets: 1
  threads: 1
  ramAlloc: 8192
gpus: 
  - 
    - 
      maxVRam: 2000
    - 
      minVRam: 1000
    - 
      gpuType: sysfsdev
    - 
      mdevType: ""
    - 
      parentPort: !!null ~
    - 
      devId: hostdev0
    - 
      suffix: Q
nics: []
root: /home/owner/.local/libvf.io
sudo: false
commands: 
  - 
    arg: "-set"
    values: ["device.hostdev0.x-pci-device-id=6960"]

Semi-relevant side-note: while this is a fresh install, I tried libvfio earlier on a non-fresh ubuntu install and I did get past this step. That is, the /dev/shm device did exist. However, after section 5.3.3 (i.e. I completed all the steps), the looking glass client would refuse to launch, so I figured I would do a second attempt with a fresh ubuntu install.

I seem to have resolved the issue by deleting ~/.local/libvf.io and ~/Desktop/libvf.io-master (extracted zip file) and rerunning the install script from a fresh github zip.