Name Date Size #Lines LOC

..21-Feb-2019-

QMP/H27-Sep-2017-

audio/H27-Sep-2017-

bin/H27-Sep-2017-

block/H27-Sep-2017-

bsd-user/H27-Sep-2017-

compat/sys/H27-Sep-2017-

darwin-user/H27-Sep-2017-

default-configs/H27-Sep-2017-

docs/H27-Sep-2017-

etc/qemu/H27-Sep-2017-

fpu/H27-Sep-2017-

fsdev/H27-Sep-2017-

gdb-xml/H27-Sep-2017-

hw/H28-Feb-2019-

kvm/H27-Sep-2017-

linux-user/H27-Sep-2017-

net/H27-Sep-2017-

pc-bios/H27-Sep-2017-

scripts/H27-Sep-2017-

share/qemu/H27-Sep-2017-

slirp/H27-Sep-2017-

sysconfigs/target/H27-Sep-2017-

target-alpha/H27-Sep-2017-

target-arm/H27-Sep-2017-

target-cris/H27-Sep-2017-

target-i386/H29-Sep-2018-

target-ia64/H27-Sep-2017-

target-m68k/H27-Sep-2017-

target-microblaze/H27-Sep-2017-

target-mips/H27-Sep-2017-

target-ppc/H27-Sep-2017-

target-s390x/H27-Sep-2017-

target-sh4/H27-Sep-2017-

target-sparc/H27-Sep-2017-

tcg/H27-Sep-2017-

tests/H27-Sep-2017-

ui/H27-Sep-2017-

.gitmodulesH A D27-Sep-2017193 76

CODING_STYLEH A D27-Sep-20172.9 KiB8263

COPYINGH A D27-Sep-201717.6 KiB340281

COPYING.LIBH A D27-Sep-201725.8 KiB

ChangelogH A D27-Sep-201722.4 KiB575507

HACKINGH A D27-Sep-20174.9 KiB12691

LICENSEH A D27-Sep-2017637 1912

MAINTAINERSH A D27-Sep-20178.9 KiB490405

MakefileH A D27-Sep-201713 KiB383288

Makefile.disH A D27-Sep-2017402 2412

Makefile.hwH A D27-Sep-2017510 2513

Makefile.joyentH A D12-Mar-20193.4 KiB13791

Makefile.objsH A D27-Sep-201711.4 KiB329242

Makefile.targetH A D02-Apr-201912.4 KiB430288

Makefile.userH A D27-Sep-2017426 2412

README.mdH A D27-Sep-20173.7 KiB10374

README.qemuH A D27-Sep-201759 42

TODOH A D27-Sep-20171.1 KiB3833

VERSIONH A D27-Sep-20177 21

a.out.hH A D27-Sep-201713.6 KiB431291

acl.cH A D27-Sep-20174.4 KiB186110

acl.hH A D27-Sep-20172.1 KiB7531

aes.cH A D27-Sep-201759.7 KiB1,3151,170

aes.hH A D27-Sep-2017717 2721

aio.cH A D27-Sep-20175.8 KiB231148

alpha-dis.cH A D27-Sep-201779.9 KiB1,9211,490

alpha.ldH A D27-Sep-20173.9 KiB128127

arch_init.cH A D27-Sep-201717.5 KiB727588

arch_init.hH A D27-Sep-2017861 3529

arm-dis.cH A D27-Sep-2017157.1 KiB4,1373,336

arm-semi.cH A D27-Sep-201715.2 KiB489407

arm.ldH A D27-Sep-20174.6 KiB154153

async.cH A D27-Sep-20175.9 KiB217121

balloon.cH A D27-Sep-20174.3 KiB14982

balloon.hH A D27-Sep-2017894 3413

block-migration.cH A D27-Sep-201719.6 KiB733569

block-migration.hH A D27-Sep-2017504 248

block.cH A D27-Sep-201778.5 KiB2,9472,243

