We use
SolusVM for our clients to manage their
VPS servers. Since we have multiple IP subnets we have Xen vlan'd at the Dom0 which I have documented on
here before. The problem is that Solus removes the bridge info from the cfg file on reboots and system rebuilds. We opened a ticket with Solus to have a new feature added for vlans, they gave us a short term
solution.
So I created a hook_config.sh file that handles the following.
cd /home/xen/vm145/hooks/
vi hook_config.sh
#!/bin/bash
perl -p -i.bak -e 's#KB/s#KB/s, bridge=eth0.3#g' /home/xen/vm145/vm145.cfg
do a chmod 755 on the hook_config.sh file
this file does a search/replace of KB/s which is part of the vif
vif = ['ip=74.xxx.xxx.xxx, vifname=vifvm145.0, mac=00:16:3e:30:52:d3, rate=1280KB/s']
And then replaces it with the bridge info
vif = ['ip=74.xxx.xxx.xxx, vifname=vifvm145.0, mac=00:16:3e:30:52:d3, rate=1280KB/s, bridge=eth0.3']
Now if the client does anything in their web control panel it will always work right.
My next project is to have this file get created automaticly on creation of a new VPS server.