I have been working on creating a VyOS 1.1.8 image on Alibaba Cloud.
I have been successful in getting it working, so I will go over my methods/tricks for you guys to reference for creating an official one there.
1) Convert the vmdk virtualbox image to vhd. I found "StarWind V2V Image Converter" worked perfectly for this.
2) Alibaba places os.conf in 'aliyun_custom_image' directory you need to add to the default root parition.
The root partition is mounted in /live/image, so mkdir /live/image/aliyum_custom_image
chmod the directory 777, so the setup script can delete the os.conf afterward
3) Setup sshd to listen on port 22 (set system ssh port 22)
4) Make sure there are no ethernet interfaces (delete interfaces ethernet eth0)
If you leave anything in eth0, then the network interface Alibaba adds will end up being called eth1, despite the os.conf saying eth0
5) Place custom init scripts in /config/scripts (will attach)
alibaba-init.sh - parses the os.conf file, sets the settings, and then deletes the os.conf file
vyos-command.sh - The first script calls this script multiple times. I couldn't get the bash scripting to work right after sourcing in the script-template, so I have this simple wrapper to run vyos commands.
6) Finally, have /etc/rc.local call the alibaba-init.sh script on boot
ALIBABACONFIG=/opt/vyatta/etc/config/scripts/alibaba-init.sh
[ -x $ALIBABACONFIG ] && $ALIBABACONFIG
7) So again verify that there is nothing in config.boot for eth0, and power off the virtualbox/vmware image.
8) Upload this vhd file to a OSS box on Alibaba
9) Under "images", go to "import image". Select your OSS file, and set the type to "Customized Linux". I think it requires a 40G minimum size, but I didn't test it with others.
10) Once the image is ready, you can create an instance with it. For the bit about setting up access, click on the "Password" tab, and put in what you would like your default password to be. Even though it says the user is 'root', it will actually be setting it into the 'vyos' user. The ssh key login bit can't be configured by the initial setup, but you can always add a key afterward, of course.
That should be all.
Unfortunately my Alibaba account isn't letting me create new instances anymore for some reason, so I haven't been able to test these final versions of my scripts. In a previous version, a final reboot was required for configurations to work afterward, but I think the attached one will fix that (Thanks @syncer for that help)
I may share out my image to the public once I get it finally tested and perfect, but I'm not sure.
{F31482}
{F31481}