Xen Virtual Server Configuration File¶
This action hook allows to make custom changes to a Xen virtual server configuration file. The action hook is run directly after SolusVM writes or rewrites the configuration file for a virtual server.
Any action hooks should be placed in the file
/home/xen/vm[ID]/hooks/hooks_config.sh
Here is an example hook that removes the vif line from the a configuration file and replaces it with a custom vif line:
#!/bin/sh
grep -Ev 'vif' /home/xen/vm101/vm101.cfg >
/home/xen/vm101/vm101.cfg.tmp
mv /home/xen/vm101/vm101.cfg.tmp /home/xen/vm101/vm101.cfg
echo "vif = ['ip=123.123.123.123, vifname=vifvm101.0,
mac=00:16:3e:95:a1:b3, rate=128KB/s']"