For the complete documentation index, see llms.txt. This page is also available as Markdown.

Attach Multiple Ports from the Same Physical Network to a VM

Overview

When a physical network has more than one subnet, you can attach a VM to multiple subnets of that same network in a single operation, directly from the VM creation wizard. Each subnet attachment creates a separate network interface (port) on the VM.

This matters for first-boot network configuration. An operating system runs its initial network setup exactly once, when it first detects each interface. If you add extra interfaces to a running VM after creation, those interfaces miss that first-boot pass and require manual configuration inside the guest. Attaching all the ports you need at creation time ensures that every interface is configured automatically during first boot.

The same multi-port capability is available when cloning an existing VM.

This guide explains how to use this feature from both the UI and the CLI.

Prerequisites

  • A physical network with two or more subnets already created. See Physical Network for steps to create a physical network and its subnets.

  • The ports you plan to attach must not already be in use by another VM. Only unassigned ports belonging to the selected subnet are shown in the port picker.

  • (Optional) If you need a port with a specific IP address or dual-stack configuration, pre-create the port before starting the wizard. See Port and Add Multiple Dual Stack Ports to a VM.

Attach Multiple Ports Using the UI

When you create or clone a VM, the Networking step of the wizard shows one row per network connection. Each row represents one network interface that will be created on the VM.

Add a Port Row

  1. In the Networking step, locate the physical network you want to attach to.

  2. For each additional subnet you want to attach, click Add subnet. A new row appears for the same network.

  3. Each row is independent. You can configure the subnet and port for each row separately.

Configure Each Row

For each row, you can leave both fields at their defaults or narrow the selection:

  • Subnet (optional). The default is Automatic, which lets the Networking Service assign a subnet and IP address. To pin the interface to a specific subnet, expand the subnet selector. The list shows each available subnet as <CIDR> (<subnet-name>). Selecting a subnet narrows the port choices to only the ports that belong to it. If you change the subnet after selecting a port, the port selection resets.

  • Port (optional). The default is Automatic, which creates a new port on the selected subnet. To use a specific pre-existing port, expand the port selector after choosing a subnet. Only unassigned ports from that subnet are listed.

Duplicate Subnets

You can add two or more rows that reference the same subnet. The Networking Service allows this, but the wizard will display an advisory:

This warning is informational. The wizard does not block the configuration. If your guest OS is configured for source routing, you can safely ignore it.

Security Groups

Security groups you assign during the Networking step apply correctly to every port attachment, including ports on a specific subnet. To assign security groups, use the Assign Security Groups section in the wizard.

Complete the Wizard

After configuring all rows, proceed through the remaining wizard steps and click Deploy Virtual Machine. The VM starts with all the specified network interfaces already present and configured by the guest OS on first boot.

Attach Multiple Ports Using the CLI

The pcdctl server create command accepts multiple --port flags, one per interface. Pre-create the ports you need, then pass each port ID to the command:

Each --port flag maps to one network interface on the VM. All interfaces are present at first boot, so the guest OS configures them during initial startup.

To list available ports and filter by subnet, run:

To create a new port on a specific subnet before running server create:

Clone a VM with Multiple Port Attachments

When cloning a VM that already has multiple network interfaces, the Clone wizard includes the same Networking step described above. You can keep the original port configuration, change individual rows, or add new rows before cloning. The cloned VM starts with all specified interfaces configured during its first boot.

Next Steps

  • To pre-create ports with specific IP addresses or dual-stack configurations, see Port.

  • To learn about physical networks and subnets, see Physical Network.

  • To configure security groups for your VM's interfaces, see Security Group.

Last updated

Was this helpful?