如何在Linux中附加VHDx或VHD文件?

如何在 Linux中附加VHDX或VHD文件

我的意思是将虚拟硬盘作为块设备附加,并使用外部工具来读取这些设备.

里面的文件系统不可安装.我不需要挂载文件系统,但处理它就像在真正的硬盘上一样.

我阅读了guestfish的手册页,但找不到怎么做.

解决方法

您可以使用 libguestfs-tools来实现此目的.

>首先,您需要在类似Ubuntu / Debian的Linux上安装它:

sudo apt-get install libguestfs-tools

>然后,您几乎可以随意安装:

guestmount --add yourVirtualdisk.vhdx --inspector --ro /mnt/anydirectory

这只是只读提取点的一个示例.

提示

>以普通用户身份运行,即:

guestmount ...

代替:

sudo guestmount ...

>开关; man page的引文:

--add

Add a block device or virtual machine image.

--inspector

Using 07002 code,inspect the disks looking for an operating system and mount filesystems as they would be mounted on the real virtual machine.

--ro

Add devices and mount everything read-only. Also disallow writes and make the disk appear read-only to FUSE.

相关文章

Linux中的ARP防火墙主要用于防御ARP欺骗攻击,其效果取决于多...
insmod和modprobe加-f参数导致Invalid module format错误 这...
将ArchLinux安装到U盘 几个月前入门Arch的时候上网搜了不少安...
1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...