Revision 585c8187
b/Makefile.am | ||
---|---|---|
634 | 634 |
test/data/proc_drbd83.txt \ |
635 | 635 |
test/data/proc_drbd83_sync.txt \ |
636 | 636 |
test/data/proc_drbd83_sync_krnl2.6.39.txt \ |
637 |
test/data/kvm_1.0_help.txt \ |
|
638 |
test/data/kvm_0.15.90_help.txt \ |
|
639 |
test/data/kvm_0.12.5_help.txt \ |
|
640 |
test/data/kvm_0.9.1_help.txt \ |
|
637 | 641 |
test/data/sys_drbd_usermode_helper.txt \ |
638 | 642 |
test/import-export_unittest-helper |
639 | 643 |
|
b/NEWS | ||
---|---|---|
1 | 1 |
News |
2 | 2 |
==== |
3 | 3 |
|
4 |
|
|
5 |
Version 2.5.0 rc5 |
|
6 |
----------------- |
|
7 |
|
|
8 |
*(unreleased)* |
|
9 |
|
|
10 |
Improvements and bugfixes |
|
11 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
12 |
|
|
13 |
- Support for kvm version 1.0, that changed the version reporting format |
|
14 |
(from 3 to 2 digits). |
|
15 |
|
|
16 |
|
|
4 | 17 |
Version 2.5.0 rc4 |
5 | 18 |
----------------- |
6 | 19 |
|
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
209 | 209 |
_MIGRATION_INFO_MAX_BAD_ANSWERS = 5 |
210 | 210 |
_MIGRATION_INFO_RETRY_DELAY = 2 |
211 | 211 |
|
212 |
_VERSION_RE = re.compile(r"\b(\d+)\.(\d+)\.(\d+)\b")
|
|
212 |
_VERSION_RE = re.compile(r"\b(\d+)\.(\d+)(\.(\d+))?\b")
|
|
213 | 213 |
|
214 | 214 |
ANCILLARY_FILES = [ |
215 | 215 |
_KVM_NETWORK_SCRIPT, |
... | ... | |
1007 | 1007 |
return result |
1008 | 1008 |
|
1009 | 1009 |
@classmethod |
1010 |
def _ParseKVMVersion(cls, text): |
|
1011 |
"""Parse the KVM version from the --help output. |
|
1012 |
|
|
1013 |
@type text: string |
|
1014 |
@param text: output of kvm --help |
|
1015 |
@return: (version, v_maj, v_min, v_rev) |
|
1016 |
@raise L{errors.HypervisorError}: when the KVM version cannot be retrieved |
|
1017 |
|
|
1018 |
""" |
|
1019 |
match = cls._VERSION_RE.search(text.splitlines()[0]) |
|
1020 |
if not match: |
|
1021 |
raise errors.HypervisorError("Unable to get KVM version") |
|
1022 |
|
|
1023 |
v_all = match.group(0) |
|
1024 |
v_maj = int(match.group(1)) |
|
1025 |
v_min = int(match.group(2)) |
|
1026 |
if match.group(4): |
|
1027 |
v_rev = int(match.group(4)) |
|
1028 |
else: |
|
1029 |
v_rev = 0 |
|
1030 |
return (v_all, v_maj, v_min, v_rev) |
|
1031 |
|
|
1032 |
@classmethod |
|
1010 | 1033 |
def _GetKVMVersion(cls): |
1011 | 1034 |
"""Return the installed KVM version. |
1012 | 1035 |
|
... | ... | |
1017 | 1040 |
result = utils.RunCmd([constants.KVM_PATH, "--help"]) |
1018 | 1041 |
if result.failed: |
1019 | 1042 |
raise errors.HypervisorError("Unable to get KVM version") |
1020 |
match = cls._VERSION_RE.search(result.output.splitlines()[0]) |
|
1021 |
if not match: |
|
1022 |
raise errors.HypervisorError("Unable to get KVM version") |
|
1023 |
|
|
1024 |
return (match.group(0), int(match.group(1)), int(match.group(2)), |
|
1025 |
int(match.group(3))) |
|
1043 |
return cls._ParseKVMVersion(result.output) |
|
1026 | 1044 |
|
1027 | 1045 |
def StopInstance(self, instance, force=False, retry=False, name=None): |
1028 | 1046 |
"""Stop an instance. |
b/test/data/kvm_0.12.5_help.txt | ||
---|---|---|
1 |
QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard |
|
2 |
usage: qemu [options] [disk_image] |
|
3 |
|
|
4 |
'disk_image' is a raw hard image image for IDE hard disk 0 |
|
5 |
|
|
6 |
Standard options: |
|
7 |
-h or -help display this help and exit |
|
8 |
-version display version information and exit |
|
9 |
-M machine select emulated machine (-M ? for list) |
|
10 |
-cpu cpu select CPU (-cpu ? for list) |
|
11 |
-smp n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets] |
|
12 |
set the number of CPUs to 'n' [default=1] |
|
13 |
maxcpus= maximum number of total cpus, including |
|
14 |
offline CPUs for hotplug etc. |
|
15 |
cores= number of CPU cores on one socket |
|
16 |
threads= number of threads on one CPU core |
|
17 |
sockets= number of discrete sockets in the system |
|
18 |
-numa node[,mem=size][,cpus=cpu[-cpu]][,nodeid=node] |
|
19 |
-fda/-fdb file use 'file' as floppy disk 0/1 image |
|
20 |
-hda/-hdb file use 'file' as IDE hard disk 0/1 image |
|
21 |
-hdc/-hdd file use 'file' as IDE hard disk 2/3 image |
|
22 |
-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) |
|
23 |
-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] |
|
24 |
[,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off] |
|
25 |
[,cache=writethrough|writeback|none][,format=f][,serial=s] |
|
26 |
[,addr=A][,id=name][,aio=threads|native] |
|
27 |
[,boot=on|off] |
|
28 |
use 'file' as a drive image |
|
29 |
-set group.id.arg=value |
|
30 |
set <arg> parameter for item <id> of type <group> |
|
31 |
i.e. -set drive.$id.file=/path/to/image |
|
32 |
-global driver.property=value |
|
33 |
set a global default for a driver property |
|
34 |
-mtdblock file use 'file' as on-board Flash memory image |
|
35 |
-sd file use 'file' as SecureDigital card image |
|
36 |
-pflash file use 'file' as a parallel flash image |
|
37 |
-boot [order=drives][,once=drives][,menu=on|off] |
|
38 |
'drives': floppy (a), hard disk (c), CD-ROM (d), network (n) |
|
39 |
-snapshot write to temporary files instead of disk image files |
|
40 |
-m megs set virtual RAM size to megs MB [default=128] |
|
41 |
-k language use keyboard layout (for example 'fr' for French) |
|
42 |
-audio-help print list of audio drivers and their options |
|
43 |
-soundhw c1,... enable audio support |
|
44 |
and only specified sound cards (comma separated list) |
|
45 |
use -soundhw ? to get the list of supported cards |
|
46 |
use -soundhw all to enable all of them |
|
47 |
-usb enable the USB driver (will be the default soon) |
|
48 |
-usbdevice name add the host or guest USB device 'name' |
|
49 |
-device driver[,options] add device |
|
50 |
-name string1[,process=string2] set the name of the guest |
|
51 |
string1 sets the window title and string2 the process name (on Linux) |
|
52 |
-uuid %08x-%04x-%04x-%04x-%012x |
|
53 |
specify machine UUID |
|
54 |
|
|
55 |
Display options: |
|
56 |
-nographic disable graphical output and redirect serial I/Os to console |
|
57 |
-curses use a curses/ncurses interface instead of SDL |
|
58 |
-no-frame open SDL window without a frame and window decorations |
|
59 |
-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt) |
|
60 |
-ctrl-grab use Right-Ctrl to grab mouse (instead of Ctrl-Alt) |
|
61 |
-no-quit disable SDL window close capability |
|
62 |
-sdl enable SDL |
|
63 |
-portrait rotate graphical output 90 deg left (only PXA LCD) |
|
64 |
-vga [std|cirrus|vmware|xenfb|none] |
|
65 |
select video card type |
|
66 |
-full-screen start in full screen |
|
67 |
-vnc display start a VNC server on display |
|
68 |
|
|
69 |
i386 target only: |
|
70 |
-win2k-hack use it when installing Windows 2000 to avoid a disk full bug |
|
71 |
-no-fd-bootchk disable boot signature checking for floppy disks |
|
72 |
-no-acpi disable ACPI |
|
73 |
-no-hpet disable HPET |
|
74 |
-balloon none disable balloon device |
|
75 |
-balloon virtio[,addr=str] |
|
76 |
enable virtio balloon device (default) |
|
77 |
-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,data=file1[:file2]...] |
|
78 |
ACPI table description |
|
79 |
-smbios file=binary |
|
80 |
Load SMBIOS entry from binary file |
|
81 |
-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d] |
|
82 |
Specify SMBIOS type 0 fields |
|
83 |
-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str] |
|
84 |
[,uuid=uuid][,sku=str][,family=str] |
|
85 |
Specify SMBIOS type 1 fields |
|
86 |
|
|
87 |
Network options: |
|
88 |
-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v] |
|
89 |
create a new Network Interface Card and connect it to VLAN 'n' |
|
90 |
-net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=y|n] |
|
91 |
[,hostname=host][,dhcpstart=addr][,dns=addr][,tftp=dir][,bootfile=f] |
|
92 |
[,hostfwd=rule][,guestfwd=rule][,smb=dir[,smbserver=addr]] |
|
93 |
connect the user mode network stack to VLAN 'n', configure its |
|
94 |
DHCP server and enabled optional services |
|
95 |
-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off] |
|
96 |
connect the host TAP network interface to VLAN 'n' and use the |
|
97 |
network scripts 'file' (default=/etc/kvm/kvm-ifup) |
|
98 |
and 'dfile' (default=/etc/kvm/kvm-ifdown); |
|
99 |
use '[down]script=no' to disable script execution; |
|
100 |
use 'fd=h' to connect to an already opened TAP interface |
|
101 |
use 'sndbuf=nbytes' to limit the size of the send buffer; the |
|
102 |
default of 'sndbuf=1048576' can be disabled using 'sndbuf=0' |
|
103 |
use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag; use |
|
104 |
vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition |
|
105 |
-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port] |
|
106 |
connect the vlan 'n' to another VLAN using a socket connection |
|
107 |
-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port] |
|
108 |
connect the vlan 'n' to multicast maddr and port |
|
109 |
-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode] |
|
110 |
connect the vlan 'n' to port 'n' of a vde switch running |
|
111 |
on host and listening for incoming connections on 'socketpath'. |
|
112 |
Use group 'groupname' and mode 'octalmode' to change default |
|
113 |
ownership and permissions for communication port. |
|
114 |
-net dump[,vlan=n][,file=f][,len=n] |
|
115 |
dump traffic on vlan 'n' to file 'f' (max n bytes per packet) |
|
116 |
-net none use it alone to have zero network devices; if no -net option |
|
117 |
is provided, the default is '-net nic -net user' |
|
118 |
-netdev [user|tap|vde|socket],id=str[,option][,option][,...] |
|
119 |
|
|
120 |
Character device options: |
|
121 |
-chardev null,id=id |
|
122 |
-chardev socket,id=id[,host=host],port=host[,to=to][,ipv4][,ipv6][,nodelay] |
|
123 |
[,server][,nowait][,telnet] (tcp) |
|
124 |
-chardev socket,id=id,path=path[,server][,nowait][,telnet] (unix) |
|
125 |
-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr] |
|
126 |
[,localport=localport][,ipv4][,ipv6] |
|
127 |
-chardev msmouse,id=id |
|
128 |
-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]] |
|
129 |
-chardev file,id=id,path=path |
|
130 |
-chardev pipe,id=id,path=path |
|
131 |
-chardev pty,id=id |
|
132 |
-chardev stdio,id=id,[,signal=on|off] |
|
133 |
-chardev braille,id=id |
|
134 |
-chardev tty,id=id,path=path |
|
135 |
-chardev parport,id=id,path=path |
|
136 |
|
|
137 |
Bluetooth(R) options: |
|
138 |
-bt hci,null dumb bluetooth HCI - doesn't respond to commands |
|
139 |
-bt hci,host[:id] |
|
140 |
use host's HCI with the given name |
|
141 |
-bt hci[,vlan=n] |
|
142 |
emulate a standard HCI in virtual scatternet 'n' |
|
143 |
-bt vhci[,vlan=n] |
|
144 |
add host computer to virtual scatternet 'n' using VHCI |
|
145 |
-bt device:dev[,vlan=n] |
|
146 |
emulate a bluetooth device 'dev' in scatternet 'n' |
|
147 |
|
|
148 |
Linux/Multiboot boot specific: |
|
149 |
-kernel bzImage use 'bzImage' as kernel image |
|
150 |
-append cmdline use 'cmdline' as kernel command line |
|
151 |
-initrd file use 'file' as initial ram disk |
|
152 |
|
|
153 |
Debug/Expert options: |
|
154 |
-serial dev redirect the serial port to char device 'dev' |
|
155 |
-parallel dev redirect the parallel port to char device 'dev' |
|
156 |
-monitor dev redirect the monitor to char device 'dev' |
|
157 |
-qmp dev like -monitor but opens in 'control' mode. |
|
158 |
-mon chardev=[name][,mode=readline|control][,default] |
|
159 |
-pidfile file write PID to 'file' |
|
160 |
-singlestep always run in singlestep mode |
|
161 |
-S freeze CPU at startup (use 'c' to start execution) |
|
162 |
-gdb dev wait for gdb connection on 'dev' |
|
163 |
-s shorthand for -gdb tcp::1234 |
|
164 |
-d item1,... output log to /tmp/qemu.log (use -d ? for a list of log items) |
|
165 |
-hdachs c,h,s[,t] |
|
166 |
force hard disk 0 physical geometry and the optional BIOS |
|
167 |
translation (t=none or lba) (usually qemu can guess them) |
|
168 |
-L path set the directory for the BIOS, VGA BIOS and keymaps |
|
169 |
-bios file set the filename for the BIOS |
|
170 |
-enable-kvm enable KVM full virtualization support |
|
171 |
-no-reboot exit instead of rebooting |
|
172 |
-no-shutdown stop before shutdown |
|
173 |
-loadvm [tag|id] |
|
174 |
start right away with a saved state (loadvm in monitor) |
|
175 |
-daemonize daemonize QEMU after initializing |
|
176 |
-option-rom rom load a file, rom, into the option ROM space |
|
177 |
-clock force the use of the given methods for timer alarm. |
|
178 |
To see what timers are available use -clock ? |
|
179 |
-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew] |
|
180 |
set the RTC base and clock, enable drift fix for clock ticks |
|
181 |
-icount [N|auto] |
|
182 |
enable virtual instruction counter with 2^N clock ticks per |
|
183 |
instruction |
|
184 |
-watchdog i6300esb|ib700 |
|
185 |
enable virtual hardware watchdog [default=none] |
|
186 |
-watchdog-action reset|shutdown|poweroff|pause|debug|none |
|
187 |
action when watchdog fires [default=reset] |
|
188 |
-echr chr set terminal escape character instead of ctrl-a |
|
189 |
-virtioconsole c |
|
190 |
set virtio console |
|
191 |
-show-cursor show cursor |
|
192 |
-tb-size n set TB size |
|
193 |
-incoming uri wait on uri for incoming migration |
|
194 |
-nodefaults don't create default devices. |
|
195 |
-chroot dir Chroot to dir just before starting the VM. |
|
196 |
-runas user Change to user id user just before starting the VM. |
|
197 |
-readconfig <file> |
|
198 |
-writeconfig <file> |
|
199 |
read/write config file |
|
200 |
-no-kvm disable KVM hardware virtualization |
|
201 |
-no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC |
|
202 |
-no-kvm-pit disable KVM kernel mode PIT |
|
203 |
-no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection |
|
204 |
-pcidevice host=bus:dev.func[,dma=none][,name=string] |
|
205 |
expose a PCI device to the guest OS. |
|
206 |
dma=none: don't perform any dma translations (default is to use an iommu) |
|
207 |
'string' is used in log output. |
|
208 |
-enable-nesting enable support for running a VM inside the VM (AMD only) |
|
209 |
-nvram FILE provide ia64 nvram contents |
|
210 |
-tdf enable guest time drift compensation |
|
211 |
-kvm-shadow-memory MEGABYTES |
|
212 |
allocate MEGABYTES for kvm mmu shadowing |
|
213 |
-mem-path FILE provide backing storage for guest RAM |
|
214 |
-mem-prealloc preallocate guest memory (use with -mempath) |
|
215 |
|
|
216 |
During emulation, the following keys are useful: |
|
217 |
ctrl-alt-f toggle full screen |
|
218 |
ctrl-alt-n switch to virtual console 'n' |
|
219 |
ctrl-alt toggle mouse and keyboard grab |
|
220 |
|
|
221 |
When using -nographic, press 'ctrl-a h' to get some help. |
b/test/data/kvm_0.15.90_help.txt | ||
---|---|---|
1 |
QEMU emulator version 0.15.90, Copyright (c) 2003-2008 Fabrice Bellard |
|
2 |
usage: qemu [options] [disk_image] |
|
3 |
|
|
4 |
'disk_image' is a raw hard disk image for IDE hard disk 0 |
|
5 |
|
|
6 |
Standard options: |
|
7 |
-h or -help display this help and exit |
|
8 |
-version display version information and exit |
|
9 |
-machine [type=]name[,prop[=value][,...]] |
|
10 |
selects emulated machine (-machine ? for list) |
|
11 |
property accel=accel1[:accel2[:...]] selects accelerator |
|
12 |
supported accelerators are kvm, xen, tcg (default: tcg) |
|
13 |
-cpu cpu select CPU (-cpu ? for list) |
|
14 |
-smp n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets] |
|
15 |
set the number of CPUs to 'n' [default=1] |
|
16 |
maxcpus= maximum number of total cpus, including |
|
17 |
offline CPUs for hotplug, etc |
|
18 |
cores= number of CPU cores on one socket |
|
19 |
threads= number of threads on one CPU core |
|
20 |
sockets= number of discrete sockets in the system |
|
21 |
-numa node[,mem=size][,cpus=cpu[-cpu]][,nodeid=node] |
|
22 |
-fda/-fdb file use 'file' as floppy disk 0/1 image |
|
23 |
-hda/-hdb file use 'file' as IDE hard disk 0/1 image |
|
24 |
-hdc/-hdd file use 'file' as IDE hard disk 2/3 image |
|
25 |
-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) |
|
26 |
-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] |
|
27 |
[,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off] |
|
28 |
[,cache=writethrough|writeback|none|directsync|unsafe][,format=f] |
|
29 |
[,serial=s][,addr=A][,id=name][,aio=threads|native] |
|
30 |
[,readonly=on|off] |
|
31 |
use 'file' as a drive image |
|
32 |
-set group.id.arg=value |
|
33 |
set <arg> parameter for item <id> of type <group> |
|
34 |
i.e. -set drive.$id.file=/path/to/image |
|
35 |
-global driver.property=value |
|
36 |
set a global default for a driver property |
|
37 |
-mtdblock file use 'file' as on-board Flash memory image |
|
38 |
-sd file use 'file' as SecureDigital card image |
|
39 |
-pflash file use 'file' as a parallel flash image |
|
40 |
-boot [order=drives][,once=drives][,menu=on|off] |
|
41 |
[,splash=sp_name][,splash-time=sp_time] |
|
42 |
'drives': floppy (a), hard disk (c), CD-ROM (d), network (n) |
|
43 |
'sp_name': the file's name that would be passed to bios as logo picture, if menu=on |
|
44 |
'sp_time': the period that splash picture last if menu=on, unit is ms |
|
45 |
-snapshot write to temporary files instead of disk image files |
|
46 |
-m megs set virtual RAM size to megs MB [default=128] |
|
47 |
-mem-path FILE provide backing storage for guest RAM |
|
48 |
-mem-prealloc preallocate guest memory (use with -mem-path) |
|
49 |
-k language use keyboard layout (for example 'fr' for French) |
|
50 |
-audio-help print list of audio drivers and their options |
|
51 |
-soundhw c1,... enable audio support |
|
52 |
and only specified sound cards (comma separated list) |
|
53 |
use -soundhw ? to get the list of supported cards |
|
54 |
use -soundhw all to enable all of them |
|
55 |
-usb enable the USB driver (will be the default soon) |
|
56 |
-usbdevice name add the host or guest USB device 'name' |
|
57 |
-device driver[,prop[=value][,...]] |
|
58 |
add device (based on driver) |
|
59 |
prop=value,... sets driver properties |
|
60 |
use -device ? to print all possible drivers |
|
61 |
use -device driver,? to print all possible properties |
|
62 |
|
|
63 |
File system options: |
|
64 |
-fsdev fsdriver,id=id,path=path,[security_model={mapped|passthrough|none}] |
|
65 |
[,writeout=immediate][,readonly] |
|
66 |
|
|
67 |
Virtual File system pass-through options: |
|
68 |
-virtfs local,path=path,mount_tag=tag,security_model=[mapped|passthrough|none] |
|
69 |
[,writeout=immediate][,readonly] |
|
70 |
-virtfs_synth Create synthetic file system image |
|
71 |
|
|
72 |
-name string1[,process=string2] |
|
73 |
set the name of the guest |
|
74 |
string1 sets the window title and string2 the process name (on Linux) |
|
75 |
-uuid %08x-%04x-%04x-%04x-%012x |
|
76 |
specify machine UUID |
|
77 |
|
|
78 |
Display options: |
|
79 |
-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off] |
|
80 |
[,window_close=on|off]|curses|none| |
|
81 |
vnc=<display>[,<optargs>] |
|
82 |
select display type |
|
83 |
-nographic disable graphical output and redirect serial I/Os to console |
|
84 |
-curses use a curses/ncurses interface instead of SDL |
|
85 |
-no-frame open SDL window without a frame and window decorations |
|
86 |
-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt) |
|
87 |
-ctrl-grab use Right-Ctrl to grab mouse (instead of Ctrl-Alt) |
|
88 |
-no-quit disable SDL window close capability |
|
89 |
-sdl enable SDL |
|
90 |
-spice <args> enable spice |
|
91 |
-portrait rotate graphical output 90 deg left (only PXA LCD) |
|
92 |
-rotate <deg> rotate graphical output some deg left (only PXA LCD) |
|
93 |
-vga [std|cirrus|vmware|qxl|xenfb|none] |
|
94 |
select video card type |
|
95 |
-full-screen start in full screen |
|
96 |
-g WxH[xDEPTH] Set the initial graphical resolution and depth |
|
97 |
-vnc display start a VNC server on display |
|
98 |
|
|
99 |
i386 target only: |
|
100 |
-win2k-hack use it when installing Windows 2000 to avoid a disk full bug |
|
101 |
-no-fd-bootchk disable boot signature checking for floppy disks |
|
102 |
-no-acpi disable ACPI |
|
103 |
-no-hpet disable HPET |
|
104 |
-balloon none disable balloon device |
|
105 |
-balloon virtio[,addr=str] |
|
106 |
enable virtio balloon device (default) |
|
107 |
-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...] |
|
108 |
ACPI table description |
|
109 |
-smbios file=binary |
|
110 |
load SMBIOS entry from binary file |
|
111 |
-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d] |
|
112 |
specify SMBIOS type 0 fields |
|
113 |
-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str] |
|
114 |
[,uuid=uuid][,sku=str][,family=str] |
|
115 |
specify SMBIOS type 1 fields |
|
116 |
|
|
117 |
Network options: |
|
118 |
-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v] |
|
119 |
create a new Network Interface Card and connect it to VLAN 'n' |
|
120 |
-net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=on|off] |
|
121 |
[,hostname=host][,dhcpstart=addr][,dns=addr][,tftp=dir][,bootfile=f] |
|
122 |
[,hostfwd=rule][,guestfwd=rule][,smb=dir[,smbserver=addr]] |
|
123 |
connect the user mode network stack to VLAN 'n', configure its |
|
124 |
DHCP server and enabled optional services |
|
125 |
-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h][,vhostforce=on|off] |
|
126 |
connect the host TAP network interface to VLAN 'n' and use the |
|
127 |
network scripts 'file' (default=/etc/qemu-ifup) |
|
128 |
and 'dfile' (default=/etc/qemu-ifdown) |
|
129 |
use '[down]script=no' to disable script execution |
|
130 |
use 'fd=h' to connect to an already opened TAP interface |
|
131 |
use 'sndbuf=nbytes' to limit the size of the send buffer (the |
|
132 |
default is disabled 'sndbuf=0' to enable flow control set 'sndbuf=1048576') |
|
133 |
use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag |
|
134 |
use vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition |
|
135 |
use vhost=on to enable experimental in kernel accelerator |
|
136 |
(only has effect for virtio guests which use MSIX) |
|
137 |
use vhostforce=on to force vhost on for non-MSIX virtio guests |
|
138 |
use 'vhostfd=h' to connect to an already opened vhost net device |
|
139 |
-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port] |
|
140 |
connect the vlan 'n' to another VLAN using a socket connection |
|
141 |
-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port[,localaddr=addr]] |
|
142 |
connect the vlan 'n' to multicast maddr and port |
|
143 |
use 'localaddr=addr' to specify the host address to send packets from |
|
144 |
-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode] |
|
145 |
connect the vlan 'n' to port 'n' of a vde switch running |
|
146 |
on host and listening for incoming connections on 'socketpath'. |
|
147 |
Use group 'groupname' and mode 'octalmode' to change default |
|
148 |
ownership and permissions for communication port. |
|
149 |
-net dump[,vlan=n][,file=f][,len=n] |
|
150 |
dump traffic on vlan 'n' to file 'f' (max n bytes per packet) |
|
151 |
-net none use it alone to have zero network devices. If no -net option |
|
152 |
is provided, the default is '-net nic -net user' |
|
153 |
-netdev [user|tap|vde|socket],id=str[,option][,option][,...] |
|
154 |
|
|
155 |
Character device options: |
|
156 |
-chardev null,id=id[,mux=on|off] |
|
157 |
-chardev socket,id=id[,host=host],port=host[,to=to][,ipv4][,ipv6][,nodelay] |
|
158 |
[,server][,nowait][,telnet][,mux=on|off] (tcp) |
|
159 |
-chardev socket,id=id,path=path[,server][,nowait][,telnet],[mux=on|off] (unix) |
|
160 |
-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr] |
|
161 |
[,localport=localport][,ipv4][,ipv6][,mux=on|off] |
|
162 |
-chardev msmouse,id=id[,mux=on|off] |
|
163 |
-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]] |
|
164 |
[,mux=on|off] |
|
165 |
-chardev file,id=id,path=path[,mux=on|off] |
|
166 |
-chardev pipe,id=id,path=path[,mux=on|off] |
|
167 |
-chardev pty,id=id[,mux=on|off] |
|
168 |
-chardev stdio,id=id[,mux=on|off][,signal=on|off] |
|
169 |
-chardev braille,id=id[,mux=on|off] |
|
170 |
-chardev tty,id=id,path=path[,mux=on|off] |
|
171 |
-chardev parport,id=id,path=path[,mux=on|off] |
|
172 |
-chardev spicevmc,id=id,name=name[,debug=debug] |
|
173 |
|
|
174 |
Bluetooth(R) options: |
|
175 |
-bt hci,null dumb bluetooth HCI - doesn't respond to commands |
|
176 |
-bt hci,host[:id] |
|
177 |
use host's HCI with the given name |
|
178 |
-bt hci[,vlan=n] |
|
179 |
emulate a standard HCI in virtual scatternet 'n' |
|
180 |
-bt vhci[,vlan=n] |
|
181 |
add host computer to virtual scatternet 'n' using VHCI |
|
182 |
-bt device:dev[,vlan=n] |
|
183 |
emulate a bluetooth device 'dev' in scatternet 'n' |
|
184 |
|
|
185 |
Linux/Multiboot boot specific: |
|
186 |
-kernel bzImage use 'bzImage' as kernel image |
|
187 |
-append cmdline use 'cmdline' as kernel command line |
|
188 |
-initrd file use 'file' as initial ram disk |
|
189 |
|
|
190 |
Debug/Expert options: |
|
191 |
-serial dev redirect the serial port to char device 'dev' |
|
192 |
-parallel dev redirect the parallel port to char device 'dev' |
|
193 |
-monitor dev redirect the monitor to char device 'dev' |
|
194 |
-qmp dev like -monitor but opens in 'control' mode |
|
195 |
-mon chardev=[name][,mode=readline|control][,default] |
|
196 |
-debugcon dev redirect the debug console to char device 'dev' |
|
197 |
-pidfile file write PID to 'file' |
|
198 |
-singlestep always run in singlestep mode |
|
199 |
-S freeze CPU at startup (use 'c' to start execution) |
|
200 |
-gdb dev wait for gdb connection on 'dev' |
|
201 |
-s shorthand for -gdb tcp::1234 |
|
202 |
-d item1,... output log to /tmp/qemu.log (use -d ? for a list of log items) |
|
203 |
-D logfile output log to logfile (instead of the default /tmp/qemu.log) |
|
204 |
-hdachs c,h,s[,t] |
|
205 |
force hard disk 0 physical geometry and the optional BIOS |
|
206 |
translation (t=none or lba) (usually qemu can guess them) |
|
207 |
-L path set the directory for the BIOS, VGA BIOS and keymaps |
|
208 |
-bios file set the filename for the BIOS |
|
209 |
-enable-kvm enable KVM full virtualization support |
|
210 |
-xen-domid id specify xen guest domain id |
|
211 |
-xen-create create domain using xen hypercalls, bypassing xend |
|
212 |
warning: should not be used when xend is in use |
|
213 |
-xen-attach attach to existing xen domain |
|
214 |
xend will use this when starting qemu |
|
215 |
-no-reboot exit instead of rebooting |
|
216 |
-no-shutdown stop before shutdown |
|
217 |
-loadvm [tag|id] |
|
218 |
start right away with a saved state (loadvm in monitor) |
|
219 |
-daemonize daemonize QEMU after initializing |
|
220 |
-option-rom rom load a file, rom, into the option ROM space |
|
221 |
-clock force the use of the given methods for timer alarm. |
|
222 |
To see what timers are available use -clock ? |
|
223 |
-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew] |
|
224 |
set the RTC base and clock, enable drift fix for clock ticks (x86 only) |
|
225 |
-icount [N|auto] |
|
226 |
enable virtual instruction counter with 2^N clock ticks per |
|
227 |
instruction |
|
228 |
-watchdog i6300esb|ib700 |
|
229 |
enable virtual hardware watchdog [default=none] |
|
230 |
-watchdog-action reset|shutdown|poweroff|pause|debug|none |
|
231 |
action when watchdog fires [default=reset] |
|
232 |
-echr chr set terminal escape character instead of ctrl-a |
|
233 |
-virtioconsole c |
|
234 |
set virtio console |
|
235 |
-show-cursor show cursor |
|
236 |
-tb-size n set TB size |
|
237 |
-incoming p prepare for incoming migration, listen on port p |
|
238 |
-nodefaults don't create default devices |
|
239 |
-chroot dir chroot to dir just before starting the VM |
|
240 |
-runas user change to user id user just before starting the VM |
|
241 |
-prom-env variable=value |
|
242 |
set OpenBIOS nvram variables |
|
243 |
-semihosting semihosting mode |
|
244 |
-old-param old param mode |
|
245 |
-readconfig <file> |
|
246 |
-writeconfig <file> |
|
247 |
read/write config file |
|
248 |
-nodefconfig |
|
249 |
do not load default config files at startup |
|
250 |
-trace [events=<file>][,file=<file>] |
|
251 |
specify tracing options |
|
252 |
|
|
253 |
During emulation, the following keys are useful: |
|
254 |
ctrl-alt-f toggle full screen |
|
255 |
ctrl-alt-n switch to virtual console 'n' |
|
256 |
ctrl-alt toggle mouse and keyboard grab |
|
257 |
|
|
258 |
When using -nographic, press 'ctrl-a h' to get some help. |
b/test/data/kvm_0.9.1_help.txt | ||
---|---|---|
1 |
QEMU PC emulator version 0.9.1 (kvm-72), Copyright (c) 2003-2008 Fabrice Bellard |
|
2 |
usage: qemu [options] [disk_image] |
|
3 |
|
|
4 |
'disk_image' is a raw hard image image for IDE hard disk 0 |
|
5 |
|
|
6 |
Standard options: |
|
7 |
-M machine select emulated machine (-M ? for list) |
|
8 |
-cpu cpu select CPU (-cpu ? for list) |
|
9 |
-fda/-fdb file use 'file' as floppy disk 0/1 image |
|
10 |
-hda/-hdb file use 'file' as IDE hard disk 0/1 image |
|
11 |
-hdc/-hdd file use 'file' as IDE hard disk 2/3 image |
|
12 |
-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) |
|
13 |
-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] |
|
14 |
[,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off] |
|
15 |
[,cache=on|off][,format=f][,boot=on|off] |
|
16 |
use 'file' as a drive image |
|
17 |
-mtdblock file use 'file' as on-board Flash memory image |
|
18 |
-sd file use 'file' as SecureDigital card image |
|
19 |
-pflash file use 'file' as a parallel flash image |
|
20 |
-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n) |
|
21 |
-snapshot write to temporary files instead of disk image files |
|
22 |
-no-frame open SDL window without a frame and window decorations |
|
23 |
-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt) |
|
24 |
-no-quit disable SDL window close capability |
|
25 |
-no-fd-bootchk disable boot signature checking for floppy disks |
|
26 |
-m megs set virtual RAM size to megs MB [default=128] |
|
27 |
-smp n set the number of CPUs to 'n' [default=1] |
|
28 |
-nographic disable graphical output and redirect serial I/Os to console |
|
29 |
-portrait rotate graphical output 90 deg left (only PXA LCD) |
|
30 |
-k language use keyboard layout (for example "fr" for French) |
|
31 |
-audio-help print list of audio drivers and their options |
|
32 |
-soundhw c1,... enable audio support |
|
33 |
and only specified sound cards (comma separated list) |
|
34 |
use -soundhw ? to get the list of supported cards |
|
35 |
use -soundhw all to enable all of them |
|
36 |
-localtime set the real time clock to local time [default=utc] |
|
37 |
-full-screen start in full screen |
|
38 |
-win2k-hack use it when installing Windows 2000 to avoid a disk full bug |
|
39 |
-usb enable the USB driver (will be the default soon) |
|
40 |
-usbdevice name add the host or guest USB device 'name' |
|
41 |
-name string set the name of the guest |
|
42 |
|
|
43 |
Network options: |
|
44 |
-net nic[,vlan=n][,macaddr=addr][,model=type] |
|
45 |
create a new Network Interface Card and connect it to VLAN 'n' |
|
46 |
-net user[,vlan=n][,hostname=host] |
|
47 |
connect the user mode network stack to VLAN 'n' and send |
|
48 |
hostname 'host' to DHCP clients |
|
49 |
-net tap[,vlan=n][,fd=h][,ifname=name][,script=file][,downscript=dfile] |
|
50 |
connect the host TAP network interface to VLAN 'n' and use the |
|
51 |
network scripts 'file' (default=/etc/kvm/kvm-ifup) |
|
52 |
and 'dfile' (default=/etc/kvm/kvm-ifdown); |
|
53 |
use '[down]script=no' to disable script execution; |
|
54 |
use 'fd=h' to connect to an already opened TAP interface |
|
55 |
-net socket[,vlan=n][,fd=h][,listen=[host]:port][,connect=host:port] |
|
56 |
connect the vlan 'n' to another VLAN using a socket connection |
|
57 |
-net socket[,vlan=n][,fd=h][,mcast=maddr:port] |
|
58 |
connect the vlan 'n' to multicast maddr and port |
|
59 |
-net none use it alone to have zero network devices; if no -net option |
|
60 |
is provided, the default is '-net nic -net user' |
|
61 |
|
|
62 |
-tftp dir allow tftp access to files in dir [-net user] |
|
63 |
-bootp file advertise file in BOOTP replies |
|
64 |
-smb dir allow SMB access to files in 'dir' [-net user] |
|
65 |
-redir [tcp|udp]:host-port:[guest-host]:guest-port |
|
66 |
redirect TCP or UDP connections from host to guest [-net user] |
|
67 |
|
|
68 |
Linux boot specific: |
|
69 |
-kernel bzImage use 'bzImage' as kernel image |
|
70 |
-append cmdline use 'cmdline' as kernel command line |
|
71 |
-initrd file use 'file' as initial ram disk |
|
72 |
|
|
73 |
Debug/Expert options: |
|
74 |
-monitor dev redirect the monitor to char device 'dev' |
|
75 |
-serial dev redirect the serial port to char device 'dev' |
|
76 |
-parallel dev redirect the parallel port to char device 'dev' |
|
77 |
-pidfile file Write PID to 'file' |
|
78 |
-S freeze CPU at startup (use 'c' to start execution) |
|
79 |
-s wait gdb connection to port |
|
80 |
-p port set gdb connection port [default=1234] |
|
81 |
-d item1,... output log to /tmp/qemu.log (use -d ? for a list of log items) |
|
82 |
-hdachs c,h,s[,t] force hard disk 0 physical geometry and the optional BIOS |
|
83 |
translation (t=none or lba) (usually qemu can guess them) |
|
84 |
-L path set the directory for the BIOS, VGA BIOS and keymaps |
|
85 |
-no-kvm disable KVM hardware virtualization |
|
86 |
-no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC |
|
87 |
-no-kvm-pit disable KVM kernel mode PIT |
|
88 |
-std-vga simulate a standard VGA card with VESA Bochs Extensions |
|
89 |
(default is CL-GD5446 PCI VGA) |
|
90 |
-no-acpi disable ACPI |
|
91 |
-curses use a curses/ncurses interface instead of SDL |
|
92 |
-no-reboot exit instead of rebooting |
|
93 |
-no-shutdown stop before shutdown |
|
94 |
-loadvm [tag|id] start right away with a saved state (loadvm in monitor) |
|
95 |
-vnc display start a VNC server on display |
|
96 |
-daemonize daemonize QEMU after initializing |
|
97 |
-tdf inject timer interrupts that got lost |
|
98 |
-kvm-shadow-memory megs set the amount of shadow pages to be allocated |
|
99 |
-mem-path set the path to hugetlbfs/tmpfs mounted directory, also enables allocation of guest memory with huge pages |
|
100 |
-option-rom rom load a file, rom, into the option ROM space |
|
101 |
-clock force the use of the given methods for timer alarm. |
|
102 |
To see what timers are available use -clock ? |
|
103 |
-startdate select initial date of the clock |
|
104 |
-icount [N|auto] |
|
105 |
Enable virtual instruction counter with 2^N clock ticks per instruction |
|
106 |
|
|
107 |
During emulation, the following keys are useful: |
|
108 |
ctrl-alt-f toggle full screen |
|
109 |
ctrl-alt-n switch to virtual console 'n' |
|
110 |
ctrl-alt toggle mouse and keyboard grab |
|
111 |
|
|
112 |
When using -nographic, press 'ctrl-a h' to get some help. |
b/test/data/kvm_1.0_help.txt | ||
---|---|---|
1 |
QEMU emulator version 1.0 (qemu-kvm-1.0 Debian 1.0+dfsg-2), Copyright (c) 2003-2008 Fabrice Bellard |
|
2 |
usage: qemu [options] [disk_image] |
|
3 |
|
|
4 |
'disk_image' is a raw hard disk image for IDE hard disk 0 |
|
5 |
|
|
6 |
Standard options: |
|
7 |
-h or -help display this help and exit |
|
8 |
-version display version information and exit |
|
9 |
-machine [type=]name[,prop[=value][,...]] |
|
10 |
selects emulated machine (-machine ? for list) |
|
11 |
property accel=accel1[:accel2[:...]] selects accelerator |
|
12 |
supported accelerators are kvm, xen, tcg (default: tcg) |
|
13 |
-cpu cpu select CPU (-cpu ? for list) |
|
14 |
-smp n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets] |
|
15 |
set the number of CPUs to 'n' [default=1] |
|
16 |
maxcpus= maximum number of total cpus, including |
|
17 |
offline CPUs for hotplug, etc |
|
18 |
cores= number of CPU cores on one socket |
|
19 |
threads= number of threads on one CPU core |
|
20 |
sockets= number of discrete sockets in the system |
|
21 |
-numa node[,mem=size][,cpus=cpu[-cpu]][,nodeid=node] |
|
22 |
-fda/-fdb file use 'file' as floppy disk 0/1 image |
|
23 |
-hda/-hdb file use 'file' as IDE hard disk 0/1 image |
|
24 |
-hdc/-hdd file use 'file' as IDE hard disk 2/3 image |
|
25 |
-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master) |
|
26 |
-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i] |
|
27 |
[,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off] |
|
28 |
[,cache=writethrough|writeback|none|directsync|unsafe][,format=f] |
|
29 |
[,serial=s][,addr=A][,id=name][,aio=threads|native] |
|
30 |
[,readonly=on|off] |
|
31 |
use 'file' as a drive image |
|
32 |
-set group.id.arg=value |
|
33 |
set <arg> parameter for item <id> of type <group> |
|
34 |
i.e. -set drive.$id.file=/path/to/image |
|
35 |
-global driver.property=value |
|
36 |
set a global default for a driver property |
|
37 |
-mtdblock file use 'file' as on-board Flash memory image |
|
38 |
-sd file use 'file' as SecureDigital card image |
|
39 |
-pflash file use 'file' as a parallel flash image |
|
40 |
-boot [order=drives][,once=drives][,menu=on|off] |
|
41 |
[,splash=sp_name][,splash-time=sp_time] |
|
42 |
'drives': floppy (a), hard disk (c), CD-ROM (d), network (n) |
|
43 |
'sp_name': the file's name that would be passed to bios as logo picture, if menu=on |
|
44 |
'sp_time': the period that splash picture last if menu=on, unit is ms |
|
45 |
-snapshot write to temporary files instead of disk image files |
|
46 |
-m megs set virtual RAM size to megs MB [default=128] |
|
47 |
-mem-path FILE provide backing storage for guest RAM |
|
48 |
-mem-prealloc preallocate guest memory (use with -mem-path) |
|
49 |
-k language use keyboard layout (for example 'fr' for French) |
|
50 |
-audio-help print list of audio drivers and their options |
|
51 |
-soundhw c1,... enable audio support |
|
52 |
and only specified sound cards (comma separated list) |
|
53 |
use -soundhw ? to get the list of supported cards |
|
54 |
use -soundhw all to enable all of them |
|
55 |
-usb enable the USB driver (will be the default soon) |
|
56 |
-usbdevice name add the host or guest USB device 'name' |
|
57 |
-device driver[,prop[=value][,...]] |
|
58 |
add device (based on driver) |
|
59 |
prop=value,... sets driver properties |
|
60 |
use -device ? to print all possible drivers |
|
61 |
use -device driver,? to print all possible properties |
|
62 |
|
|
63 |
File system options: |
|
64 |
-fsdev fsdriver,id=id,path=path,[security_model={mapped|passthrough|none}] |
|
65 |
[,writeout=immediate][,readonly] |
|
66 |
|
|
67 |
Virtual File system pass-through options: |
|
68 |
-virtfs local,path=path,mount_tag=tag,security_model=[mapped|passthrough|none] |
|
69 |
[,writeout=immediate][,readonly] |
|
70 |
-virtfs_synth Create synthetic file system image |
|
71 |
|
|
72 |
-name string1[,process=string2] |
|
73 |
set the name of the guest |
|
74 |
string1 sets the window title and string2 the process name (on Linux) |
|
75 |
-uuid %08x-%04x-%04x-%04x-%012x |
|
76 |
specify machine UUID |
|
77 |
|
|
78 |
Display options: |
|
79 |
-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off] |
|
80 |
[,window_close=on|off]|curses|none| |
|
81 |
vnc=<display>[,<optargs>] |
|
82 |
select display type |
|
83 |
-nographic disable graphical output and redirect serial I/Os to console |
|
84 |
-curses use a curses/ncurses interface instead of SDL |
|
85 |
-no-frame open SDL window without a frame and window decorations |
|
86 |
-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt) |
|
87 |
-ctrl-grab use Right-Ctrl to grab mouse (instead of Ctrl-Alt) |
|
88 |
-no-quit disable SDL window close capability |
|
89 |
-sdl enable SDL |
|
90 |
-spice <args> enable spice |
|
91 |
-portrait rotate graphical output 90 deg left (only PXA LCD) |
|
92 |
-rotate <deg> rotate graphical output some deg left (only PXA LCD) |
|
93 |
-vga [std|cirrus|vmware|qxl|xenfb|none] |
|
94 |
select video card type |
|
95 |
-full-screen start in full screen |
|
96 |
-g WxH[xDEPTH] Set the initial graphical resolution and depth |
|
97 |
-vnc display start a VNC server on display |
|
98 |
|
|
99 |
i386 target only: |
|
100 |
-win2k-hack use it when installing Windows 2000 to avoid a disk full bug |
|
101 |
-no-fd-bootchk disable boot signature checking for floppy disks |
|
102 |
-no-acpi disable ACPI |
|
103 |
-no-hpet disable HPET |
|
104 |
-balloon none disable balloon device |
|
105 |
-balloon virtio[,addr=str] |
|
106 |
enable virtio balloon device (default) |
|
107 |
-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...] |
|
108 |
ACPI table description |
|
109 |
-smbios file=binary |
|
110 |
load SMBIOS entry from binary file |
|
111 |
-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d] |
|
112 |
specify SMBIOS type 0 fields |
|
113 |
-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str] |
|
114 |
[,uuid=uuid][,sku=str][,family=str] |
|
115 |
specify SMBIOS type 1 fields |
|
116 |
|
|
117 |
Network options: |
|
118 |
-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v] |
|
119 |
create a new Network Interface Card and connect it to VLAN 'n' |
|
120 |
-net user[,vlan=n][,name=str][,net=addr[/mask]][,host=addr][,restrict=on|off] |
|
121 |
[,hostname=host][,dhcpstart=addr][,dns=addr][,tftp=dir][,bootfile=f] |
|
122 |
[,hostfwd=rule][,guestfwd=rule][,smb=dir[,smbserver=addr]] |
|
123 |
connect the user mode network stack to VLAN 'n', configure its |
|
124 |
DHCP server and enabled optional services |
|
125 |
-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off][,vhostfd=h][,vhostforce=on|off] |
|
126 |
connect the host TAP network interface to VLAN 'n' and use the |
|
127 |
network scripts 'file' (default=/etc/kvm/kvm-ifup) |
|
128 |
and 'dfile' (default=/etc/kvm/kvm-ifdown) |
|
129 |
use '[down]script=no' to disable script execution |
|
130 |
use 'fd=h' to connect to an already opened TAP interface |
|
131 |
use 'sndbuf=nbytes' to limit the size of the send buffer (the |
|
132 |
default is disabled 'sndbuf=0' to enable flow control set 'sndbuf=1048576') |
|
133 |
use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag |
|
134 |
use vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition |
|
135 |
use vhost=on to enable experimental in kernel accelerator |
|
136 |
(only has effect for virtio guests which use MSIX) |
|
137 |
use vhostforce=on to force vhost on for non-MSIX virtio guests |
|
138 |
use 'vhostfd=h' to connect to an already opened vhost net device |
|
139 |
-net socket[,vlan=n][,name=str][,fd=h][,listen=[host]:port][,connect=host:port] |
|
140 |
connect the vlan 'n' to another VLAN using a socket connection |
|
141 |
-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port[,localaddr=addr]] |
|
142 |
connect the vlan 'n' to multicast maddr and port |
|
143 |
use 'localaddr=addr' to specify the host address to send packets from |
|
144 |
-net vde[,vlan=n][,name=str][,sock=socketpath][,port=n][,group=groupname][,mode=octalmode] |
|
145 |
connect the vlan 'n' to port 'n' of a vde switch running |
|
146 |
on host and listening for incoming connections on 'socketpath'. |
|
147 |
Use group 'groupname' and mode 'octalmode' to change default |
|
148 |
ownership and permissions for communication port. |
|
149 |
-net dump[,vlan=n][,file=f][,len=n] |
|
150 |
dump traffic on vlan 'n' to file 'f' (max n bytes per packet) |
|
151 |
-net none use it alone to have zero network devices. If no -net option |
|
152 |
is provided, the default is '-net nic -net user' |
|
153 |
-netdev [user|tap|vde|socket],id=str[,option][,option][,...] |
|
154 |
|
|
155 |
Character device options: |
|
156 |
-chardev null,id=id[,mux=on|off] |
|
157 |
-chardev socket,id=id[,host=host],port=host[,to=to][,ipv4][,ipv6][,nodelay] |
|
158 |
[,server][,nowait][,telnet][,mux=on|off] (tcp) |
|
159 |
-chardev socket,id=id,path=path[,server][,nowait][,telnet],[mux=on|off] (unix) |
|
160 |
-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr] |
|
161 |
[,localport=localport][,ipv4][,ipv6][,mux=on|off] |
|
162 |
-chardev msmouse,id=id[,mux=on|off] |
|
163 |
-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]] |
|
164 |
[,mux=on|off] |
|
165 |
-chardev file,id=id,path=path[,mux=on|off] |
|
166 |
-chardev pipe,id=id,path=path[,mux=on|off] |
|
167 |
-chardev pty,id=id[,mux=on|off] |
|
168 |
-chardev stdio,id=id[,mux=on|off][,signal=on|off] |
|
169 |
-chardev braille,id=id[,mux=on|off] |
|
170 |
-chardev tty,id=id,path=path[,mux=on|off] |
|
171 |
-chardev parport,id=id,path=path[,mux=on|off] |
|
172 |
-chardev spicevmc,id=id,name=name[,debug=debug] |
|
173 |
|
|
174 |
Bluetooth(R) options: |
|
175 |
-bt hci,null dumb bluetooth HCI - doesn't respond to commands |
|
176 |
-bt hci,host[:id] |
|
177 |
use host's HCI with the given name |
|
178 |
-bt hci[,vlan=n] |
|
179 |
emulate a standard HCI in virtual scatternet 'n' |
|
180 |
-bt vhci[,vlan=n] |
|
181 |
add host computer to virtual scatternet 'n' using VHCI |
|
182 |
-bt device:dev[,vlan=n] |
|
183 |
emulate a bluetooth device 'dev' in scatternet 'n' |
|
184 |
|
|
185 |
Linux/Multiboot boot specific: |
|
186 |
-kernel bzImage use 'bzImage' as kernel image |
|
187 |
-append cmdline use 'cmdline' as kernel command line |
|
188 |
-initrd file use 'file' as initial ram disk |
|
189 |
|
|
190 |
Debug/Expert options: |
|
191 |
-serial dev redirect the serial port to char device 'dev' |
|
192 |
-parallel dev redirect the parallel port to char device 'dev' |
|
193 |
-monitor dev redirect the monitor to char device 'dev' |
|
194 |
-qmp dev like -monitor but opens in 'control' mode |
|
195 |
-mon chardev=[name][,mode=readline|control][,default] |
|
196 |
-debugcon dev redirect the debug console to char device 'dev' |
|
197 |
-pidfile file write PID to 'file' |
|
198 |
-singlestep always run in singlestep mode |
|
199 |
-S freeze CPU at startup (use 'c' to start execution) |
|
200 |
-gdb dev wait for gdb connection on 'dev' |
|
201 |
-s shorthand for -gdb tcp::1234 |
|
202 |
-d item1,... output log to /tmp/qemu.log (use -d ? for a list of log items) |
|
203 |
-D logfile output log to logfile (instead of the default /tmp/qemu.log) |
|
204 |
-hdachs c,h,s[,t] |
|
205 |
force hard disk 0 physical geometry and the optional BIOS |
|
206 |
translation (t=none or lba) (usually qemu can guess them) |
|
207 |
-L path set the directory for the BIOS, VGA BIOS and keymaps |
|
208 |
-bios file set the filename for the BIOS |
|
209 |
-enable-kvm enable KVM full virtualization support |
|
210 |
-xen-domid id specify xen guest domain id |
|
211 |
-xen-create create domain using xen hypercalls, bypassing xend |
|
212 |
warning: should not be used when xend is in use |
|
213 |
-xen-attach attach to existing xen domain |
|
214 |
xend will use this when starting qemu |
|
215 |
-no-reboot exit instead of rebooting |
|
216 |
-no-shutdown stop before shutdown |
|
217 |
-loadvm [tag|id] |
|
218 |
start right away with a saved state (loadvm in monitor) |
|
219 |
-daemonize daemonize QEMU after initializing |
|
220 |
-option-rom rom load a file, rom, into the option ROM space |
|
221 |
-clock force the use of the given methods for timer alarm. |
|
222 |
To see what timers are available use -clock ? |
|
223 |
-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew] |
|
224 |
set the RTC base and clock, enable drift fix for clock ticks (x86 only) |
|
225 |
-icount [N|auto] |
|
226 |
enable virtual instruction counter with 2^N clock ticks per |
|
227 |
instruction |
|
228 |
-watchdog i6300esb|ib700 |
|
229 |
enable virtual hardware watchdog [default=none] |
|
230 |
-watchdog-action reset|shutdown|poweroff|pause|debug|none |
|
231 |
action when watchdog fires [default=reset] |
|
232 |
-echr chr set terminal escape character instead of ctrl-a |
|
233 |
-virtioconsole c |
|
234 |
set virtio console |
|
235 |
-show-cursor show cursor |
|
236 |
-tb-size n set TB size |
|
237 |
-incoming p prepare for incoming migration, listen on port p |
|
238 |
-nodefaults don't create default devices |
|
239 |
-chroot dir chroot to dir just before starting the VM |
|
240 |
-runas user change to user id user just before starting the VM |
|
241 |
-prom-env variable=value |
|
242 |
set OpenBIOS nvram variables |
|
243 |
-semihosting semihosting mode |
|
244 |
-old-param old param mode |
|
245 |
-readconfig <file> |
|
246 |
-writeconfig <file> |
|
247 |
read/write config file |
|
248 |
-nodefconfig |
|
249 |
do not load default config files at startup |
|
250 |
-trace [events=<file>][,file=<file>] |
|
251 |
specify tracing options |
|
252 |
-no-kvm disable KVM hardware virtualization |
|
253 |
-no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC |
|
254 |
-no-kvm-pit disable KVM kernel mode PIT |
|
255 |
-no-kvm-pit-reinjection |
|
256 |
disable KVM kernel mode PIT interrupt reinjection |
|
257 |
-tdf enable guest time drift compensation |
|
258 |
-kvm-shadow-memory MEGABYTES |
|
259 |
allocate MEGABYTES for kvm mmu shadowing |
|
260 |
|
|
261 |
During emulation, the following keys are useful: |
|
262 |
ctrl-alt-f toggle full screen |
|
263 |
ctrl-alt-n switch to virtual console 'n' |
|
264 |
ctrl-alt toggle mouse and keyboard grab |
|
265 |
|
|
266 |
When using -nographic, press 'ctrl-a h' to get some help. |
b/test/ganeti.hypervisor.hv_kvm_unittest.py | ||
---|---|---|
27 | 27 |
from ganeti import compat |
28 | 28 |
from ganeti import objects |
29 | 29 |
from ganeti import errors |
30 |
from ganeti import utils |
|
30 | 31 |
|
31 | 32 |
from ganeti.hypervisor import hv_kvm |
32 | 33 |
|
... | ... | |
78 | 79 |
self.assertEqual(cons.kind, constants.CONS_MESSAGE) |
79 | 80 |
|
80 | 81 |
|
82 |
class TestVersionChecking(testutils.GanetiTestCase): |
|
83 |
def testParseVersion(self): |
|
84 |
parse = hv_kvm.KVMHypervisor._ParseKVMVersion |
|
85 |
help_10 = utils.ReadFile(self._TestDataFilename("kvm_1.0_help.txt")) |
|
86 |
help_01590 = utils.ReadFile(self._TestDataFilename("kvm_0.15.90_help.txt")) |
|
87 |
help_0125 = utils.ReadFile(self._TestDataFilename("kvm_0.12.5_help.txt")) |
|
88 |
help_091 = utils.ReadFile(self._TestDataFilename("kvm_0.9.1_help.txt")) |
|
89 |
self.assertEqual(parse(help_10), ("1.0", 1, 0, 0)) |
|
90 |
self.assertEqual(parse(help_01590), ("0.15.90", 0, 15, 90)) |
|
91 |
self.assertEqual(parse(help_0125), ("0.12.5", 0, 12, 5)) |
|
92 |
self.assertEqual(parse(help_091), ("0.9.1", 0, 9, 1)) |
|
93 |
|
|
94 |
|
|
81 | 95 |
if __name__ == "__main__": |
82 | 96 |
testutils.GanetiTestProgram() |
Also available in: Unified diff