-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-iso
More file actions
21 lines (17 loc) · 882 Bytes
/
run-iso
File metadata and controls
21 lines (17 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
if [ $# -eq 0 ]; then
echo "============================================================================================="
echo "Script para ejecutar ISO con QEMU y KVM (necesario tener instalados paquetes qemu y qemu-kvm)"
echo "============================================================================================="
echo "Si necesitas un disco duro virtual previo puedes crearlo con qemu-img. Por ejemplo: "
echo " qemu-img create -f qcow2 disco.img 20G"
echo
echo "Modo de uso: ";
echo " $0 ubuntu.iso"
echo " $0 ubuntu.iso disco.img "
echo " En este segundo caso pulsar F12 en el inicio para seleccionar dispositivo de arranque."
exit 1;
fi
ISO=$1;
if [ $2 ]; then DISCO="-hda $2 -boot menu=on"; fi
qemu-system-x86_64 $DISCO -enable-kvm -machine q35,accel=kvm -cdrom $ISO -m 2048 -usb -device usb-tablet