博客
关于我
Linux-挂载vdi文件
阅读量:519 次
发布时间:2019-03-07

本文共 701 字,大约阅读时间需要 2 分钟。

现在需要从宿主机(Ubuntu)传一些文件到VirtualBox的客户机中,客户机的磁盘文件是arch.vdi,下面是挂载vdi到Linux的方法。

apt install qemu-utilsmodprobe nbdvdi="vdi文件路径"qemu-nbd -c /dev/nbd0 "$vdi"# 使用相关命令查看分区结构fdisk -l /dev/nbd0# 下面是实例输出"""Disk /dev/nbd0: 25.3 GiB, 27162755072 bytes, 53052256 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x4209d41fDevice      Boot    Start      End  Sectors  Size Id Type/dev/nbd0p1          2048 20973567 20971520   10G 83 Linux/dev/nbd0p2      20973568 53052255 32078688 15.3G 83 Linux"""# 挂载分区mount /dev/nbd0p1 /mnt

如果卸载的话

umount /dev/nbd0p1qemu-nbd --disconnect /dev/nbd0

转载地址:http://nxpjz.baihongyu.com/

你可能感兴趣的文章
nginx+php的搭建
查看>>
nginx+tomcat+memcached
查看>>
nginx+tomcat单个域名及多个域名配置
查看>>
Nginx+Tomcat实现动静分离
查看>>
nginx+Tomcat性能监控
查看>>
nginx+uwsgi+django
查看>>
nginx+vsftp搭建图片服务器
查看>>
Nginx-http-flv-module流媒体服务器搭建+模拟推流+flv.js在前端html和Vue中播放HTTP-FLV视频流
查看>>
nginx-vts + prometheus 监控nginx
查看>>
Nginx/Apache反向代理
查看>>
Nginx: 413 – Request Entity Too Large Error and Solution
查看>>
nginx: [emerg] getpwnam(“www”) failed 错误处理方法
查看>>
nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:
查看>>
nginx:Error ./configure: error: the HTTP rewrite module requires the PCRE library
查看>>
Nginx:objs/Makefile:432: recipe for target ‘objs/src/core/ngx_murmurhash.o‘解决方法
查看>>
nginxWebUI runCmd RCE漏洞复现
查看>>
nginx_rtmp
查看>>
Nginx、HAProxy、LVS
查看>>
nginx一些重要配置说明
查看>>
Nginx下配置codeigniter框架方法
查看>>