Article ID: 123830, created on Dec 8, 2014, last review on Dec 8, 2014

  • Applies to:
  • Virtuozzo 6.0

Question

I have an ".hdd" image of a virtual machine, but I do not have the configuration file for this virtual machine.

How do I directly mount the .hdd to get the data?

Answer

The ".hdd" image can be mounted using "prl_mounterd" client, e.g:

# mkdir -p /vz/mnt/myvm
# mkdir -p /vz/mnt/test
# prl_mounterd mount --disk /var/parallels/virtual_machine.pvm/virtual_machine.hdd /vz/mnt/test --all

mounted: /vz/mnt/test/volume_1
# ll /vz/mnt/test/volume_1
total 2095444
-rw-rw-rw- 1 root root          0 Nov 21 02:12 AUTOEXEC.BAT
-rw-rw-rw- 1 root root        221 Nov 21 02:01 boot.ini
-rw-rw-rw- 1 root root          0 Nov 21 02:12 CONFIG.SYS
drwxrwxrwx 1 root root          0 Nov 21 02:20 Documents and Settings
-rw-rw-rw- 1 root root          0 Nov 21 02:12 IO.SYS
-rw-rw-rw- 1 root root          0 Nov 21 02:12 MSDOS.SYS
-rw-rw-rw- 1 root root      47772 Feb 18  2007 NTDETECT.COM
-rw-rw-rw- 1 root root     297072 Feb 18  2007 ntldr
-rw-rw-rw- 1 root root 2145386496 Dec  5 18:03 pagefile.sys
drwxrwxrwx 1 root root          0 Nov 21 07:41 Program Files
drwxrwxrwx 1 root root          0 Nov 21 02:34 Program Files (x86)
drwxrwxrwx 1 root root          0 Nov 21 02:20 System Volume Information
drwxrwxrwx 1 root root          0 Dec  5 18:03 vz
drwxrwxrwx 1 root root          0 Dec  5 18:03 vzlog
drwxrwxrwx 1 root root          0 Dec  5 18:13 WINDOWS
drwxrwxrwx 1 root root          0 Nov 21 02:13 wmpub

In case there are several volumes on the disk, you can mount a specific volume:

# prl_mounterd mount --disk /var/parallels/virtual_machine.pvm/virtual_machine.hdd --volume 1 /vz/mnt/myvm
# ll /vz/mnt/myvm/
total 2095444
-rw-rw-rw- 1 root root          0 Nov 21 02:12 AUTOEXEC.BAT
-rw-rw-rw- 1 root root        221 Nov 21 02:01 boot.ini
-rw-rw-rw- 1 root root          0 Nov 21 02:12 CONFIG.SYS
drwxrwxrwx 1 root root          0 Nov 21 02:20 Documents and Settings
-rw-rw-rw- 1 root root          0 Nov 21 02:12 IO.SYS
-rw-rw-rw- 1 root root          0 Nov 21 02:12 MSDOS.SYS
-rw-rw-rw- 1 root root      47772 Feb 18  2007 NTDETECT.COM
-rw-rw-rw- 1 root root     297072 Feb 18  2007 ntldr
-rw-rw-rw- 1 root root 2145386496 Dec  5 18:03 pagefile.sys
drwxrwxrwx 1 root root          0 Nov 21 07:41 Program Files
drwxrwxrwx 1 root root          0 Nov 21 02:34 Program Files (x86)
drwxrwxrwx 1 root root          0 Nov 21 02:20 System Volume Information
drwxrwxrwx 1 root root          0 Dec  5 18:03 vz
drwxrwxrwx 1 root root          0 Dec  5 18:03 vzlog
drwxrwxrwx 1 root root          0 Dec  5 18:13 WINDOWS
drwxrwxrwx 1 root root          0 Nov 21 02:13 wmpub

To check the list of currently mounted disks:

# prl_mounterd list --all
/vz/mnt/test/volume_1
/vz/mnt/myvm

To unmount the disk:

# prl_mounterd unmount /vz/mnt/myvm

or to unmount all currently mounted disks:

# prl_mounterd unmount --all

NOTE: not all filesystems are supported, please check the list below for more details:

Supported:

filesystems: EXT4, EXT3, EXT2, NTFS, FAT16, FAT32, REISERFS

disks: basic, gpt

Unsupported:

fileystems: LINUXSWAP, REISER4, XFS, JFS, HPFS

disks: dynamic, lvm

Search Words

mount hdd

prl_mounterd

c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF