#40 Dynamic HDD image size

open
nobody
None
5
2004-09-10
2004-09-10
Anonymous
No

One thing which makes PC virtual machines so great is
the fact that virtual disk size is dynamic (it does not
shrink automatically but at least you do not have to
allocate 100 gig file if you want that big virtual disk)

could this be achieved with pearpc ? (I was even
thinking 'chunkmap' in different file or somewhere in the
disk image which would contain mappings between disk
image positions and real file positions)

Juhani Suhonen
juhani.suhonen@luukku.com

Discussion

  • Logged In: YES
    user_id=3437

    It's not a feature of PearPC but of the underlying file
    system. On most modern file systems you get this
    automatically, on windows you can use a utility like fsutil
    to create sparse files.

     
  • Logged In: YES
    user_id=260442

    I am in Linux, and you can do the following:

    bash-2.05b# cp --sparse=always pearpc-3gib.img test.img
    bash-2.05b# ls -lsk
    total 9280044
    1940 -rw------- 1 root root 1936 May 22 18:47
    Apple3Com3C90x-7-sw.iso
    160 -rw-r--r-- 1 root root 156 Sep 13 06:55
    bootfile.dump
    8 -rw-r--r-- 1 root root 8 May 21 19:53 nvram
    3148540 -rw------- 1 root root 3145464 Sep 13 07:02
    pearpc-3gib.img
    3148540 -rw------- 1 root root 3145464 Sep 10 14:29
    pearpc-3gib2.img
    4 -rw-r--r-- 1 root root 3 Sep 10 14:11 ppc.conf
    4 -rw-r--r-- 1 root root 3 Sep 7 10:41 ppc.conf2
    0 -rw-r--r-- 1 root root 0 Sep 13 06:55 ppc0.active
    0 -rw-r--r-- 1 root root 0 Sep 10 22:13 ppc1.active
    4 drwxrwxrwx 2 root root 4 Sep 10 14:38 scripts
    2980828 -rw------- 1 root root 3145464 Sep 14 16:18 test.img
    16 -rw-r--r-- 1 root root 15 Jun 26 19:11 video.x
    bash-2.05b#

    Notice that test.img now only takes 2980828 blocks instead
    of the original 3148540 blocks. This just saved me 167 megs.
    BTW, my guest tell me my guest HD only has 739 megs available.

    I can boot and use the test.img file normally with pearpc.

     
  • Logged In: NO

    Use NTFS compression for ppc disk image