OS: CentOS 5.6
VirtualBox Ver: 4.0-4.0.6 (RPM)
VM Name: Windows XP
Assumption:
- You have installed Development Tools and Library (yum -y groupinstall "Development Library" "Development Tools"
- You have installed kernel-devel package (yum -y install kernel-devel), please make sure the installed kernel-devel version is matched with your kernel version.
- "/etc/init.d/vboxdrv setup" #Please make sure you have installed kernel development rpms
Console Start VM:
- VBoxManage startvm 'CentOS-5.6' (optional: --type headless , this option make VM Guest run safer in background)
Console Stop VM:
- Power off -- VM guest will shutdown immediately, just like pressed power button
command: VBoxManage controlvm 'CentOS-5.6' poweroff - Save State -- System will save the VM guest State in "~/VirtualBox VMs/Windows XP/Snapshots", if you want to backup the VM guest please make sure you have backup the whole 'Windows XP' directory. In this state you won't allow change the VM guest settings.command: VBoxManage controlvm 'CentOS-5.6' savestate
- ACPI off -- System will send ACPI poweroff signal to VM guest (You must install VBox Guest Additions Package)
command: VBoxManage controlvm 'CentOS-5.6' acpipowerbutton
If you found that VM Guest can't shutdown, please make sure the x-windows/gnome is not running. (Actually "gnome-power-manager" is not running.)
OR
Make sure you VM Guest can receive shutdown signal (you can check /var/log/acpid), Run "nano /etc/acpi/events/power.conf" and change action to "action=/sbin/shutdown -h now" then try again. (The acpi config file path is used for CentOS only)
Install Virtual Box Guest Additions Package
- Please make sure you have installed all package which described in assumption section.
- Mount Guest Additions Disc ( Press Devices -> Install Guest Additions or Host + D )
- In VM guest, mount /dev/cdrom /media
- cd /media
- ./VBoxLinuxAdditions.run
- reboot (restart VM Guest)
- If it doesn't work please check the /var/log/vboxadd-install.log to find out what is the problem and run "/etc/inti.d/vboxadd setup" to reinstall the package
Remote Desktop Server Port
- Please download "VirtualBox Extension Packages" form VirtualBox website (Link)
- Add the Extension Pack to VirtualBox, "File" -> "Preferences" -> "Extensions" -> "Add Package"
- Enable Remote Display, Stop VM -> Settings -> Display -> Remote Display -> tick "enable Server", enter server port (e.g. 3391)
- Config firewall enable prot 3391