Difference between revisions of "VirtualBox/Preparing a disk image"
Jump to navigation
Jump to search
(New page: Instructions for preparing a VirtualBox disk image from a SoaS iso image file. :(Taken from Dave Bauer's posting at http://schools.sugarlabs.org/mod/forum/discuss.php?d=27.) # Create a ne...) |
(No difference)
|
Revision as of 22:22, 19 February 2009
Instructions for preparing a VirtualBox disk image from a SoaS iso image file.
- (Taken from Dave Bauer's posting at http://schools.sugarlabs.org/mod/forum/discuss.php?d=27.)
- Create a new VM.
- Choose Linux->Fedora
- Choose 256MB
- Create a new disk image, 2GB
- Finish.
- Download the lastest SoaS, http://download.sugarlabs.org/soas/snapshots/1/?C=M;O=D, for Fedora10.
- Mount SoaS ISO as a CD-ROM in the newly created VM.
- Change Network Adapter to Intel Pro/1000 MT Desktop (82540EM)
- recommended by VirtualBox for modern hosts -- Default of PCnet-FAST III (Am79C973) also worked on Ubuntu 8.10 and Vista hosts.
- Select Attached to: Host Interface -- allows local networking for SSH connections to probe the file system.
- Boot VM
- Type you name and startup Sugar.
- Open Terminal.
- su -
- parted /dev/sda
- mklabel msdos -- make partition table
- makepartfs mkpartfs primary ext2 0 2048
- toggle 1 boot
- quit
- /mnt/live/LiveOS/livecd-iso-to-disk --noverify --overlay-size-mb 256 /dev/sr0 /dev/sda1
- shutdown -h now
- Unmount CDROM in Vbox config
- Boot VM
- Open Terminal
- su -
- yum install dkms gcc make binutils glibc-devel glibc-headers kernel-headers kernel-devel
- go to VirtualBox Devices Menu->Install Guest Additions
- 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
- nano /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