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.
44 lines
1.4 KiB
44 lines
1.4 KiB
4 years ago
|
#!/bin/bash
|
||
|
|
||
|
set -x
|
||
|
|
||
|
sudo kvm \
|
||
4 years ago
|
-serial telnet:localhost:2026,server,nowait \
|
||
|
-monitor telnet:127.0.0.1:2027,server,nowait \
|
||
4 years ago
|
-vga none \
|
||
4 years ago
|
-runas vbtc \
|
||
4 years ago
|
-daemonize \
|
||
|
-display none \
|
||
4 years ago
|
-nic tap,model=virtio,mac=52:54:00:12:34:36 \
|
||
4 years ago
|
-machine pseries,accel=kvm,kvm-type=HV \
|
||
4 years ago
|
-smp 64 \
|
||
|
-m 32768 \
|
||
|
-name vbtc \
|
||
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vbtc/boot.img \
|
||
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vbtc/swap.img \
|
||
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vbtc/root.img \
|
||
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vbtc/home.img \
|
||
|
-drive format=qcow2,cache=writeback,discard=on,file=/srv/kvm/vbtc/srv.img
|
||
4 years ago
|
|
||
|
exit
|
||
|
|
||
|
# Install
|
||
|
# -boot d \
|
||
|
# -cdrom /srv/devel/distros/debian/debian-apache-mini.iso \
|
||
|
|
||
|
# IMAGE
|
||
4 years ago
|
# qemu-img create -f qcow2 /srv/kvm/vbtc/srv.img 500G
|
||
|
# qemu-img create -f qcow2 /srv/kvm/vbtc/boot.img 256M
|
||
|
# qemu-img create -f qcow2 /srv/kvm/vbtc/swap.img 128M
|
||
|
# qemu-img create -f qcow2 /srv/kvm/vbtc/root.img 2G
|
||
4 years ago
|
|
||
|
# Resize
|
||
|
# qemu-img resize foo.img +10G
|
||
4 years ago
|
# qemu-img resize /srv/kvm/vbtc/root.img +10G
|
||
4 years ago
|
|
||
|
# 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
|
||
|
|