block.hH A D27-Sep-201711.2 KiB300245

block_int.hH A D27-Sep-20179.8 KiB266177

blockdev.cH A D27-Sep-201720.8 KiB801635

blockdev.hH A D27-Sep-20172.1 KiB7148

bswap.hH A D27-Sep-20175.3 KiB241196

bt-host.cH A D27-Sep-20175.2 KiB200140

bt-host.hH A D27-Sep-2017123 105

bt-vhci.cH A D27-Sep-20174.5 KiB169120

buffered_file.cH A D27-Sep-20176.4 KiB283208

buffered_file.hH A D27-Sep-2017916 3113

build.shH A D08-Aug-20192.4 KiB9573

cache-utils.cH A D27-Sep-20172.1 KiB9880

cache-utils.hH A D27-Sep-20171.7 KiB6349

check-qdict.cH A D27-Sep-20178.9 KiB402282

check-qfloat.cH A D27-Sep-20171.5 KiB7744

check-qint.cH A D27-Sep-20172.1 KiB11473

check-qjson.cH A D27-Sep-201719.9 KiB795644

check-qlist.cH A D27-Sep-20172.8 KiB15497

check-qstring.cH A D27-Sep-20172.8 KiB13589

cmd.cH A D27-Sep-201711.6 KiB611517

cmd.hH A D27-Sep-20172 KiB8046

compatfd.cH A D27-Sep-20172.3 KiB11880

compatfd.hH A D27-Sep-20171.5 KiB4424

config.hH A D27-Sep-201752 32

configureH A D24-Aug-201888.6 KiB3,5143,079

console.cH A D27-Sep-201746.8 KiB1,7081,490

console.hH A D27-Sep-201711.6 KiB382299

cpu-all.hH A D27-Sep-201723.6 KiB973719

cpu-common.hH A D27-Sep-20175.4 KiB145105

cpu-defs.hH A D27-Sep-20179.3 KiB228165

cpu-exec.cH A D27-Sep-201743.9 KiB1,2801,008

cpus.cH A D27-Sep-201722.1 KiB992768

cpus.hH A D27-Sep-2017510 2216

cris-dis.cH A D27-Sep-201780.3 KiB2,8941,947

cursor.cH A D27-Sep-20175.3 KiB211183

cursor_hidden.xpmH A D27-Sep-20171.3 KiB

cursor_left_ptr.xpmH A D27-Sep-20171.4 KiB

cutils.cH A D27-Sep-201710 KiB417304

def-helper.hH A D27-Sep-20177.2 KiB241174

device_tree.cH A D27-Sep-20172.6 KiB11176

device_tree.hH A D27-Sep-2017942 2710

dis-asm.hH A D27-Sep-201718.2 KiB477334

disas.cH A D27-Sep-201711.4 KiB433360

disas.hH A D27-Sep-20171.1 KiB4330

dma-helpers.cH A D27-Sep-20174.9 KiB189150

dma.hH A D27-Sep-20171.1 KiB4226

dyngen-exec.hH A D27-Sep-20172.4 KiB8552

elf.hH A D27-Sep-201744.8 KiB1,241999

envlist.cH A D27-Sep-20175.3 KiB247144

envlist.hH A D27-Sep-2017484 2317

exec-all.hH A D27-Sep-201711.4 KiB350231

exec.cH A D27-Sep-2017129.4 KiB4,4393,482

gdbstub.cH A D27-Sep-201768.3 KiB2,6962,308

gdbstub.hH A D27-Sep-20171.3 KiB4533

gen-icount.hH A D27-Sep-20171.2 KiB4937

hmp-commands.hxH A D27-Sep-201736.3 KiB1,3831,194

host-utils.cH A D27-Sep-20172.8 KiB10662

host-utils.hH A D27-Sep-20175.4 KiB237185

hpet.hH A D27-Sep-2017618 2316

