QEMU/x86: Difference between revisions

From Computernewb Wiki
Jump to navigation Jump to search
m (1 revision imported)
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
This page lists arguments that QEMU can use.
This page lists arguments that QEMU can use when emulating a x86 or x86_64 guest.


==Devices==
==Devices==
===CPUs===
===CPUs===
*-cpu host
**Device: '''Host CPU'''
**Maximum Windows OS: Various
**Description: If you have KVM enabled, this will use your host CPU. This is the recommended option if you have hardware virtualization and root access.


Use <kbd>-cpu [type][,...]</kbd> to use a given CPU type. Common ones are listed below.
*-cpu 486
**Device: '''Intel 80486'''
**Maximum Windows OS: Windows 2000
**Description: Intel 80486. Unrecommended for use unless you are running a DOS VM.


{| class="wikitable sortable"
*-cpu Broadwell
|+ CPU types
**Device: '''Intel Codename Broadwell'''
|-
**Maximum Windows OS:Windows 7
! Type !! OS !! Description
**Description: Intel Broadwell Microprocessor
|-

| <kbd>host</kbd> || Various || The Host CPU. If KVM is enabled, this will clone your host's CPU ID and flags to the VM.
*-cpu Broadwell-noTSX
|-
**Device: '''Intel Codename Broadwell'''
| <kbd>max</kbd> || Various || The Max CPU. If KVM is enabled, this will clone your host's CPU ID and flags, and also enable every possible subfeature.<br>However, unlike <kbd>host</kbd>, this CPU type also works with TCG, and allows emulating the max feature set TCG supports (with your QEMU version).
**Maximum Windows OS: Windows 7
|-
**Description: Intel Broadwell Microprocessor
| <kbd>kvm32</kbd> || Windows 10 || Generic KVM 32-bit CPU.

|-
*-cpu Conroe
| <kbd>kvm64</kbd> || Windows 10 || Generic KVM 64-bit CPU.
**Device: '''Intel Celeron 4x0 (Conroe/Merom Class Core 2)'''
|-
**Maximum Windows OS: Windows 7
| <kbd>qemu32</kbd> || Windows 10 || Generic KVM 32-bit CPU.
**Description: Intel Celeron
|-

| <kbd>qemu64</kbd> || Windows 10 || Generic KVM 64-bit CPU.
*-cpu Haswell
|-
**Device: '''Intel Codename Haswell'''
| <kbd>486</kbd> || Windows 2000 || Intel 80486. Not recommended for use unless you are running a DOS VM.
**Maximum Windows OS: Windows 10
|-
**Description: Intel Haswell Microprocessor
| <kbd>pentium</kbd> || Windows XP || Pentium Pro. Recommended for Windows 3.1, Windows 95, Windows NT 4.0, Windows 98, and Windows Me VMs.<br>'''Note:''' If you are running a Windows NT 3.x VM, this CPU is essential to get past the setup.

|-
*-cpu Haswell-noTSX
| <kbd>pentium2</kbd> || Windows 7 || Pentium II. This can run Windows 7 but is not recommended for anything above 2000.
**Device: '''Intel Codename Haswell'''
|-
**Maximum Windows OS: Windows 10
| <kbd>pentium3</kbd> || Windows 7 || Pentium III. This can run Windows 7 but is not recommended for anything above 2000.
**Description: Intel Haswell Microprocessor
|-

| <kbd>Broadwell</kbd> || Windows 7 || Intel Broadwell Microprocessor
*-cpu IvyBridge
|-
**Device: '''Intel Xeon E3-1200 v2'''
| <kbd>Broadwell-noTSX</kbd> || Windows 7 || Intel Broadwell Microprocessor (without Intel TSX)
**Maximum Windows OS: Windows 10
|-
**Description: Intel Xeon E3-1200 (codename Ivy Bridge)
| <kbd>Conroe</kbd> || Windows 7 || Intel Celeron 4x0 (Conroe/Merom Class Core 2) CPU

|-
*-cpu Nehalem
| <kbd>Haswell</kbd> || Windows 10 || Intel Haswell CPU
**Device: '''Intel Core i7 950 (Nehalem Class Core i7)'''
|-
**Maximum Windows OS: Windows 10
| <kbd>Haswell-noTSX</kbd> || Windows 10 || Intel Haswell CPU (without Intel TSX)
**Description: Intel Core i7 950
|-

| <kbd>IvyBridge</kbd> || Windows 10 || Intel Xeon E3-1200 v2 (codename Ivy Bridge)
*-cpu Opteron_G1
|-
**Device: '''AMD Opteron 240 (Gen 1 Class Opteron)'''
| <kbd>Nehalem</kbd> || Windows 10 || Intel Core i7 950
**Maximum Windows OS: Windows 10
|-
**Description: AMD Opteron 240
| <kbd>Opteron_G1</kbd> || Windows 10 || AMD Opteron 240

|-
*-cpu Opteron_G2
| <kbd>Opteron_G2</kbd> || Windows 10 || AMD Opteron 22xx
**Device: '''AMD Opteron 22xx (Gen 2 Class Opteron)'''
|-
**Maximum Windows OS: Windows 10
| <kbd>Opteron_G3</kbd> || Windows 10 || AMD Opteron 23xx
**Description: AMD Opteron Generation 2
|-

| <kbd>Opteron_G4</kbd> || Windows 10 || AMD Opteron 62xx
*-cpu Opteron_G3
|-
**Device: '''AMD Opteron 23xx (Gen 3 Class Opteron)'''
| <kbd>Opteron_G5</kbd> || Windows 10 || AMD Opteron 63xx
**Maximum Windows OS: Windows 10
|-
**Description: AMD Opteron Generation 3
| <kbd>Penryn</kbd> || Windows 10 || Intel Core 2 Duo P9xxx (Penryn)

|-
*-cpu Opteron_G4
| <kbd>SandyBridge</kbd> || Windows 10 || Intel Xeon E312xx
**Device: '''AMD Opteron 62xx (Gen 4 Class Opteron)'''
|-
**Maximum Windows OS: Windows 10
| <kbd>Skylake-Client</kbd> || Windows 10 || Skylake generation CPU
**Description: AMD Opteron Generation 4
|-

| <kbd>Westmere</kbd> || Windows 10 || Intel Westmere E56xx/L56xx/X56xx
*-cpu Opteron_G5
|-
**Device: '''AMD Opteron 63xx (Gen 5 Class Opteron)'''
| <kbd>core2duo</kbd> || Windows 10 || Intel Core 2 Duo CPU T7700, 2.40 GHz
**Maximum Windows OS: Windows 10
|-
**Description: AMD Opteron Generation 5
| <kbd>coreduo</kbd> || Windows 10 || Intel Core Duo CPU T2600, 2.16 GHz

|-
*-cpu Penryn
| <kbd>n270</kbd> || Windows 10 || Intel Atom CPU N270 at 1.60 GHz.<br>'''Note''': This CPU can run Windows Vista/7/8/10, but it is not recommended to run anything above XP due to how paltry the CPU is.
**Device: '''Intel Core 2 Duo P9xxx Penryn Class Core 2)'''
|}
**Maximum Windows OS: Windows 10
**Description: Intel Core 2 Duo P9xxx

