[SOLVED] Migrate VLAN from vSphere 8.0

AGS Cloud

New Member
Jul 30, 2024
4
0
1
France
Hello,

I recently installed a PVE Cluster with 3 nodes for testing purpose.
I actually want to migrate the VLAN from my local vSphere 8.0, I have 110 VLAN.

Someone already performed a VLAN migration to PVE from vSphere ?
Is there some best practice ?

Thank in advance for yours help.
 
I've recently done it, but "only" had 2 dozen VLAN's, so I did it manually, but it is probably automatable.
How I did it was as follows:
In Datacenter -> SDN -> Zones -> Add a VLAN-type zone, configure it to the Linux-bridge that you want your LAN traffic to be on. The name of this bridge needs to match on all your Nodes, but what this bridge then connects to (bond or direct to a device) does not matter.
Then under the VNets tab, create a net, give it a name, optionally a descroption/Alias to further know what's what, select the just created zone, and set a tag (do not set vlan aware)
Rinse and repeat the above, then finally in the SDN-tab itself, don't forget to apply.

With that I can set all VLANs, and for the untagged VLAN I select the bridge itself, in the rare cases that we need that one.

For the automating, one route you could do: The config for the SDN is saved in /etc/pve/sdn/vnets.cfg, create 1 or 2 VLAN(s) fully manually, then use some script-foo or excel-foo to fill in the rest from the text-based export of your VLAN's or your documentation.

A tip for the excel-foo:
if you have a CSV with 2 colums, ID and Description, in column C you could put something like (vmVLANs is the name of my zone, and the name of my net I did the letter V followed by the tag):
=CONCATENATE("<ENTER>vnet: V",A1,"<ENTER><TAB>zone vmVLANs<ENTER><TAB>alias ";B1;"<ENTER><TAB>tag ";A1)
Then copy/paste the resulting lines to a notepad++ or similar and replace the <ENTER> and <TAB> text with their corresponding thing, then copy all THAT into the vnet.cfg file, save, re-open the SDN-page and apply it
 
Last edited:
  • Like
Reactions: AGS Cloud
Hello,

Thank for your respond, I will try that.
vSphere permit to export VLAN to csv, I think to it's possible to automate the process.


Thank again
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!