hppa-dis.cH A D27-Sep-2017100.2 KiB2,8322,121

hppa.ldH A D27-Sep-20178 KiB214213

i386-dis.cH A D27-Sep-2017159.1 KiB6,5635,619

i386.ldH A D27-Sep-20174.7 KiB154153

ia64-dis.cH A D27-Sep-2017396.6 KiB10,6009,823

ia64.ldH A D27-Sep-20178.3 KiB210209

ia64intrin.hH A D27-Sep-20175.4 KiB151129

input.cH A D27-Sep-20177.7 KiB289211

ioport-user.cH A D27-Sep-20171.6 KiB6134

ioport.cH A D27-Sep-20178.8 KiB307226

ioport.hH A D27-Sep-20171.9 KiB5623

iorange.hH A D27-Sep-2017663 3124

iov.cH A D27-Sep-20171.6 KiB7146

iov.hH A D27-Sep-2017638 206

json-lexer.cH A D27-Sep-20177.7 KiB340272

json-lexer.hH A D27-Sep-2017977 5127

json-parser.cH A D27-Sep-201713.1 KiB578418

json-parser.hH A D27-Sep-2017421 236

json-streamer.cH A D27-Sep-20172.2 KiB8965

json-streamer.hH A D27-Sep-2017959 4019

kvm-all.cH A D27-Sep-201735.7 KiB1,4561,157

kvm-stub.cH A D27-Sep-20173.1 KiB194147

kvm-tpr-opt.cH A D27-Sep-20179.4 KiB381325

kvm.hH A D27-Sep-20176.5 KiB245162

libfdt_env.hH A D27-Sep-20171.1 KiB4119

linux-aio.cH A D27-Sep-20176.6 KiB262175

m68k-dis.cH A D27-Sep-2017211.6 KiB5,0523,847

m68k-semi.cH A D27-Sep-201712.2 KiB408347

m68k.ldH A D27-Sep-20175.9 KiB176175

manifestH A D27-Sep-20173.2 KiB7170

microblaze-dis.cH A D27-Sep-201762.1 KiB1,101879

migration-exec.cH A D27-Sep-20173.1 KiB146106

migration-fd.cH A D27-Sep-20172.8 KiB13194

migration-tcp.cH A D27-Sep-20174.6 KiB205152

migration-unix.cH A D27-Sep-20174.8 KiB216161

migration.cH A D27-Sep-201712.2 KiB483372

migration.hH A D27-Sep-20173.7 KiB14390

mips-dis.cH A D27-Sep-2017206.6 KiB4,8743,894

mips.ldH A D27-Sep-20178.4 KiB225224

module.cH A D27-Sep-20171.3 KiB8148

module.hH A D27-Sep-20171.1 KiB3918

monitor.cH A D27-Sep-2017143.5 KiB5,2624,499

monitor.hH A D27-Sep-20171.7 KiB6648

nbd.cH A D27-Sep-201716.4 KiB766563

nbd.hH A D27-Sep-20171.9 KiB6537

net-checksum.cH A D27-Sep-20172.2 KiB8758

net.cH A D27-Sep-201740.3 KiB1,5261,282

net.hH A D27-Sep-20175.9 KiB190153

notify.cH A D27-Sep-2017814 4021

notify.hH A D27-Sep-2017857 4420

os-posix.cH A D27-Sep-20178.5 KiB385295

os-win32.cH A D27-Sep-20177.1 KiB267194

osdep.cH A D27-Sep-20174 KiB170102

osdep.hH A D27-Sep-20173 KiB131103

oslib-posix.cH A D27-Sep-20174.2 KiB162111

oslib-win32.cH A D27-Sep-20173.3 KiB12273

path.cH A D27-Sep-20174.3 KiB166121

pci-ids.txtH A D27-Sep-2017883 3220

pflib.cH A D27-Sep-20176.6 KiB214165

pflib.hH A D27-Sep-2017496 217

