chuleta_kvm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| chuleta_kvm [2018/03/21 10:58] – [Modos de red] etfiat | chuleta_kvm [2023/03/17 17:00] (current) – [Modos de red] etfiat | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== KVM ===== | ===== KVM ===== | ||
| + | ==== Crear imagen ==== | ||
| + | < | ||
| + | qemu-img create -f qcow2 image.img 10G | ||
| + | </ | ||
| + | ==== Get images info ==== | ||
| + | < | ||
| + | qemu-img info / | ||
| + | </ | ||
| + | ==== Convert image from qcow2 to raw ==== | ||
| + | < | ||
| + | qemu-img convert -f qcow1 -O raw / | ||
| + | qemu-img convert -f vpc -O qcow2 | ||
| + | </ | ||
| + | ==== Snapshots ==== | ||
| + | < | ||
| + | qemu-img create -f qcow2 -F qcow2 -b win10.qcow2 win10_UOC_DB.img | ||
| + | </ | ||
| - | === KVM con I/O iscsi paravirtualizado soporte trim optimizados ceros=== | + | === KVM con I/O iscsi paravirtualizado soporte trim optimizados ceros y teclado español=== |
| < | < | ||
| - | qemu-system-x86_64 -enable-kvm -m 4000 -device virtio-scsi-pci, | + | qemu-system-x86_64 -enable-kvm -m 4000 -device virtio-scsi-pci, |
| </ | </ | ||
| Line 38: | Line 55: | ||
| ==== Ubuntu + KVM + VNC ==== | ==== Ubuntu + KVM + VNC ==== | ||
| * El arranque correcto con vnc requiere quitar de la linea boot la opción " | * El arranque correcto con vnc requiere quitar de la linea boot la opción " | ||
| + | |||
| + | ==== KVM con BIOS uefi ==== | ||
| + | |||
| + | < | ||
| + | kvm -bios / | ||
| + | </ | ||
| + | |||
| + | ==== KVM con BIOS uefi nueva sintaxis ==== | ||
| + | |||
| + | < | ||
| + | cp / | ||
| + | kvm -drive if=pflash, | ||
| + | | ||
| + | </ | ||
| ==== Modos de red ==== | ==== Modos de red ==== | ||
| - | + info http:// | + | * + info http:// |
| === User Networking === | === User Networking === | ||
| + | |||
| + | == Redirección de puertos == | ||
| + | < | ||
| + | qemu-system-x86_64 | ||
| + | </ | ||
| + | |||
| **Cuando usar: | **Cuando usar: | ||
| * Un modo simple para que la máquina virtual tenga acceso al host, a internet y a recursos de la red local | * Un modo simple para que la máquina virtual tenga acceso al host, a internet y a recursos de la red local | ||
| Line 150: | Line 188: | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ==== Pasar dispositivo usb a la VM ==== | ||
| + | |||
| + | < | ||
| + | |||
| + | sudo kvm -m 4000 -cdrom Descargas/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Bridges en interfaces con vlan ==== | ||
| + | |||
| + | < | ||
| + | |||
| + | # This file describes the network interfaces available on your system | ||
| + | # and how to activate them. For more information, | ||
| + | |||
| + | source / | ||
| + | |||
| + | # The loopback network interface | ||
| + | auto lo | ||
| + | iface lo inet loopback | ||
| + | |||
| + | # The primary network interface | ||
| + | vlan-raw-device eno1 | ||
| + | |||
| + | #auto eno1.516 | ||
| + | #iface eno1.516 inet static | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | auto eno1.516 | ||
| + | iface eno1.516 inet manual | ||
| + | |||
| + | auto brblades | ||
| + | iface brblades inet static | ||
| + | address 10.0.4.207 | ||
| + | netmask 255.255.255.0 | ||
| + | gateway 10.0.4.254 | ||
| + | |||
| + | bridge_ports eno1.516 | ||
| + | bridge_stp off | ||
| + | bridge_fd 0 | ||
| + | bridgeç_maxwait 0 | ||
| + | |||
| + | |||
| + | |||
| + | #auto eno1.1105 | ||
| + | #iface eno1.1105 inet static | ||
| + | # | ||
| + | # | ||
| + | |||
| + | auto eno1.1105 | ||
| + | iface eno1.1105 inet manual | ||
| + | |||
| + | auto brceph | ||
| + | iface brceph inet static | ||
| + | address 172.16.200.101 | ||
| + | netmask 255.255.255.0 | ||
| + | |||
| + | bridge_ports eno1.1105 | ||
| + | bridge_stp off | ||
| + | bridge_fd 0 | ||
| + | bridge_maxwait 0 | ||
| + | |||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Bridged network sintaxis nueva ==== | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | qemu-system-x86_64 -enable-kvm | ||
| + | -m 4096 frontal.img | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | |||
| + | $ cat / | ||
| + | # | ||
| + | # | ||
| + | # Script called by kvm on tap interface creation | ||
| + | # | ||
| + | KVM_BR=`basename $0 -ifup | sed -e ' | ||
| + | KVM_BRIDGE=${KVM_BR: | ||
| + | echo " | ||
| + | echo " | ||
| + | brctl addif " | ||
| + | ip link set " | ||
| + | |||
| + | |||
| + | $ cat / | ||
| + | # | ||
| + | # | ||
| + | # Script called by kvm on tap interface deletion | ||
| + | # | ||
| + | KVM_BR=`basename $0 -ifdown|sed -e ' | ||
| + | KVM_BRIDGE=${KVM_BR: | ||
| + | echo " | ||
| + | echo " | ||
| + | ip link set " | ||
| + | brctl delif " | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
chuleta_kvm.1521629924.txt.gz · Last modified: by etfiat
