VHD 安装问题:“必须指定单个安装点”

VHD 安装问题:“必须指定单个安装点”

我已经关注了[整篇文章]关于如何使用 vdfuse 在 Linux 中挂载 VHD](http://rrbits.com/epb/2014/09/14/mount-a-vhd-or-vdi-in-linux-with-vdfuse),除了最后一步,一切都很顺利。当我输入vdfuse -r "/media/mike/DATA/VM-VHD/SGOS.vhd" ~/Test(我只想从该 VHD 复制一个文件)时,我得到的结果是:

ERROR: a single mountpoint must be specified

DESCRIPTION: This Fuse module uses the VirtualBox access library to open a 
VirtualBox supported VD image file and mount it as a Fuse file system.  The
mount point contains a flat directory containing the files EntireDisk,
Partition1 .. PartitionN.  These can then be loop mounted to access the
underlying file systems
Version: 0.83

USAGE: vdfuse [options] -f image-file mountpoint
    -h  help
    -r  readonly
    -t  specify type (VDI, VMDK, VHD, or raw; default: auto)
    -f  VDimage file
    -s  Snapshot file(s) to load on top of the image file
    -a  allow all users to read disk
    -w  allow all users to read and write to disk
    -g  run in foreground
    -v  verbose
    -d  debug

NOTE: you must add the line "user_allow_other" (without quotes)
to /etc/fuse.confand set proper permissions on /etc/fuse.conf
for this to work.  

我确信我的user_allow_other配置文件和权限设置正确。那个“挂载点”应该是什么?

答案1

你漏掉了-f选项。看起来还vdfuse需要告知它type是什么文件。命令应该是:

vdfuse -r -t VHD -f "/media/mike/DATA/VM-VHD/SGOS.vhd" ~/Test 

指定-f要挂载的文件。-t表示类型,因为您使用的是 VHD,所以指定了该类型。

另外,请确保取消注释“user_allow_other”行/etc/fuse.conf。要取消注释,只需将以下行粘贴到终端:

sudo sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf

用于#注释文件中的一行,sed上面的行将从该行中删除#

在下面的示例中,我将逐步展示如何访问我的虚拟机中包含的文件:

terrance@terrance-Linux:~$ vdfuse -r -t VDI -f "/home/terrance/VirtualBox VMs/Kubuntu 16.04/Kubuntu 16.04.vdi" ~/Test
terrance@terrance-Linux:~$ cd Test
terrance@terrance-Linux:~/Test$ ls -al
total 41939973
dr-xr-x---  1 terrance terrance          0 Jun  9 14:10 .
drwxr-xr-x 61 terrance terrance        4096 Jun 10 16:11 ..
-r--------  1 terrance terrance 21474836480 Jun  9 14:10 EntireDisk
-r--------  1 terrance terrance 17178820608 Jun  9 14:10 Partition1
-r--------  1 terrance terrance  4292870144 Jun  9 14:10 Partition5
terrance@terrance-Linux:~/Test$ sudo mount -o loop Partition1 /mnt
terrance@terrance-Linux:~/Test$ ls /mnt
bin   dev  home        lib    lost+found  mnt  proc  run   srv  tmp  var
boot  etc  initrd.img  lib64  media       opt  root  sbin  sys  usr  vmlinuz

希望这可以帮助!

相关内容