poison.hH A D27-Sep-20171.3 KiB5140

posix-aio-compat.cH A D27-Sep-201715.8 KiB656491

ppc-dis.cH A D27-Sep-2017237 KiB5,4133,871

ppc.ldH A D27-Sep-20178.5 KiB228227

ppc64.ldH A D27-Sep-20177.8 KiB221220

qbool.cH A D27-Sep-20171.2 KiB6931

qbool.hH A D27-Sep-2017535 3012

qdict-test-data.txtH A D27-Sep-201788.4 KiB5,0004,999

qdict.cH A D27-Sep-201710.5 KiB457230

qdict.hH A D27-Sep-20172.1 KiB6844

qemu-aio.hH A D27-Sep-20172 KiB6016

qemu-barrier.hH A D27-Sep-20171.8 KiB6629

qemu-char.cH A D27-Sep-201767.1 KiB2,6302,218

qemu-char.hH A D27-Sep-20174.3 KiB124102

qemu-common.hH A D27-Sep-201710.4 KiB369279

qemu-config.cH A D27-Sep-201716.9 KiB678617

qemu-config.hH A D27-Sep-2017542 2014

qemu-doc.texiH A D27-Sep-201776.3 KiB2,7142,158

qemu-error.cH A D27-Sep-20174.3 KiB210127

qemu-error.hH A D27-Sep-20171.1 KiB4123

qemu-img-cmds.hxH A D27-Sep-20171.7 KiB6050

qemu-img.cH A D27-Sep-201741.7 KiB1,5291,255

qemu-img.texiH A D27-Sep-20178.6 KiB267198

qemu-io.cH A D27-Sep-201737.7 KiB1,8321,523

qemu-kvm-ia64.cH A D27-Sep-20172.6 KiB146113

qemu-kvm-x86.cH A D29-Sep-201818.4 KiB820662

qemu-kvm.cH A D27-Sep-201742.4 KiB1,8161,479

qemu-kvm.hH A D27-Sep-201722.3 KiB777297

qemu-lock.hH A D27-Sep-20175.8 KiB238175

qemu-log.hH A D27-Sep-20172.1 KiB9440

qemu-malloc.cH A D27-Sep-20172.9 KiB12182

qemu-nbd.cH A D27-Sep-201713.7 KiB500413

qemu-nbd.texiH A D27-Sep-20171.5 KiB6756

qemu-objects.hH A D27-Sep-2017506 2611

qemu-option.cH A D27-Sep-201724.2 KiB978727

qemu-option.hH A D27-Sep-20175.2 KiB13687

qemu-options.hH A D27-Sep-20171.5 KiB4212

qemu-options.hxH A D27-Sep-201780.6 KiB2,3731,994

qemu-os-posix.hH A D27-Sep-20171.8 KiB5524

qemu-os-win32.hH A D27-Sep-20172.2 KiB6424

qemu-queue.hH A D27-Sep-201722 KiB450282

qemu-sockets.cH A D27-Sep-201718.9 KiB676560

qemu-tech.texiH A D27-Sep-201722.3 KiB698513

qemu-thread.cH A D27-Sep-20173.8 KiB193143

qemu-thread.hH A D27-Sep-20171.2 KiB4536

qemu-timer-common.cH A D27-Sep-20172 KiB6431

qemu-timer.cH A D27-Sep-201739.7 KiB1,5071,081

qemu-timer.hH A D27-Sep-20178.2 KiB318226

qemu-tool.cH A D27-Sep-20171.6 KiB11477

qemu-x509.hH A D27-Sep-2017239 107

qemu.saslH A D27-Sep-20171.3 KiB3528

qemu_mdb.cH A D28-Aug-201923.3 KiB1,048776

qemu_socket.hH A D27-Sep-20171.7 KiB6345

qerror.cH A D27-Sep-201712 KiB464346

qerror.hH A D27-Sep-20175.4 KiB175112

