diff options
author | asmadeus <asmadeus@19625182-23af-4830-9084-f181c60b83b7> | 2010-07-19 15:55:52 +0000 |
---|---|---|
committer | asmadeus <asmadeus@19625182-23af-4830-9084-f181c60b83b7> | 2010-07-19 15:55:52 +0000 |
commit | 2e480e2f940e5eadb445abca0311408b2f8612df (patch) | |
tree | d5a4a4f81bde48b8328598c6d55a5f5ca5aa1c80 /kvm-wrapper.sh | |
parent | 5fe0c2efc392256b123904389b62a8c82469b286 (diff) |
swap addition for msdos partition
git-svn-id: https://svn.notk.org/bencoh/kvm-wrapper/@37 19625182-23af-4830-9084-f181c60b83b7
Diffstat (limited to 'kvm-wrapper.sh')
-rwxr-xr-x | kvm-wrapper.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kvm-wrapper.sh b/kvm-wrapper.sh index 90e7c0c..b9432eb 100755 --- a/kvm-wrapper.sh +++ b/kvm-wrapper.sh @@ -214,6 +214,8 @@ function lvm_create_disk () kvm_init_env "$1" LVM_LV_NAME="${LVM_LV_NAME:-"vm.$VM_NAME"}" + local LVM_LV_SIZE=$(($ROOT_SIZE+${SWAP_SIZE:-0})) + eval "$LVM_LVCREATE_BIN --name $LVM_LV_NAME --size $LVM_LV_SIZE $LVM_VG_NAME" desc_update_setting "KVM_HDA" "/dev/$LVM_VG_NAME/$LVM_LV_NAME" } @@ -627,7 +629,7 @@ function kvm_build_vm () while [[ "$#" -gt 1 ]]; do case "$1" in "-s"|"--size") - USER_OPTIONS+=("LVM_LV_SIZE") + USER_OPTIONS+=("ROOT_SIZE") USER_OPTIONS+=("$2") shift; shift ;; |