Difference between revisions of "VMware/Preparing a disk image"
(I tried again using the SoaS strawberry release today, but it did do not work either) |
m |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
:(Adapted from [[VirtualBox/Preparing a disk image]]) | :(Adapted from [[VirtualBox/Preparing a disk image]]) | ||
'''These instructions only work up to a point, see below''' | '''These instructions only work up to a point, see below''' | ||
− | |||
# Create a new VM. | # Create a new VM. | ||
Line 128: | Line 127: | ||
#* follow the instructions, re-initializing the drive "sda", partitioned as 256 MB swap and the rest ext3 mounted to '/' | #* follow the instructions, re-initializing the drive "sda", partitioned as 256 MB swap and the rest ext3 mounted to '/' | ||
'''and then the liveinst app just freezes''' :( so no luck again | '''and then the liveinst app just freezes''' :( so no luck again | ||
+ | |||
+ | == This worked for me:== | ||
+ | [[VMware#Soas-Strawberry.iso_installed_to_VM_Hard_Disk]] (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) |
Latest revision as of 16:32, 22 January 2012
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
- Create a new VM.
- click "Continue without a disk"
- select "Create a custom virtual machine", continue
- Choose Operating System "Linux" and Version "Other 2.6.x kernel", continue
- click "Customize Settings"
- type a name for your virtual machine (e.g., "SoaS"), save
- in "Hard Disks", change to 1 GB, click "Apply", click "Show All"
- in "CDs & DVDs" choose "Use disk image" and select the SoaS iso you downloaded
- * http://download.sugarlabs.org/soas/snapshots/2/?C=M;O=D, for Fedora-11-beta.
- you can close the Settings window.
- select your new VM and start it
- Sugar starts, type your name and select a buddy color.
- Open Terminal.
- su -
- parted /dev/sda
- *mklabel msdos -- make partition table
- *mkpartfs primary ext2 0 1024
- *toggle 1 boot
- *quit
- umount /dev/sda1 -- Soas2-200905241902.iso auto mounts the disk, so unmount it for the next script
- /mnt/live/LiveOS/livecd-iso-to-disk --overlay-size-mb 300 --home-size-mb 160 --unencrypted-home --delete-home /dev/sr0 /dev/sda1
- the --overlay-size-mb NNN option creates space for persistence of changes on the disk; otherwise, a liveOS disk is read-only.
- 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.)
- 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).
- 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.
- 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
- poweroff
- if it warns you about the CD being lock, click "yes"
- in the Settings for the VM, under "CDs & DVDs" disable the "Connected" checkbox
- start VM again
at this point my VM hung. stuff below not adapted yet
- Open Terminal
- su -
- yum install dkms gcc make ppl binutils glibc-devel glibc-headers kernel-headers kernel-devel
- go to VMWare menu->Virtual Machine->Install VMWare Tools
- mkdir /mnt/cdrom
- mount /dev/sr0 /mnt/cdrom
- cd /mnt/cdrom
- ./VBoxLinuxAdditions-x86.run
- (This stalled on two trials; had to reboot and restart.)
- If upgrading from one VirtualBox version to another, start with fresh virtual disks and machines built with the new versions to avoid breakage.
- reboot
- Edit /etc/X11/xorg.conf to match the following section: (This is for 1200x900 (XO) and other resolutions.)
# Default xorg.conf for Xorg 1.5+ without PCI_TXT_IDS_PATH enabled. # # This file was created by VirtualBox Additions installer as it # was unable to find any existing configuration file for X. Section "Device" Identifier "VirtualBox Video Card" Driver "vboxvideo" EndSection # # From example in section 4.3.2 of the VirtualBox Help manual: # 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
Finally,
- Open Terminal
- Terminal
- rm -rf ~/.sugar (if distributing image)
- su -
- shutdown -h now
- 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:
- From host command line (Windows cmd, or Linux terminal) See VirtualBox Help section 8.14.
- VBoxManage clonehd <uuid>|<filename> <outputfile> [-format VDI|VMDK|VHD|RAW|<other>] [-remember]
- 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:
- in Terminal,
- su -
- system-config-firewall
- close the startup warning dialog
- check mark the SSH service
- click the apply action button, approve change
- File>Quit
- pico /etc/ssh/sshd_config
- [add] PermitEmptyPasswords yes
- ^O (WriteOut), <Enter> on File Name to Write: /etc/ssh/sshd_config , ^X (Exit)
- chkconfig --level 345 sshd on
- service sshd start
I tried again using the SoaS strawberry release today, but it did do not work either, see below
- if you have not downloaded a SoaS iso image yet, start doing it now. It's big.
- In VMware, create a new VM.
- click "Continue without a disk"
- select "Create a custom virtual machine", continue
- Choose Operating System Linux and Version Other 2.6.x kernel, continue
- click "Customize Settings"
- type a name for your virtual machine (e.g., SoaS Strawberry), save
- in "Hard Disks", change disk size to 2 GB, click "Apply", go back by clicking "Show All"
- in "CDs & DVDs" choose "Use disk image" and select the soas-strawberry.iso you downloaded
- you can close the Settings window
- select your new VM and start it
- after quite a while the Sugar start screen appears. But we're going to use the Linux console.
- Hold down ctrl+alt+F2 keys (on a MacBook Fn, too), this switches to a text screen
- log in as root (no password required)
- init 3 (this stops Sugar for now to free up some memory)
- yum install anaconda (this installs the "liveinst" tool)
- liveinst
- this is a graphical tool for installing the iso cd to a harddrive
- we use it to copy SoaS from the iso image to the virtual disk
- follow the instructions, re-initializing the drive "sda", partitioned as 256 MB swap and the rest ext3 mounted to '/'
and then the liveinst app just freezes :( so no luck again
This worked for me:
VMware#Soas-Strawberry.iso_installed_to_VM_Hard_Disk (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)