qfloat.cH A D27-Sep-20171.2 KiB6931

qfloat.hH A D27-Sep-2017562 3012

qint.cH A D27-Sep-20171.2 KiB6831

qint.hH A D27-Sep-2017539 2912

qjson.cH A D27-Sep-20177.3 KiB295236

qjson.hH A D27-Sep-2017708 2911

qlist.cH A D27-Sep-20173 KiB15891

qlist.hH A D27-Sep-20171.3 KiB5433

qmp-commands.hxH A D27-Sep-201743 KiB1,7771,358

qobject.hH A D27-Sep-20172.7 KiB11352

qstring.cH A D27-Sep-20173.1 KiB14274

qstring.hH A D27-Sep-2017884 3619

range.hH A D27-Sep-2017867 3019

readline.cH A D27-Sep-201712.8 KiB477400

readline.hH A D27-Sep-20171.5 KiB5640

rules.makH A D02-Apr-20192.5 KiB8565

rwhandler.cH A D27-Sep-20172.6 KiB8879

rwhandler.hH A D27-Sep-2017981 2816

s390-dis.cH A D27-Sep-201793.3 KiB1,7971,483

s390.ldH A D27-Sep-20176.9 KiB202201

savevm.cH A D27-Sep-201754 KiB2,1731,737

sh4-dis.cH A D27-Sep-201782.7 KiB2,0781,562

simpletrace.cH A D27-Sep-20175.9 KiB256186

simpletrace.hH A D27-Sep-20171.3 KiB4125

softmmu-semi.hH A D27-Sep-20172 KiB7154

softmmu_defs.hH A D27-Sep-20171.1 KiB2319

softmmu_exec.hH A D27-Sep-20173 KiB154111

softmmu_header.hH A D27-Sep-20174.8 KiB199152

softmmu_template.hH A D27-Sep-201712 KiB333273

sparc-dis.cH A D27-Sep-2017171.7 KiB3,2762,392

sparc.ldH A D27-Sep-20174.7 KiB151150

sparc64.ldH A D27-Sep-20174.4 KiB139138

spice-qemu-char.cH A D27-Sep-20175.2 KiB191165

sysemu.hH A D27-Sep-20175.4 KiB199146

targphys.hH A D27-Sep-2017538 2214

tcg-runtime.cH A D27-Sep-20172.2 KiB8646

thunk.cH A D27-Sep-20178.2 KiB289232

thunk.hH A D27-Sep-20174.1 KiB162122

trace-eventsH A D27-Sep-201716.4 KiB266236

translate-all.cH A D27-Sep-20174.3 KiB168114

uboot_image.hH A D27-Sep-20175.9 KiB15970

usb-bsd.cH A D27-Sep-201717.4 KiB644498

usb-linux.cH A D27-Sep-201744.5 KiB1,7231,333

usb-stub.cH A D27-Sep-20171.8 KiB5316

version.rcH A D27-Sep-2017749 2927

vgafont.hH A D27-Sep-201793.3 KiB4,6124,098

vl.cH A D27-Sep-201789.3 KiB3,2112,737

x86_64.ldH A D27-Sep-20176.6 KiB183182

README.md

