Inhaltsverzeichnis

Virtualisierung (KVM)

Programme

virt-manager GUI zum Verwalten von KVM-basierten VMs
virsh CLI-Manager für KVM-VMs
gnome-boxes Noch eine GUI für KVM-VMs, aber einfacher zu bedienen

virt-install

virt-install –prompt führt einen durch die Erstellung einer VM.

Windows

virt-install \
   --name=guest-name \
   --os-type=windows \
   --network network=default \
   --disk path=path-to-disk,size=disk-size \
   --cdrom=path-to-install-disk \
   --graphics spice --ram=1024
All image files are stored in /var/lib/libvirt/images/ by default. Other directory locations for file-based images are possible, but may require SELinux configuration.

[Quelle: Red Hat – using virt-install to create a Windows guest]

Netzwerk

Bridge zum internen Netzwerk

/etc/network/interfaces
# The primary network interface
auto eno1
  iface eno1 inet manual

auto br0
  iface br0 inet dhcp
  bridge_ports eno1

anschließend: systemctl restart networking

Windows-Gast

Performance mit virtio-Treibern ist weitaus höher, siehe auch:

Fehlerbehebung

Failed to initialize a valid firewall backend

Install and start ebtables and dnsmasq. Restart libvirtd afterwards.

INACCESSIBLE_BOOT_DEVICE after virtio

If this error occurs after you set the boot drive to virtio, you should do the following:

  1. bcdedit /set "{current}" safeboot minimal
  2. change the boot device type to virtio.
  3. boot the VM. It will enter in safe mode.
    1. all boot-start drivers will be enabled and loaded, including the virtio driver. Since there is now a miniport installed to use it, the kernel will make it part of the drivers that are to be loaded on boot and not disable it again.
  4. in the booted VM reset the bcdedit settings to allow the machine to boot into the normal mode:
    bcdedit /deletevalue "{current}" safeboot

option 2

If that doesn't work, add a virtio device, boot, install the virtio drivers, shutdown, remove the virtio disk, change IDE boot disk to virtio.