Skip to main content

Posts

Showing posts from October, 2024

Automate VLAN tagging on KVM using Ansible

 This blogpost will provide details and steps for  automating VLAN-tagged bridge setup on a KVM host using Ansible , and then optionally connect it to OLVM if needed. Use Ansible to: Create a VLAN sub-interface on a physical NIC. Create a Linux bridge attached to that VLAN interface. Ensure the bridge is ready to be used by VMs or OLVM. Prerequisites Ansible installed on a control node. SSH access to the KVM host(s). nmcli or network role availability (for Red Hat-based distros). Ansible Playbook Example Directory Structure: vlan-bridge-setup/ ├── inventory └── vlan_bridge.yml inventory: [kvmhosts] 192.168.125.100 ansible_user=root vlan_bridge.yml: - name: Configure VLAN tagged bridge on KVM host   hosts: kvmhosts   become: yes   tasks:     - name: Create VLAN interface eth0.100       nmcli:         conn_name: vlan100         ifname: eth0         type: vla...

OLVM KVM VLAN Tagging Command Line

In this blogpost we will see practical libvirt XML network definition and Linux bridge configuration with VLAN tagging in a KVM environment. <network> <name>vlan100-net</name> <forward mode='bridge'/> <bridge name='br0.100' /> <virtualport type='openvswitch'/> </network> or using the tag (if attaching to a base bridge and tagging per guest): <interface type='bridge'> <source bridge='br0'/> <vlan> <tag id='100'/> </vlan> <model type='virtio'/> </interface> In this setup: Traffic is tagged with VLAN ID 100. The VM connects to br0, and libvirt applies the tag. Linux Bridge Configuration with VLAN Sub-interface (Manual or via nmcli) : # Create VLAN sub-interface ip link add link eth0 name eth0.100 type vlan id 100 ip link set eth0.100 up # Create bridge and attach VLAN interface ip link add name br100 type bridg...

OLVM, KVM and VLAN tagging

 Introduction: OLVM (Oracle Linux Virtualization Manager) is a server virtualization management platform based on oVirt . It allows administrators to manage virtual machines, storage, and networking. VLAN tagging is a networking technique used to segregate network traffic using 802.1Q tags. Understanding VLAN Tagging in OLVM When integrating VLANs in OLVM, the goal is to allow different virtual machines (VMs) or networks to coexist on the same physical interface, logically separated using VLAN IDs. Key Concepts Tagged VLAN : The network traffic carries a VLAN ID (802.1Q tag). Useful when a single physical NIC handles traffic for multiple VLANs. Untagged VLAN : Default VLAN on a port that doesn’t tag outgoing traffic. Logical Networks : In OLVM, a logical network is associated with a VLAN and mapped to a physical NIC or a bridge. Steps to Configure VLAN Tagging in OLVM 1. Create Logical Networks Go to the OLVM Admin Portal : Navigate to Networks > Networks ta...

Deploying Oracle Solaris ZFS on Oracle Linux 9 – Clarification and Practical Options

 In this blogpost its important to clarify a common point of confusion: ZFS as implemented in Oracle Solaris is not directly available on Oracle Linux . Oracle’s version of ZFS— ZFS on Solaris (Solaris ZFS) —is tightly integrated with the Solaris kernel and is proprietary. Oracle Linux, on the other hand, is based on the Red Hat ecosystem and uses the Unbreakable Enterprise Kernel (UEK) , which does not include Oracle’s Solaris ZFS . However, you can deploy a version of ZFS on Oracle Linux 9 using the OpenZFS project, which is the open-source continuation of ZFS development. Enable Required Repositories: Oracle Linux does not include OpenZFS by default. Use the EPEL repository or build from source, but the cleanest method is usually via kmods or DKMS packages . sudo dnf install -y epel-release Install OpenZFS You can build from source or install from the OpenZFS packages . A third-party repository such as ZFS-on-Linux or a compiled RPM may be available. dnf install -y https://...