VMware/Preparing a disk image

Instructions for preparing a VMWare disk image from a SoaS iso image file.
 * (Adapted from VirtualBox/Preparing a disk image)

These instructions only work up to a point, see below


 * 1) Create a new VM.
 * 2) click "Continue without a disk"
 * 3) select "Create a custom virtual machine", continue
 * 4) Choose Operating System "Linux" and Version "Other 2.6.x kernel", continue
 * 5) click "Customize Settings"
 * 6) type a name for your virtual machine (e.g., "SoaS"), save
 * 7) in "Hard Disks", change to 1 GB, click "Apply", click "Show All"
 * 8) in "CDs & DVDs" choose "Use disk image" and select the SoaS iso you downloaded
 * 9) * http://download.sugarlabs.org/soas/snapshots/2/?C=M;O=D, for Fedora-11-beta.
 * 10) you can close the Settings window.
 * 11) select your new VM and start it
 * 12) Sugar starts, type your name and select a buddy color.
 * 13) Open Terminal.
 * 14) su -
 * 15) parted /dev/sda
 * 16) *mklabel msdos -- make partition table
 * 17) *mkpartfs primary ext2 0 1024
 * 18) *toggle 1 boot
 * 19) *quit
 * 20) umount /dev/sda1  -- Soas2-200905241902.iso auto mounts the disk, so unmount it for the next script
 * 21) /mnt/live/LiveOS/livecd-iso-to-disk --overlay-size-mb 300 --home-size-mb 160 --unencrypted-home --delete-home /dev/sr0 /dev/sda1
 * 22) * the --overlay-size-mb NNN option creates space for persistence of changes on the disk; otherwise, a liveOS disk is read-only.
 * 23) * the --home-size-mb NNN option creates space for saving the /home/liveuser folder if you want to update the OS image while keeping the user files. (In this case, skip the new disk creation and parted steps and leave out the --home-size-mb NNN option at this step and continue on.)
 * 24) * the --unencrypted-home option prevents password protection and encryption on the /home/liveuser folder. This releaves the overhead on the compressed sqaushfs and should be more robust to file system failures (outside of security).
 * 25) * the --delete-home option is used to avoid an error message while requesting both a new home (with --home-size-mb) and a persistent home (with--unencrypted-home). You wouldn't use this option on an upgrade.
 * 26) * don't worry about the script reporting it installed to a USB stick, it actually installed to the 1 GB disk image we created above
 * 27) poweroff
 * 28) * if it warns you about the CD being lock, click "yes"
 * 29) in the Settings for the VM, under "CDs & DVDs" disable the "Connected" checkbox
 * 30) start VM again

'''at this point my VM hung. stuff below not adapted yet'''

# Section "Device" Identifier "VirtualBox Video Card" Driver "vboxvideo" EndSection # # Section "Screen" Identifier "Default Screen" Device "VirtualBox Video Card" Monitor "Generic Monitor" DefaultDepth 16 SubSection "Display" Depth 16 Modes "1200x900" "1024x768" "800x600" "640x480" EndSubSection EndSection
 * 1) Open Terminal
 * 2) su -
 * 3) yum install dkms gcc make ppl binutils glibc-devel glibc-headers kernel-headers kernel-devel
 * 4) go to VMWare menu->Virtual Machine->Install VMWare Tools
 * 5) mkdir /mnt/cdrom
 * 6) mount /dev/sr0 /mnt/cdrom
 * 7) cd /mnt/cdrom
 * 8) ./VBoxLinuxAdditions-x86.run
 * 9) * (This stalled on two trials; had to reboot and restart.)
 * 10) * If upgrading from one VirtualBox version to another, start with fresh virtual disks and machines built with the new versions to avoid breakage.
 * 11) reboot
 * 12) Edit /etc/X11/xorg.conf to match the following section:   (This is for 1200x900 (XO) and other resolutions.)
 * 13) Default xorg.conf for Xorg 1.5+ without PCI_TXT_IDS_PATH enabled.
 * 1) This file was created by VirtualBox Additions installer as it
 * 2) was unable to find any existing configuration file for X.
 * 1) From example in section 4.3.2 of the VirtualBox Help manual:

Finally,
 * 1) Open Terminal
 * 2) Terminal
 * 3) rm -rf ~/.sugar (if distributing image)
 * 4) su -
 * 5) shutdown -h now
 * 6) Now you can share the VDI file.

It would be wise to maintain a clone of your virtual disk image to restart if the working copy is damaged:
 * 1) From host command line (Windows cmd, or Linux terminal)  See VirtualBox Help section 8.14.
 * 2) * VBoxManage clonehd        |  [-format VDI|VMDK|VHD|RAW| ] [-remember]
 * 3) Reclone any virtual hard disks you would like to archive.

To enable SSH communications, we need to open the firewall for SSH, permit no password for the ssh deamon, and start the sshd service:


 * 1) in Terminal,
 * 2) su -
 * 3) system-config-firewall
 * 4) close the startup warning dialog
 * 5) check mark the SSH service
 * 6) click the apply action button, approve change
 * 7) File>Quit
 * 8) pico /etc/ssh/sshd_config
 * 9) [add] PermitEmptyPasswords yes
 * 10) ^O (WriteOut),  on File Name to Write: /etc/ssh/sshd_config, ^X (Exit)
 * 11) chkconfig --level 345 sshd on
 * 12) service sshd start

I tried again using the SoaS strawberry release today, but it did do not work either, see below and then the liveinst app just freezes :( so no luck again
 * 1) if you have not downloaded a SoaS iso image yet, start doing it now. It's big.
 * 2) * http://download.sugarlabs.org/soas/releases/soas-strawberry.iso
 * 3) In VMware, create a new VM.
 * 4) click "Continue without a disk"
 * 5) select "Create a custom virtual machine", continue
 * 6) Choose Operating System Linux and Version Other 2.6.x kernel, continue
 * 7) click "Customize Settings"
 * 8) type a name for your virtual machine (e.g., SoaS Strawberry), save
 * 9) in "Hard Disks", change disk size to 2 GB, click "Apply", go back by clicking "Show All"
 * 10) in "CDs & DVDs" choose "Use disk image" and select the soas-strawberry.iso you downloaded
 * 11) you can close the Settings window
 * 12) select your new VM and start it
 * 13) after quite a while the Sugar start screen appears. But we're going to use the Linux console.
 * 14) Hold down ctrl+alt+F2 keys (on a MacBook Fn, too), this switches to a text screen
 * 15) log in as root (no password required)
 * 16) init 3 (this stops Sugar for now to free up some memory)
 * 17) yum install anaconda (this installs the "liveinst" tool)
 * 18) liveinst
 * 19) * this is a graphical tool for installing the iso cd to a harddrive
 * 20) * we use it to copy SoaS from the iso image to the virtual disk
 * 21) * follow the instructions, re-initializing the drive "sda", partitioned as 256 MB swap and the rest ext3 mounted to '/'

This worked for me:
VMware (outdated link)

Requires 8 GB hd in 2 GB parts/ to do HD install with livinst....I use RedHat5 for OS but it reinitializes disk anyway; use custom partitions  to create ext3 /boot, /, and swap. (satellit06/25/2009)