1<pre>
2  ___  _____ __  __ _   _
3 / _ \| ____|  \/  | | | |
4| | | |  _| | |\/| | | | |
5| |_| | |___| |  | | |_| |
6 \__\_\_____|_|  |_|\___/
7</pre>
8
9
10For full documentation on all the various options for QEMU please see the html docs.
11
12
13# BUILDING
14
15Preparing:
16
17Edit build.sh and change the --kerneldir option to point to the directory of
18the kvm repository and change the --prefix option to whatever you want.
19
20    $ ./build.sh
21    $ make install
22
23
24# USING
25
26Follow the qemu documentation for all of the various options available. The
27rest of this will be examples and specific pieces about how to use things with
28a VNIC and a ZVOL. The following is a sample configuration for qemu running a Linux VM.
29
30    $ /smartdc/bin/qemu-system-x86_64 \
31        -enable-kvm \
32        -nographic \
33        -drive file=smartdc.iso,media=cdrom,if=ide \
34        -boot order=cd \
35        -smp 4 \
36        -m 1024 \
37        -vnc 0.0.0.0:0 \
38        -net nic,vlan=0,name=net0,model=virtio,macaddr=90:b8:d0:c0:ff:ee\
39        -net vnic,vlan=0,name=net0,ifname=eth0,macaddr=90:b8:d0:c0:ff:ee,\
40             ip=10.88.88.50,netmask=255.255.255.0,gateway_ip=10.88.88.2,\
41             server_ip=10.88.88.200,dns_ip0=8.8.4.4,dns_ip1=8.8.4.4,\
42	     hostname=host1,lease_time=3600 \
43        -no-hpet \
44        -chardev socket,id=serial0,path=/tmp/vm.console,server,nowait \
45        -serial chardev:serial0 \
46        -drive file=/dev/zvol/rdsk/zones/rec-8,if=virtio,index=0
47
48
49# ZVOLs
50
51It is highly desirable to be able to give a virtual machine a zvol to use as a
52disk. This is accomplished via the -drive option. Simply pass the block device
53that corresponds to the zvol.
54
55To create a zvol use a command similar to:
56
57    $ zfs create -V 10g tank/vm-hdd
58
59
60# VNICs
61
62We have added an option to have a virtual machine's network interface card
63directly correspond to a Crossbow vnic on the system. The -net vnic has several
64mandatory arguments:
65
66* __vlan__ must be specified and correspond to a single -net nic line
67* __name__ must be specified and correspond to a single -net nic line
68* __macaddr__ must be specified if the MAC Address of the VNIC does not match
69  the MAC address on the -net nic line.
70* __ifname__ must be specified and correspond to the name of the crossbow vnic.
71
72To set up the crossbow vnic, simply create it. There is no need to plumb it.
73The device will be opened up in promiscuous mode.
74
75To create a vnic you'll want something akin to:
76
77    $ dladm create-vnic -l e1000g0 vnic0
78
79The -net vnic option also supports configuring networking on the virtual
80machine via dhcp. In this mode, qemu acts as a DHCP server for the virtual
81machine. To enable vnic dhcp, specify the following arguments:
82
83* __ip__ (eg: 192.168.0.2) must be specified in order to enable dhcp
84* __netmask__ (eg: 255.255.255.0) must be specified
85* __gateway_ip__ (eg: 192.168.0.1) must be specified
86* __server_ip__ (eg: 192.168.0.3) is optional. This allows specifying the
87  IP address of qemu's DHCP server.
88* __dns_ip__ (eg: 8.8.4.4) is optional, and allows specifying the DNS
89  server the virtual machine will use.  The default value is 8.8.8.8.
90* __dns_ip0__, __dns_ip1__, __dns_ip2__, and __dns_ip3__ are optional,
91  and allow specifying a list of DNS servers, rather than just one.
92  These options override the dns_ip option.
93* __hostname__ (eg: myhostname) is optional. This defaults to no hostname.
94* __lease_time__ (eg: 3600) is optional, and allows specifying the DHCP
95  lease time in seconds.  The default value is 86400 (or 1 day).
96
97The following is a sample -net vnic line for running with DHCP:
98
99    -net vnic,vlan=0,name=net0,ifname=eth0,macaddr=90:b8:d0:c0:ff:ee, \
100        ip=10.88.88.50,netmask=255.255.255.0,gateway_ip=10.88.88.2, \
101        server_ip=10.88.88.200,dns_ip=8.8.4.4,hostname=host1,lease_time=3600
102
103

README.qemu

1Read the documentation in qemu-doc.html.
2
3Fabrice Bellard.
4