You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.9 KiB
52 lines
1.9 KiB
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
sudo kvm \
|
|
-serial telnet:localhost:2010,server,nowait \
|
|
-monitor telnet:127.0.0.1:2011,server,nowait \
|
|
-vga none \
|
|
-runas vmariadb \
|
|
-daemonize \
|
|
-display none \
|
|
-nic tap,model=virtio,mac=52:54:00:12:34:10 \
|
|
-machine pseries,accel=kvm,kvm-type=HV \
|
|
-smp 8 \
|
|
-m 16384 \
|
|
-name vmariadb \
|
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vmariadb/boot.img \
|
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vmariadb/swap.img \
|
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vmariadb/root.img \
|
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vmariadb/home.img \
|
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vmariadb/varlibmysql.img
|
|
|
|
exit
|
|
-nographic \
|
|
-daemonize \
|
|
-display none \
|
|
-daemonize \
|
|
-runas jebba \
|
|
-cdrom /srv/devel/distros/debian/debian-mariadb-mini.iso \
|
|
-boot d \
|
|
-cdrom /srv/devel/distros/debian/debian-mariadb-mini.iso \
|
|
|
|
# IMAGE
|
|
# qemu-img create -f qcow2 /srv/KVM/mariadb/boot.img 256M
|
|
# qemu-img create -f qcow2 /srv/KVM/mariadb/swap.img 128M
|
|
# qemu-img create -f qcow2 /srv/KVM/mariadb/root.img 2G
|
|
# qemu-img create -f qcow2 /srv/KVM/mariadb/home.img 1G
|
|
# qemu-img create -f qcow2 /srv/KVM/mariadb/varlibmysql.img 2G
|
|
|
|
# Resize
|
|
# qemu-img resize foo.img +10G
|
|
# qemu-img resize /srv/KVM/mariadb/root.img +10G
|
|
# qemu-img resize /srv/KVM/mariadb/home.img +50G
|
|
|
|
# to use the kvm_pr.ko kernel module.
|
|
# qemu-system-ppc64 -M pseries,accel=kvm,kvm-type=PR
|
|
# to use kvm_hv.ko instead.
|
|
# qemu-system-ppc64 -M pseries,accel=kvm,kvm-type=HV
|
|
|
|
#qemu-system-ppc64le \
|
|
# -net user,hostfwd=tcp:192.168.110.22:80-:80,hostfwd=tcp:192.168.110.22:443-:443,hostfwd=tcp:192.168.110.22:28208-:22 \
|