sorry I thought you want to add iptables rules
:facepalm

If you want to add a route, you can add a line to CsAddress.py
https://github.com/apache/cloudstack/blob/main/systemvm/debian/opt/cloud/bin/cs/CsAddress.py#L710C9-L710C27
for example
route.set_route("10.x.x.x/30 via x.y.z.1 dev eth2")


-Wei






On Mon, Jun 16, 2025 at 3:49 PM Chi vediamo <tatay...@gmail.com> wrote:

> Hello Wei,
>
>
> Q1: just tested adding the /usr/sbin/route add -net 10.x.x.x gw x.y.x.1
> netmask 255.255.255.252 dev eth2
> rebooted the systemVM and did not work
>
> Tata Y.
>
>
>
> > On Jun 16, 2025, at 9:16 AM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
> >
> > Hi,
> >
> > You can create another physical network with Guest traffic type, with the
> > same isolation method (VLAN) and the same network label (cloubrX of
> public).
> > then you create a shared network on the new physical network
> > refer to
> >
> https://docs.cloudstack.apache.org/en/latest/adminguide/networking/advanced_zone_config.html
> >
> > a bit complex, but feasible
> >
> >
> > -Wei
> >
> >
> > On Mon, Jun 16, 2025 at 2:33 PM Chi vediamo <tatay...@gmail.com> wrote:
> >
> >> Thank you Wei,
> >>
> >> Q1, Thank you, checking that now.
> >>
> >> Q2, I have Guest and Public on Different cloudbrX and VXLAN for guest,
> and
> >> VLAN for public.
> >> How can I provide the same functionality to a regular VM as a SystemVM -
> >> with Guest Virtual interface and a Public Virtual Interface ?
> >>
> >> Thank you
> >>
> >> Tata Y.
> >>
> >>> On Jun 16, 2025, at 3:04 AM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> Q1,
> >>>
> >>> If you want to change the rules in SSVM, you can add them to
> >>> systemvm/debian/etc/iptables/iptables-secstorage
> >>> No need to change systemvm template, you need to update
> >>> /usr/share/cloudstack-common/vms/cloud-scripts.tgz on all hosts
> >>>
> >>>
> >>> Q2,
> >>>
> >>> The Public IP range is only used for system vms and virtual routers.
> >>> but you can create a shared network in the same CIDR as the public IP
> >> range
> >>> if the public and guest network uses the same physical device
> (cloudbrX)
> >>> and there are some free IPs in the CIDR.
> >>>
> >>>
> >>> -Wei
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On Sat, Jun 14, 2025 at 11:49 PM Chi vediamo <tatay...@gmail.com>
> wrote:
> >>>
> >>>> Hello,
> >>>>
> >>>> Two questions:
> >>>> Q1:
> >>>> Independently of the reason. I need to have additional static routes
> on
> >>>> the system VMs. Is there a Way to add a permanent static route to the
> >>>> system VM,
> >>>> I did try several options modifying the system syste, but every single
> >>>> time the routes are whiped out after I reboot the System VM.
> >>>> I did  try /etc/sysconfig/network-scripts/route-eth2
> >>>> I also tried /etc/systemd/network/eth2.network.d/static.conf
> >>>> rc.local  nothing seems to work to add a static route on the System
> VM.
> >>>>
> >>>> Q2:
> >>>> Is there a Way to add a VM in a shared network, and add another
> >> Interface
> >>>> tied to the Public Interface VLAN? Something litke the System VM.
> >>>>
> >>>> Thank you very much
> >>>>
> >>>> Tata Y.
> >>>>
> >>>>
> >>>>
> >>
> >>
>
>

Reply via email to