summaryrefslogtreecommitdiffstats
path: root/kvm-wrapper.sh
diff options
context:
space:
mode:
authorbencoh <bencoh@19625182-23af-4830-9084-f181c60b83b7>2010-07-16 09:06:45 +0000
committerbencoh <bencoh@19625182-23af-4830-9084-f181c60b83b7>2010-07-16 09:06:45 +0000
commit25f3822d3aa4467d04a35f029897798c3d917b8e (patch)
tree6730fa451ef472367eb1717271dc41a50e70539e /kvm-wrapper.sh
parent8acc51945a16e1d5e574f176ca9fc63f01a5cf4b (diff)
Cleaning: lvm var names, boot images location, arch.
git-svn-id: https://svn.notk.org/bencoh/kvm-wrapper/@23 19625182-23af-4830-9084-f181c60b83b7
Diffstat (limited to 'kvm-wrapper.sh')
-rwxr-xr-xkvm-wrapper.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/kvm-wrapper.sh b/kvm-wrapper.sh
index 23d425d..0d58e25 100755
--- a/kvm-wrapper.sh
+++ b/kvm-wrapper.sh
@@ -191,7 +191,7 @@ function lvm_create_disk ()
test_file "$VM_DESCRIPTOR" || fail_exit "Couldn't open VM $VM_NAME descriptor :\n$VM_DESCRIPTOR"
source "$VM_DESCRIPTOR"
- eval $LVM_LVCREATE_BIN --name ${LV_NAME:-$VM_NAME} --size $LV_SIZE $VG_NAME
+ eval $LVM_LVCREATE_BIN --name ${LVM_LV_NAME:-"vm.$VM_NAME"} --size $LVM_LV_SIZE $LVM_VG_NAME
}
@@ -282,6 +282,7 @@ function kvm_start_vm ()
check_create_dir "$PID_DIR"
check_create_dir "$MONITOR_DIR"
check_create_dir "$SERIAL_DIR"
+ check_create_dir "$BOOT_IMAGES_DIR"
test_file "$VM_DESCRIPTOR" || fail_exit "Couldn't open VM $VM_NAME descriptor :\n$VM_DESCRIPTOR"
source "$VM_DESCRIPTOR"
@@ -540,10 +541,10 @@ function kvm_bootstrap_vm ()
local CLEANUP=( )
-
set +e
trap cleanup EXIT
+ require_exec "kpartx"
VM_NAME="$1"
VM_DESCRIPTOR="$VM_DIR/$VM_NAME-vm"