*-cpu SandyBridge
**Device: '''Intel Xeon E312xx (Sandy Bridge)'''
**Maximum Windows OS: Windows 10
**Description: Intel Xeon (codename Sandy Bridge)

*-cpu Skylake-Client
**Device: '''Intel Skylake'''
**Maximum Windows OS: Windows 10
**Description: Intel Skylake

*-cpu Westmere
**Device: '''Intel Westmere E56xx/L56xx/X56xx'''
**Maximum Windows OS: Windows 10
**Description: Intel Westmere

*-cpu core2duo
**Device: '''Intel Core 2 Duo CPU T7700 @ 2.40 GHz'''
**Maximum Windows OS: Windows 10
**Description: Intel Core 2 Duo CPU T7700, 2.40 GHz.

*-cpu coreduo
**Device: '''Intel Core Duo CPU T2600 @ 2.16 GHz'''
**Maximum Windows OS: Windows 7
**Description: Intel Core Duo CPU T2600, 2.16 GHz.

*-cpu kvm32
**Device: '''Generic 32-bit KVM processor'''
**Maximum Windows OS: Windows 10
**Description: A generic, emulated 32-bit KVM processor.

*-cpu kvm64
**Device: '''Generic KVM processor'''
**Maximum Windows OS: Windows 10
**Description: A generic, emulated KVM processor.

*-cpu n270
**Device: '''Intel Atom CPU N270 @ 1.60 GHz'''
**Maximum Windows OS: Windows 10
**Description: Intel Atom CPU N270 at 1.60 GHz. NOTE: This can run Windows Vista/7/8/10, but it is not recommended to run anything above XP on this CPU.

