my dotz
0

Configure Feed

Select the types of activity you want to include in your feed.

Remove make-vm

-33
-33
bin/darkdepths/make-vm
··· 1 - #!/bin/bash 2 - 3 - if [[ $1 == "" || $1 == "--help" || $1 == "-h" ]]; then 4 - echo "Usage: make-vm [vm-name] [options]" 5 - echo "some options:" 6 - echo " mem=<number-in-megabytes>" 7 - echo " cpu=<cores>" 8 - echo " disk=<gbytes>" 9 - echo " env=<public|private>" 10 - exit 1 11 - fi 12 - 13 - name="$1" 14 - env="private" 15 - disk="8" # in gb 16 - mem="512" # in mb 17 - cpu="1" # in cores 18 - 19 - if [[ -e /vm/$name.xml || -e /dev/vg0/$name.disk ]]; then 20 - echo 'vm/disk already exists' 21 - exit 1 22 - fi 23 - 24 - echo "Carving $disk GB lv in /dev/vg0/$name.disk" 25 - lvcreate -n "$name.disk" --size 8G vg0 26 - 27 - echo "createing writing /vm/$name.xml" 28 - touch "/vm/$name.xml" 29 - virt-install -n $name -r 8192 \ 30 - $name $cpus $type $variant $disk $location $graphics $bus $network 31 - 32 - qemu-system-x86_64 -hda /vm/vdisk.img -m 1024 -enable-kvm -netdev user,id=user.0 -device e1000,netdev=user.0 -soundhw ac97 -no-acpi -daemonize -usb -usbdevice tablet 33 -