Проблема с монтированием VHD

Я следовал целой статье Mount VHD или VDI в Linux с 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
задан 10 June 2016 в 23:41

1 ответ

You're missing the -f option. It also looks like vdfuse needs to be told what the type of file it is. The command should be:

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

The -f specifies the file that you're mounting. The -t means what type, since you're using VHD, that is what is specified.

Also make sure that you uncomment the line for "user_allow_other" in /etc/fuse.conf. To uncomment just paste the line below to a terminal:

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

the # is used to comment a line in a file and the sed line above removes the # from that line.

In my example below I am showing step-by-step of how I am able to access the files contained within my VM:

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

Hope this helps!

3
ответ дан 7 December 2019 в 12:39

Другие вопросы по тегам:

Похожие вопросы: