creating hdd images for os development

Discussion in 'Other Virtual machines' started by pbleisch, Mar 25, 2011.

  1. pbleisch

    pbleisch Bit poster

    Messages:
    3
    I'd like to use Parallels for hobby OS development. I have a bootloader to go into the MBR of an HDD image. I've been using the following script to create the an image of the harddrive. I'm using dd to create the image from the DMG based on several posts on these forums as well as http://kb.parallels.com/en/5403 However, when I try to use the resulting .hdd, Parallels 6 complains that the image is corrupt and the HDD fails to attach when booting the vm. The dmg image looks good using diskutil, fdisk, etc...

    Thoughts about what I'm missing?

    Thanks!

    -- begin mkhdd --
    #!/bin/sh

    HDDDMG=$1
    DIRS=$2
    MBR=$3

    hdiutil create -megabytes 16 -volname "OZBOOT" -format UDRW -layout MBRSPUD -srcfolder $DIRS -ov -fs MS-DOS $HDDDMG
    DEVICE=$(basename $(hdiutil attach $HDDDMG -nomount -noverify | head -1))
    echo device is at $DEVICE
    echo fdisk -u -f $3 -y /dev/$DEVICE
    fdisk -u -f $3 -y /dev/$DEVICE
    dd if=/dev/$DEVICE of=oz.hdd
    hdiutil detach $DEVICE
     
  2. pbleisch

    pbleisch Bit poster

    Messages:
    3
    A little more information. I've confirmed that I get the same error when trying to use it as an HDD image ("The specified hard disk image file is invalid. Do you want to save the virtual machine configuration anyway?") even if I remove the fdisk command which removes any MBR of mine.
     
  3. pbleisch

    pbleisch Bit poster

    Messages:
    3
    Any thoughts here? I've also tried letting Parallels create the harddrive in a new VM and then modifying the DiskDescriptor.xml afterwards to be a plain drive of the right size (CHS, etc...) but that fails as well when trying to open the disk on VM boot.

    Does Parallels have a minimum HDD size that it supports?
     

Share This Page