mount blockdevices in the guest VM instead of passing them through as volume

https://github.com/kata-containers/runtime/issues/571

 

https://github.com/gotoz/runq#storage

 

 

docker run -it --runtime=kata-runtime  --device data1:/data --rm  ubuntu /bin/bash
docker: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "data1": no such file or directory.

 

qemu-img create -f raw disk1.img 1G

qemu-system-aarch64  -name vm2 -nographic  \
  -enable-kvm -M virt,usb=off -cpu host -smp 2 -m 4096 \
  -global virtio-blk-device.scsi=off \
  -device virtio-scsi-device,id=scsi \
  -kernel vmlinuz-4.18 --append "console=ttyAMA0  root=UUID=6a09973e-e8fd-4a6d-a8c0-1deb9556f477" \
  -initrd initramfs-4.18 \
 -drive file=vhuser-test1.qcow2  \
 -netdev user,id=unet,hostfwd=tcp:127.0.0.1:1122-:22 -device virtio-net-device,netdev=unet \
 -vnc :10\
 -hdb disk1.img \

 

[root@localhost ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vdb    253:16   0    1G  0 disk 
vda    253:0    0   20G  0 disk 
├─vda2 253:2    0  7.8G  0 part /
└─vda1 253:1    0  200M  0 part /boot/efi
[root@localhost ~]# 

 

kata vm

 

posted on 2020-12-04 11:43  tycoon3  阅读(178)  评论(0编辑  收藏  举报

导航