Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • CLI
  • Multimedia
  • Plugins
  • Windows
  • Contact

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN
  • Incus

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

Create IPfire DomU (firewall)

Check for latest IPFire version
http://downloads.ipfire.org/

<?php
$URL="https://raw.githubusercontent.com/panticz/xen/master/domains/ipfire.sh";

echo "wget $URL -O - | bash -";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

# OPTIONAL
sed -i 's|phy:/dev/vg0/fw-|file:/root/ipfire-|g' /etc/xen/fw
sed -i 's|,xvda|.img,xvda|g' /etc/xen/fw
# configure ipfire in terminal
# webinterface

https://YOUR_DOMU_IP:444

# Links

http://wiki.ipfire.org/de/addons/virtualisation/howto/debian_wheezy_xen_4.1?&#debian_wheezy_mit_xen_41_als_dom0
http://wiki.ipfire.org/de/addons/virtualisation/howto/debian_als_dom0_xen#xen_und_kernel_installieren
http://wiki.ipfire.org/de/addons/virtualisation/howto/debian_xen_4.x

Puppet: Xen module

create module structure

mkdir -p /etc/puppet/modules/xen/manifests
mkdir -p /etc/puppet/modules/xen/files

download module definiction
<?php
$URL="https://raw.githubusercontent.com/panticz/puppet/master/modules/xen/init.pp";

echo "wget -q $URL -O /etc/puppet/modules/xen/manifests/init.pp";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

add include to your client in /etc/puppet/manifests/site.pp
node "client1.local" inherits default {
...
include nullmailer
include xen
...
}

Links
http://www.panticz.de/install-xen

Auto install Xen Dom0 server with RAID1 and LVM2 under Debian Squezze

# get Debain boot files for PXE

http://www.panticz.de/Debian

# PXE net boot file

http://installit.googlecode.com/hg/preseed/debian-preseed.seed

# 1th stage

http://www.panticz.de/pxe/preseed/xen.seed

# 2th stage

http://www.panticz.de/pxe/preseed/rc.local

# 3th stage

http://www.panticz.de/pxe/preseed/late_command.txt

# configure locale (broken)

http://installit.googlecode.com/hg/scripts/fix.locale.sh

# install xen

http://code.google.com/p/installit/source/browse/install.xen.sh

Create Boot CD
http://www.panticz.de/Ubuntu_customized_preseed_NetBoot_CD

HowTo create XEN Virtual Machines (Domains)

Copy domU over network

# copy LVM image over network (run on source machine)
lvcreate --name xp-disk --size 16G vg1
dd if=/dev/vg01/xp-disk bs=16M | ssh root@TARGET_XEN_HOST 'dd of=/dev/vg1/xp-disk'
# copy XEN config file
scp /etc/xen/xp root@TARGET_XEN_HOST:/etc/xen/xp

Links
http://barkingiguana.com/2011/03/13/moving-lvm-volumes-between-hosts-without-an-intermediate-file/ - Moving LVM volumes between hosts

xen