*-cpu pentium
**Device: '''Intel Pentium(R) Pro'''
**Maximum Windows OS: Windows XP
**Description: Emulated Pentium Pro. Recommended for Windows 3.1, Windows 95, Windows NT 4.0, Windows 98, and Windows Me VMs. '''NOTE:''' If you are running a Windows NT 3.x VM, this CPU is essential to get past the setup.

*-cpu pentium2
**Device: '''Intel Pentium II'''
**Maximum Windows OS: Windows 7
**Description: Emulated Pentium II. This can run Windows 7 but is not recommended for anything above 2000.

*-cpu pentium3
**Device: '''Intel Pentium III'''
**Maximum Windows OS: Windows 7
**Description: Emulated Pentium III. This can run Windows 7 but is not recommended for anything above XP.

*-cpu qemu32
**Device: '''Generic 32-bit QEMU CPU'''
**Maximum Windows OS: Windows 10
**Description: Generic 32-bit QEMU CPU.

*-cpu qemu64
**Device: '''Generic QEMU CPU'''
**Maximum Windows OS: Windows 10
**Description: Generic QEMU CPU.

===Network cards===
Add -net user at the end to make sure the network works.

*-net nic,model=rtl8139
**Device: '''Realtek 8139C+ Fast Ethernet '''
**Description: Realtek 8139 card, 10/100Mb/s. This card is built into Windows XP+ and almost every modern Linux and BSD distribution. There is a packet driver for MS-DOS and drivers for Windows 95 and above.

*-net nic,model=e1000
**Device: '''Intel PRO/1000 MT Desktop Adapter '''
**Description: Intel 1Gb/s card, recommended for use in modern Windows and Linux hosts. This driver is built into Vista and up, and is also downloadable for Windows XP.

*-net nic,model=pcnet
**Device: '''AMD PCNet-Fast III Ethernet Adapter '''
**Description: AMD PCnet card. Recommended for Windows 9x, NT 4 and Windows 2000. There is also a driver available for Windows 3.1.

*-net nic,model=ne2k_pci
**Device: '''Novell NE2000 '''
**Description: PCI NE2000 network card. Useful for older hosts, like Windows 3.x and MS-DOS.

*-net nic,model=ne2k_isa
**Device: '''Novell NE2000 '''
**Description: ISA NE2000 network card.

*-net nic,model=virtio
**Device: '''Red Hat Virtio Network Card '''
**Description: The Virtio network card is the fastest network card available for QEMU, performing better than 1Gb/s. Modern Linux has a built in driver but Windows requires installation of a special driver (but regardless, is still usable).

*-net nic,model=i82551
**Device: '''Intel i82551 ethernet '''
**Description: Intel i82551 ethernet card.

*-net nic,model=i82557b
**Device: '''Intel i82557b ethernet '''
**Description: Intel i82557b ethernet card.

*-net nic,model=i82559er
**Device: '''Intel i82559er ethernet '''
**Description: Intel i82559er ethernet card.


===Machines===
*-M pc
**Machine: '''Standard PC (i440FX + PIIX, 1996)'''
**Description: This is the default machine in QEMU. This machine emulates a PC from circa 1996, although this doesn't hinder its ability to run newer operating systems or emulate newer CPUs. If you want more stability, it is recommended to use this, although if you want faster boot times and better performance on [[Windows 7]] or modern Linux, choose q35.

*-M q35
**Machine: '''Standard PC (Q35 + ICH9, 2009)'''
**Description: This is another machine in QEMU which emulates a PC from circa 2009. This machine is faster and more efficient, and takes up less resources but at a slight cost of stability (occasionally Windows 7 or Linux will crash at startup, but it will usually boot back up). This is recommended for Windows 10 as it makes it much faster. '''Note:''' Windows XP and below cannot be ran or installed on q35 (BSODing immediately on startup or the setup).

===VGA cards===

*-vga cirrus
**Device: '''Cirrus CLGD 5446 PCI'''
**Description: Cirrus Logic card, from the mid 1990s. This is recommended for use in Windows 9x, NT 4.0, and Windows 2000.

*-vga std
**Device: '''Standard Graphics Card'''
**Description: This card is recommended for Windows XP and above and Linux, BSD, etc. This supports high resolutions.

