zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    常用CDN
    SQL语句小结
    jQuery源码解析----domManip
    服务治理 SpringCloud Eureka
    docker容器操作
    docker镜像操作常用命令
    Maven
    Centos6解决网络不可达
    MyBatis
    SpringMVC
  • 原文地址:https://www.cnblogs.com/dream397/p/14085011.html
Copyright © 2011-2022 走看看