summaryrefslogtreecommitdiffstats
path: root/fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2015-10-03 17:42:28 +0200
committerJonas Bjurel <jonas.bjurel@ericsson.com>2015-10-03 17:43:44 +0200
commite94d5484ecdf8021245d961479dae07ea2f8321f (patch)
tree3b7235aa46dcb1de0c93dd68c3c874fa65ca6828 /fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh
parent563547b4a9f44090f32c0e17d040114854563760 (diff)
Removed fuel from Genesis master since fuel has moved to repo fuel.
Change-Id: If264c47c2df95201fe96dc58cf0db6f572859529 Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
Diffstat (limited to 'fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh')
-rwxr-xr-xfuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh68
1 files changed, 0 insertions, 68 deletions
diff --git a/fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh b/fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh
deleted file mode 100755
index cdd029f..0000000
--- a/fuel/prototypes/auto-deploy/examples/libvirt/tools/dump_setup.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2015 Ericsson AB and others.
-# stefan.k.berg@ericsson.com
-# jonas.bjurel@ericsson.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-topdir=$(cd $(dirname $(readlink -f $BASH_SOURCE)); cd ..; pwd)
-netdir=$topdir/conf/networks
-vmdir=$topdir/conf/vms
-vms="fuel-master controller1 compute4 compute5"
-networks="fuel1 fuel2 fuel3 fuel4"
-
-
-if [ "`whoami`" != "root" ]; then
- error_exit "You need be root to run this script"
-fi
-
-mkdir -p $netdir
-mkdir -p $vmdir
-
-if [ `ls -1 $netdir/ | wc -l` -ne 0 ]; then
- echo "There are files in $netdir already!"
- exit 1
-elif [ `ls -1 $vmdir/ | wc -l` -ne 0 ]; then
- echo "There are files in $vmdir already!"
- exit 1
-fi
-
-
-# Check that no VM is up
-for vm in $vms
-do
- if [ "`virsh domstate $vm`" == "running" ]; then
- echo "Can't dump while VM are up: $vm"
- exit 1
- fi
-done
-
-# Dump all networks in the fuell* namespace
-for net in $networks
-do
- virsh net-dumpxml $net > $netdir/$net
-done
-
-# Dump all fuel-master, compute* and controller* VMs
-for vm in $vms
-do
- virsh dumpxml $vm > $vmdir/$vm
-done
-
-# Remove all attached ISOs, generalize disk file
-for vm in $vmdir/*
-do
- sed -i '/.iso/d' $vm
- sed -i "s/<source file='.*raw'/<source file='disk.raw'/" $vm
-done
-
-# Generalize all nets
-for net in $netdir/*
-do
- sed -i '/<uuid/d' $net
- sed -i '/<mac/d' $net
-done