*-vga vmware
**Device: '''VMWare SVGA-II'''
**Description: This card is unrecommended due to its semi-buggy nature, but it is recommended for DOS VMs as it can be used in Windows 3.1. This works in nearly all editions of Windows and most distributions of Linux.

*-vga qxl
**Device: '''QXL Paravirtual Graphics Adapter'''
**Description: This does not have a built in driver in Windows, but does in Linux and BSD. This allows very high resolutions to be used, although it is unrecommended since CollabVM nor Guacamole is not designed for very high resolutions. Recommended to use in Linux VMs if you don't want to use standard (Cirrus works in most distributions but is buggy).

*-vga none
**Device: '''None'''
**Description: This disables the VGA card, but it should not be used as CollabVM does not support text mode VMs at this time.


===Mouse===
===Mouse===

Latest revision as of 08:58, 28 August 2024

This page lists arguments that QEMU can use when emulating a x86 or x86_64 guest.

Devices

CPUs

Use -cpu [type][,...] to use a given CPU type. Common ones are listed below.

CPU types
Type OS Description
host Various The Host CPU. If KVM is enabled, this will clone your host's CPU ID and flags to the VM.
max Various The Max CPU. If KVM is enabled, this will clone your host's CPU ID and flags, and also enable every possible subfeature.
However, unlike host, this CPU type also works with TCG, and allows emulating the max feature set TCG supports (with your QEMU version).
kvm32 Windows 10 Generic KVM 32-bit CPU.
kvm64 Windows 10 Generic KVM 64-bit CPU.
qemu32 Windows 10 Generic KVM 32-bit CPU.
qemu64 Windows 10 Generic KVM 64-bit CPU.
486 Windows 2000 Intel 80486. Not recommended for use unless you are running a DOS VM.
pentium Windows XP Pentium Pro. Recommended for Windows 3.1, Windows 95, Windows NT 4.0, Windows 98, and Windows Me VMs.
Note: If you are running a Windows NT 3.x VM, this CPU is essential to get past the setup.
pentium2 Windows 7 Pentium II. This can run Windows 7 but is not recommended for anything above 2000.
pentium3 Windows 7 Pentium III. This can run Windows 7 but is not recommended for anything above 2000.
Broadwell Windows 7 Intel Broadwell Microprocessor
Broadwell-noTSX Windows 7 Intel Broadwell Microprocessor (without Intel TSX)
Conroe Windows 7 Intel Celeron 4x0 (Conroe/Merom Class Core 2) CPU
Haswell Windows 10 Intel Haswell CPU
Haswell-noTSX Windows 10 Intel Haswell CPU (without Intel TSX)
IvyBridge Windows 10 Intel Xeon E3-1200 v2 (codename Ivy Bridge)
Nehalem Windows 10 Intel Core i7 950
Opteron_G1 Windows 10 AMD Opteron 240
Opteron_G2 Windows 10 AMD Opteron 22xx
Opteron_G3 Windows 10 AMD Opteron 23xx
Opteron_G4 Windows 10 AMD Opteron 62xx
Opteron_G5 Windows 10 AMD Opteron 63xx
Penryn Windows 10 Intel Core 2 Duo P9xxx (Penryn)
SandyBridge Windows 10 Intel Xeon E312xx
Skylake-Client Windows 10 Skylake generation CPU
Westmere Windows 10 Intel Westmere E56xx/L56xx/X56xx
core2duo Windows 10 Intel Core 2 Duo CPU T7700, 2.40 GHz
coreduo Windows 10 Intel Core Duo CPU T2600, 2.16 GHz
n270 Windows 10 Intel Atom CPU N270 at 1.60 GHz.
Note: This CPU can run Windows Vista/7/8/10, but it is not recommended to run anything above XP due to how paltry the CPU is.

Mouse

  • -usbdevice tablet
    • Device: QEMU HID Tablet
    • Description: This simulates a "tablet" mouse, and it is synced with the host mouse as it is absolute. This is highly recommended to use and it is supported in nearly all modern Windows, Linux, BSD, and other hosts. Driver is included by default in Windows 2000 and is also possible to use on NT 4.0, 98, 98 SE, and Me.
  • -serial msmouse
    • Device: Microsoft Serial Mouse
    • Description: This emulates a Microsoft Serial Mouse from the 1990s. Although this type of serial mouse is still supported in modern Windows, it is unrecommended and only recommended for Windows 3.x VMs.