For every Linux distribution I have created an empty Oracle Linux image, containing all packages and kernel settings to quickly install Oracle Software.
Re-using this image needs some modifications to hostname, naming etc. This blog entry is mainly for me not to forget something.
1. Import Oracle Linux VM.
2. Update packages
# yum update
Afertwards reboot to start with updated kernel.
# reboot
3. Upgrade VBox guest additions
4. Identify Oracle Linux Distribution
# cat /etc/issue.net
5. Change Hostname
a) Change Hostname in /etc/sysconfig/network
b) Change Hostname in /etc/hosts
6. Changefixed IP address
a) change in Menue -> Preferences -> Network Connections
b) Change in /etc/hosts
7. Verify all changes during startup
# reboot
Hit the esc- button during startup to see detailed startup information.
Verify that all services are ok.
8. Shrink VBox
Finally it is good to shrink the image before exporting.
See: http://fmw-deutsch.blogspot.de/2013/10/vbox-images-schrumpfen.html
# dd if=/dev/zero of=zero.file
When the comand has finished, delete the file and shutdown the VM:
# rm zero.file
# poweroff
Navigat in a terminal to the *vdi file. Now shrink the file:
VBoxManage modifyhd *.vdi --compact
9. Export the VM. Done.
(Without shrinking my image size was 2.47GB, only 1.58GB after shrinking!)
Keine Kommentare:
Kommentar veröffentlichen