From 8408f433e997ed7eccbafd5fe847da8bce2704b6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 19 Nov 2012 17:27:35 +0100 Subject: [PATCH] remove type from here - goes into cdist-nico repo Signed-off-by: Nico Schottelius --- cdist/conf/type/__nico_kvm_vm/README | 10 --- cdist/conf/type/__nico_kvm_vm/manifest | 72 ------------------- .../type/__nico_kvm_vm/parameter/optional | 4 -- .../type/__nico_kvm_vm/parameter/required | 2 - 4 files changed, 88 deletions(-) delete mode 100644 cdist/conf/type/__nico_kvm_vm/README delete mode 100644 cdist/conf/type/__nico_kvm_vm/manifest delete mode 100644 cdist/conf/type/__nico_kvm_vm/parameter/optional delete mode 100644 cdist/conf/type/__nico_kvm_vm/parameter/required diff --git a/cdist/conf/type/__nico_kvm_vm/README b/cdist/conf/type/__nico_kvm_vm/README deleted file mode 100644 index 9752aad2..00000000 --- a/cdist/conf/type/__nico_kvm_vm/README +++ /dev/null @@ -1,10 +0,0 @@ -To be executed on the Xen Host. -Using "xe" tool from Citrix Xen. - -Todo: - - - Setup DNS -> bind - - via puppet - - move away from puppet to cdist (intrusive) - - Boot VM - - Kickstart diff --git a/cdist/conf/type/__nico_kvm_vm/manifest b/cdist/conf/type/__nico_kvm_vm/manifest deleted file mode 100644 index 3e5df044..00000000 --- a/cdist/conf/type/__nico_kvm_vm/manifest +++ /dev/null @@ -1,72 +0,0 @@ -################################################################################ -# Default VM parameters -# -cores=4 -memory=$((8*1024*1024*1024)) -system_disk_size=$((50*1024*1024*1024)) - -[ -f "$__object/parameter/memory" ] && memory="$(cat "$__object/parameter/memory")" -[ -f "$__object/parameter/cores" ] && cores="$(cat "$__object/parameter/cores")" -[ -f "$__object/parameter/system-disk-size" ] && system_disk_size="$(cat "$__object/parameter/system-disk-size")" - -# Convert memory to MiB (kvm/qemu requirement) -memory_mebibytes=$(($memory/(1024*1024))) - -################################################################################ -# Required VM parameters -# -nic_pz="$(cat "$__object/parameter/nic-pz")" -nic_fz="$(cat "$__object/parameter/nic-fz")" -vm=$__object_id - -basedir=/opt/local.ch/sys/kvm/vm/$vm -system_disk=$basedir/system-disk -start_on_boot=$basedir/start-on-boot -vnc_socket=unix:$basedir/vnc -pidfile=$basedir/pid -monitor=$basedir/monitor - -mkdir -p "$__object/files" -start_file_source=$__object/files/start -start_file_destination=$basedir/start - -#Base VM directory -__directory $basedir --parents yes \ - --owner root --group root - -cat << eof > "$start_file_source" -#!/bin/sh -# Generated shell script - do not modify -# - -/usr/libexec/qemu-kvm \\ - -name $vm \\ - -enable-kvm \\ - -m $memory_mebibytes \\ - -drive file=${system_disk},if=virtio \\ - -vnc $vnc_socket \\ - -cpu host \\ - -boot order=nc \\ - -pidfile "$pidfile" \\ - -monitor "unix:$monitor,server,nowait" \\ - -net nic,macaddr=$nic_pz,model=virtio,vlan=200 \\ - -net tap,script=/opt/local.ch/sys/kvm/bin/ifup-pz,downscript=/opt/local.ch/sys/kvm/bin/ifdown,vlan=200 \\ - -net nic,macaddr=$nic_fz,model=virtio,vlan=300 \\ - -net tap,script=/opt/local.ch/sys/kvm/bin/ifup-fz,downscript=/opt/local.ch/sys/kvm/bin/ifdown,vlan=300 \\ - -smp $cores -eof - -require="__directory/$basedir" __file $start_file_destination \ - --source $start_file_source --mode 0755 --owner root --group root - -require="__directory/$basedir" __qemu_img "$system_disk" \ - --size "$system_disk_size" - -# Normally, create a flag to start a VM on boot (if not -# explicitly told we should not) -if [ ! -f "$__object/parameter/do-not-start-on-boot" ]; then - require="__directory/$basedir" __file "$start_on_boot" \ - --mode 0600 --owner root --group root -else - __file "$start_on_boot" --state absent -fi diff --git a/cdist/conf/type/__nico_kvm_vm/parameter/optional b/cdist/conf/type/__nico_kvm_vm/parameter/optional deleted file mode 100644 index 1b05d9fb..00000000 --- a/cdist/conf/type/__nico_kvm_vm/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -cores -memory -system-disk-size -do-not-start-on-boot diff --git a/cdist/conf/type/__nico_kvm_vm/parameter/required b/cdist/conf/type/__nico_kvm_vm/parameter/required deleted file mode 100644 index 01161205..00000000 --- a/cdist/conf/type/__nico_kvm_vm/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -nic-pz -nic-fz