Giter Site home page Giter Site logo

oplxc4pve's Introduction

oplxc4pve

Wrapper script for creating/upgrading unprivileged lxc instances from OpenWrt rootfs templates on the Proxmox VE hypervisor.

Requirements

The Proxmox VE 6.2. This script or the resulting OpenWRT instances may work on older pve versions, however it's untested.

Configuration

Please refer to the top of opct.sh.

Usage and examples

Creating a new lxc instance of OpenWRT without nic:

./opct.sh <new|ne> <New_vmid> <CT_template>

example:

create new lxc instance with vmid 101, base on an openwrt template "/tmp/openwrt-snapshot-r13212-x86-64-plain.tar.gz"

./opct.sh new 101 /tmp/openwrt-snapshot-r13212-x86-64-plain.tar.gz

Notes: The new instance does NOT contain any nic. You may need to do the network configuration later via Proxmox VE GUI or CLI. And if you need the OpenWRT instance to access certain kernel features, e.g. making tunnel connection, accessing char devices in /dev, you may have to load the related kernel modules, grant the container certain rights on host startup, or preferably via hookscript. Please see "files" directory for detail.


Upgrading a running lxc instance of OpenWRT

./opct.sh <upgrade|up> <Old_vmid> <New_vmid> <CT_template>

example:

upgrade a running instance with vmid 101, base on an openwrt template "/tmp/openwrt-snapshot-r13212-x86-64-plain.tar.gz". The resulting new instance is assigned vmid 102.

./opct.sh upgrade 101 102 /tmp/openwrt-snapshot-r13212-x86-64-plain.tar.gz


Stop the old OpenWRT lxc instance, then start the new one, effectively do the swapping. Make OpenWRT downtime as short as possible.

./opct.sh <swap|sw> <Old_vmid> <New_vmid>

example:

Swap a running old instance (vmid 101), with new one (vmid 102)

./opct.sh swap 101 102

SEE ALSO:

Manpage for Proxmox VE pct utility: https://pve.proxmox.com/pve-docs/pct.1.html

Manual: pct.conf: https://pve.proxmox.com/wiki/Manual:_pct.conf

PVE Storage: https://pve.proxmox.com/wiki/Storage

Network Configuration: https://pve.proxmox.com/wiki/Network_Configuration

Further details (bind mounts, network and more) on lxc: https://pve.proxmox.com/wiki/Linux_Container

oplxc4pve's People

Contributors

dazzywalkman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.