Can a VM within xcp-ng have 2 VIFs each on a separate VLAN?

This might totally be a dumb question since I’m no expert on networking. This is more an experiment than anything.

Within my VM’s declared within XcpNG I’ve defined to network PIFs – each on a separate network 10.0.1.0 and 10.0.40.0. The 40 network is represents a tagged VLAN network. When both networks are active, I’ll notice when connected to each VM over an ssh connection, the connection will work ok for a while and then within 30 seconds to 5 minutes the connection will “lock up” and Ill have to restart terminal session. Is there anything I’m not configuring right to make this happen?

My guess is that your system has two ways back to your VM and it’s flapping between them breaking SSH.

Yea I figured as such – what’s best method for example to give xcp-ng – the hypervisor itself two network addresses?

Only put a gateway attached to an interface that needs it