[PVE-User] RAW , VMDK Explorer

Paul Gray gray at cs.uni.edu
Tue Oct 18 13:21:40 CEST 2011


On 10/18/2011 02:54 AM, Muhammad Yousuf Khan wrote:
> i need a explorer for *.raw or for all supported storage type in
> proxmox. i want to copy a data from a hard drive image without attaching
> it to a VM. kindly share if you know any.
>

Guiliano already mentioned qemu-nbd, but if you're both command-line 
savvy and understand the layout of raw disks, you can access the 
partitions on a raw volume by mounting the image's partition with 
mount's offset= option.

If you're after a GUI (somewhat indicated by the request for an 
"Explorer"), then the steps below are not suitable for obvious reasons. 
  But if you work with disks a lot and want "another way" to access 
information from raw slices, the approach below will give you another 
option.

Use parted to get the offset to the partition you're after:
   parted disimage.raw
-In parted, change to Byte units by typing:
    unit
    B
-Then display the partitions using:
    print
- Leave parted with "quit"

Your print result should have displayed the Byte offsets for all of the 
partitions which you can use with the offset= option in mount to access 
the partition.

Here's a full example:

terabox:/backups# parted try2.raw
GNU Parted 1.8.8
Using /backups/try2.raw
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit
Unit?  [compact]? B
(parted) print
Model:  (file)
Disk /backups/try2.raw: 42949672960B
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End           Size          Type     File system  Flags
  1      28672B  42939617279B  42939588608B  primary  ntfs         boot

(parted) quit
terabox:/backups# mount -o offset=28672,ro,loop try2.raw /mnt
terabox:/backups# ls /mnt
AUTOEXEC.BAT  cmdlines.txt~  Documents and Settings  MSDOS.SYS     ntldr 
         PnPdrvrs       RECYCLER                   WINDOWS
boot.ini      CONFIG.SYS     IO.SYS                  NTDETECT.COM 
pagefile.sys  Program Files  System Volume Information  wmpub

For BSD image disks, the process is similar, but requires a few 
additional steps to determine the location of the slices.

-- 
Paul Gray                                         -o)
314 East Gym, Dept. of Computer Science           /\\
University of Northern Iowa                      _\_V
  Message void if penguin violated ...  Don't mess with the penguin
  No one says, "Hey, I can't read that ASCII attachment ya sent me."



More information about the pve-user mailing list