VBoxManage createhd -filename "centos5.vdi" -size 10000 -register //created in /home/USER_NAME/.VirtualBox/HardDisks/ //note " is only necessary for file names with spaces
VBoxManage createvm -name centos5 -register //created in /home/USER_NAME/.VirtualBox/Machines/
VBoxManage modifyvm centos5 -hda centos5.vdi VBoxManage openmedium dvd ~/.VirtualBox/CentOS-5.3-i386-netinstall.iso VBoxManage modifyvm centos5 -dvd CentOS-5.3-i386-netinstall.iso VBoxManage modifyvm centos5 -memory "1024MB" -acpi on -boot1 dvd VBoxManage modifyvm centos5 -nic1 bridged -bridgeadapter1 eth1 VBoxManage modifyvm centos5 -nictype1 82540EM //gigabit! VBoxManage modifyvm centos5 -bioslogofadein off -bioslogofadeout off -biosbootmenu disabled
VBoxManage modifyvm centos5 -vrdp on VBoxManage modifyvm centos5 -vrdpport 7777 //can rdp to see "console"
VBoxManage showvminfo centos5
rdp into the "console" mode
Centos5 http://www.centos.org/modules/tinycontent/index.php?id=15/
http setup
looking for: stage2.img
www.mirrorservice.org
/sites/mirror.centos.org/5.3/os/i386/
wait 5-10 minutes... retrieving the "images/stage2.img" file (over the net!)
initialize whole hard drive
remove all partitions and create default layout - NOT
EXCEPT we don't want LogicalVolumeManager's "virtual storage"
just 1 big root plus swap
packages: base package, system tools... that's about it...
reboot (removing cd/dvd)
VBoxManage modifyvm centos5 -vram 4 //reduces from 8 MB to 4... I had to copy the MAC address...? MAC: 080027B47993
CONFIGURING RHEL/CENTOS USES THE BUILT IN TOOL setup //i'm not kidding, from here you configure networking, firewall
or manually modify
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 BOOTPROTO= IPADDR=192.168.1.59 NETMASK=255.255.255.0 BROADCAST=255.255.255.255 NETWORK=192.168.1.0 DNS1=192.168.1.30 DNS2=192.168.1.3
HWADDR=08:00:27:B4:79:93 ONBOOT=yes DHCP_HOSTNAME=madics-vm GATEWAY=192.168.1.3 TYPE=Ethernet
/etc/init.d/network restart
setup tool: authentication just md5 & shadow disable firewall (test vm on lan)
ctrl-z //to suspend current job bg //to make current job background job jobs //to see background jobs
sha1sum -c test.iso.sha1 md5sum -c test.iso.md5
VBoxManage openmedium dvd ~/.VirtualBox/CentOS-5.3-i386-LiveCD.iso VBoxManage modifyvm centos5 -dvd CentOS-5.3-i386-LiveCD.iso
VBoxManage unregistervm [vmname] -delete
VBoxManage controlvm
extif - needs 128 byte Inodes
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 32,768 3448 90% 938 6% / /dev/hd2 180,224 22040 88% 7858 18% /usr /dev/hd9var 16,384 13540 18% 167 5% /var /dev/hd3 32,768 24640 25% 48 1% /tmp /dev/hd1 16,384 15800 4% 58 2% /home /dev/lv00 4,669,440 1238596 74% 112543 10% /madics
/ 500MB
user 500MB
var
tmp 200MB
home ?
madics
swap 512MB