13

在archlinux上挂载virtualbox磁盘镜像文件

 3 years ago
source link: https://www.lujun9972.win/blog/2017/02/10/%E5%9C%A8archlinux%E4%B8%8A%E6%8C%82%E8%BD%BDvirtualbox%E7%A3%81%E7%9B%98%E9%95%9C%E5%83%8F%E6%96%87%E4%BB%B6/index.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

在archlinux上挂载virtualbox磁盘镜像文件

  1. 安装QEMU

    pacman -S --noconfirm qemu
    
  2. 安装nbd(network block device)

    pacman -S --noconfirm nbd
    
  3. 加载nbd module

    modprobe nbd
    
  4. 使用qemu-nbd将virtualbox磁盘镜像文件模拟成block磁盘

    qemu-nbd -c /dev/nbd0 vdi-file
    
  5. 像正常挂载分区一样操作

    mount /dev/nbd0p1 /mnt
    
  6. umount分区

    umount /mnt
    
  7. 关闭nbd服务

    qemu-nbd -d /dev/nbd0
    

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK