How to create a custom Linux image
Create a Linux image for use in Triton.
Install OS
Follow the proper instructions for installing your OS. Some important suggestions:
- Setup root to allow ssh logins (for initial login, users of the image can change after they've logged in and created other system users)
- Ensure there's no password in your image for any user
- For networking to work in your instance, you need to setup your interfaces to use DHCP
- Metadata API uses the second serial port (eg.
/dev/ttyS01
on Linux) so set permissions on this accordingly - Note that the customer assumes full responsbility for any licensing required by the OS they are creating an image of.
The vmtools are currently being presented to the OS in the form of a CDROM device. Mounting this will vary depending on your OS, but an example of this in CentOS 6 is:
testimage# mkdir /media/cdrom
testimage# mount /dev/cdrom /media/cdrom
Note: It is possible that the installation of the OS requires a reboot. If so, you will need to shutdown your instance and boot it like so:
headnode# vmadm boot 34f6d7d1-55ae-4775-a77d-b60ffc5ebff6 cdrom=/vmtools.iso,ide
Run the install-tools.sh
shell script
# cd /media/cdrom/linux
# ./install-tools.sh
testimage# /lib/smartdc/prepare-image
prepare-image
will tell you whether or not certain packages are missing. Install them if they are. After you can run prepare-image
without any errors and ideally without any warnings, you may shut down your instance.
Next steps
You can now continue with the how to create a KVM image guide.