Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

qemu-kvm for illumos-kvm

Fetching latest commit…

Cannot retrieve the latest commit at this time

QMP Initial commit of d32e8d0 from qemu-kvm
audio Initial commit of d32e8d0 from qemu-kvm
bin Initial commit of d32e8d0 from qemu-kvm
block HVM-641 fix regression introduced between qemu 0.12.5 and 0.13.0 whic…
bsd-user Initial commit of d32e8d0 from qemu-kvm
compat Initial commit of d32e8d0 from qemu-kvm
darwin-user Initial commit of d32e8d0 from qemu-kvm
default-configs Initial commit of d32e8d0 from qemu-kvm
docs Initial commit of d32e8d0 from qemu-kvm
etc Initial commit of d32e8d0 from qemu-kvm
fpu Initial commit of d32e8d0 from qemu-kvm
fsdev Initial commit of d32e8d0 from qemu-kvm
gdb-xml Initial commit of d32e8d0 from qemu-kvm
hw
kvm Initial commit of d32e8d0 from qemu-kvm
linux-user Initial commit of d32e8d0 from qemu-kvm
net
pc-bios HVM-741 add SmartOS gPXE patch that was applied for OS-1153
scripts Initial commit of d32e8d0 from qemu-kvm
share Initial commit of d32e8d0 from qemu-kvm
slirp Initial commit of d32e8d0 from qemu-kvm
sysconfigs Initial commit of d32e8d0 from qemu-kvm
target-alpha Initial commit of d32e8d0 from qemu-kvm
target-arm Initial commit of d32e8d0 from qemu-kvm
target-cris Initial commit of d32e8d0 from qemu-kvm
target-i386 HVM-588 Make sure copyright is updated in kvm-cmd
target-ia64 Initial commit of d32e8d0 from qemu-kvm
target-m68k Initial commit of d32e8d0 from qemu-kvm
target-microblaze Initial commit of d32e8d0 from qemu-kvm
target-mips Initial commit of d32e8d0 from qemu-kvm
target-ppc Initial commit of d32e8d0 from qemu-kvm
target-s390x Initial commit of d32e8d0 from qemu-kvm
target-sh4 Initial commit of d32e8d0 from qemu-kvm
target-sparc Initial commit of d32e8d0 from qemu-kvm
tcg Initial commit of d32e8d0 from qemu-kvm
tests Initial commit of d32e8d0 from qemu-kvm
ui Initial commit of d32e8d0 from qemu-kvm
.gitignore [HVM-489] build kvm-cmd with png support for VNC.
.gitmodules Initial commit of d32e8d0 from qemu-kvm
CODING_STYLE Initial commit of d32e8d0 from qemu-kvm
COPYING Initial commit of d32e8d0 from qemu-kvm
COPYING.LIB Initial commit of d32e8d0 from qemu-kvm
Changelog Initial commit of d32e8d0 from qemu-kvm
HACKING Initial commit of d32e8d0 from qemu-kvm
LICENSE Initial commit of d32e8d0 from qemu-kvm
MAINTAINERS Initial commit of d32e8d0 from qemu-kvm
Makefile
Makefile.dis Initial commit of d32e8d0 from qemu-kvm
Makefile.hw Initial commit of d32e8d0 from qemu-kvm
Makefile.joyent
Makefile.objs
Makefile.target
Makefile.user Initial commit of d32e8d0 from qemu-kvm
README.md [HVM-636] Add support for more than one DHCP server
README.qemu HVM-601 Swap around kvm-cmd-14 READMEs
TODO Initial commit of d32e8d0 from qemu-kvm
VERSION Initial commit of d32e8d0 from qemu-kvm
a.out.h Initial commit of d32e8d0 from qemu-kvm
acl.c Initial commit of d32e8d0 from qemu-kvm
acl.h Initial commit of d32e8d0 from qemu-kvm
aes.c Initial commit of d32e8d0 from qemu-kvm
aes.h Initial commit of d32e8d0 from qemu-kvm
aio.c Initial commit of d32e8d0 from qemu-kvm
alpha-dis.c Initial commit of d32e8d0 from qemu-kvm
alpha.ld Initial commit of d32e8d0 from qemu-kvm
arch_init.c Initial commit of d32e8d0 from qemu-kvm
arch_init.h Initial commit of d32e8d0 from qemu-kvm
arm-dis.c Initial commit of d32e8d0 from qemu-kvm
arm-semi.c Initial commit of d32e8d0 from qemu-kvm
arm.ld Initial commit of d32e8d0 from qemu-kvm
async.c Initial commit of d32e8d0 from qemu-kvm
balloon.c Initial commit of d32e8d0 from qemu-kvm
balloon.h Initial commit of d32e8d0 from qemu-kvm
block-migration.c Initial commit of d32e8d0 from qemu-kvm
block-migration.h Initial commit of d32e8d0 from qemu-kvm
block.c Initial commit of d32e8d0 from qemu-kvm
block.h Initial commit of d32e8d0 from qemu-kvm
block_int.h Initial commit of d32e8d0 from qemu-kvm
blockdev.c Initial commit of d32e8d0 from qemu-kvm
blockdev.h Initial commit of d32e8d0 from qemu-kvm
bswap.h Initial commit of d32e8d0 from qemu-kvm
bt-host.c Initial commit of d32e8d0 from qemu-kvm
bt-host.h Initial commit of d32e8d0 from qemu-kvm
bt-vhci.c Initial commit of d32e8d0 from qemu-kvm
buffered_file.c Initial commit of d32e8d0 from qemu-kvm
buffered_file.h Initial commit of d32e8d0 from qemu-kvm
build.sh
cache-utils.c Initial commit of d32e8d0 from qemu-kvm
cache-utils.h Initial commit of d32e8d0 from qemu-kvm
check-qdict.c Initial commit of d32e8d0 from qemu-kvm
check-qfloat.c Initial commit of d32e8d0 from qemu-kvm
check-qint.c Initial commit of d32e8d0 from qemu-kvm
check-qjson.c Initial commit of d32e8d0 from qemu-kvm
check-qlist.c Initial commit of d32e8d0 from qemu-kvm
check-qstring.c Initial commit of d32e8d0 from qemu-kvm
cmd.c Initial commit of d32e8d0 from qemu-kvm
cmd.h Initial commit of d32e8d0 from qemu-kvm
compatfd.c Initial commit of d32e8d0 from qemu-kvm
compatfd.h Initial commit of d32e8d0 from qemu-kvm
config.h Initial commit of d32e8d0 from qemu-kvm
configure HVM-588 Make sure copyright is updated in kvm-cmd
console.c Initial commit of d32e8d0 from qemu-kvm
console.h Initial commit of d32e8d0 from qemu-kvm
cpu-all.h Initial commit of d32e8d0 from qemu-kvm
cpu-common.h Initial commit of d32e8d0 from qemu-kvm
cpu-defs.h Initial commit of d32e8d0 from qemu-kvm
cpu-exec.c Initial commit of d32e8d0 from qemu-kvm
cpus.c Initial commit of d32e8d0 from qemu-kvm
cpus.h Initial commit of d32e8d0 from qemu-kvm
cris-dis.c Initial commit of d32e8d0 from qemu-kvm
ctf.sh
cursor.c Initial commit of d32e8d0 from qemu-kvm
cursor_hidden.xpm Initial commit of d32e8d0 from qemu-kvm
cursor_left_ptr.xpm Initial commit of d32e8d0 from qemu-kvm
cutils.c Initial commit of d32e8d0 from qemu-kvm
def-helper.h Initial commit of d32e8d0 from qemu-kvm
device_tree.c Initial commit of d32e8d0 from qemu-kvm
device_tree.h Initial commit of d32e8d0 from qemu-kvm
dis-asm.h Initial commit of d32e8d0 from qemu-kvm
disas.c Initial commit of d32e8d0 from qemu-kvm
disas.h Initial commit of d32e8d0 from qemu-kvm
dma-helpers.c Initial commit of d32e8d0 from qemu-kvm
dma.h Initial commit of d32e8d0 from qemu-kvm
dyngen-exec.h Initial commit of d32e8d0 from qemu-kvm
elf.h Initial commit of d32e8d0 from qemu-kvm
envlist.c Initial commit of d32e8d0 from qemu-kvm
envlist.h Initial commit of d32e8d0 from qemu-kvm
exec-all.h Initial commit of d32e8d0 from qemu-kvm
exec.c HVM-671 qemu cannot start due to a failing mlock()
gdbstub.c Initial commit of d32e8d0 from qemu-kvm
gdbstub.h Initial commit of d32e8d0 from qemu-kvm
gen-icount.h Initial commit of d32e8d0 from qemu-kvm
hmp-commands.hx Initial commit of d32e8d0 from qemu-kvm
host-utils.c Initial commit of d32e8d0 from qemu-kvm
host-utils.h Initial commit of d32e8d0 from qemu-kvm
hpet.h Initial commit of d32e8d0 from qemu-kvm
hppa-dis.c Initial commit of d32e8d0 from qemu-kvm
hppa.ld Initial commit of d32e8d0 from qemu-kvm
i386-dis.c Initial commit of d32e8d0 from qemu-kvm
i386.ld Initial commit of d32e8d0 from qemu-kvm
ia64-dis.c Initial commit of d32e8d0 from qemu-kvm
ia64.ld Initial commit of d32e8d0 from qemu-kvm
ia64intrin.h Initial commit of d32e8d0 from qemu-kvm
input.c Initial commit of d32e8d0 from qemu-kvm
ioport-user.c Initial commit of d32e8d0 from qemu-kvm
ioport.c Initial commit of d32e8d0 from qemu-kvm
ioport.h Initial commit of d32e8d0 from qemu-kvm
iorange.h Initial commit of d32e8d0 from qemu-kvm
iov.c Initial commit of d32e8d0 from qemu-kvm
iov.h Initial commit of d32e8d0 from qemu-kvm
json-lexer.c Initial commit of d32e8d0 from qemu-kvm
json-lexer.h Initial commit of d32e8d0 from qemu-kvm
json-parser.c Initial commit of d32e8d0 from qemu-kvm
json-parser.h Initial commit of d32e8d0 from qemu-kvm
json-streamer.c Initial commit of d32e8d0 from qemu-kvm
json-streamer.h Initial commit of d32e8d0 from qemu-kvm
kvm-all.c HVM-588 Make sure copyright is updated in kvm-cmd
kvm-stub.c Initial commit of d32e8d0 from qemu-kvm
kvm-tpr-opt.c Initial commit of d32e8d0 from qemu-kvm
kvm.h HVM-588 Make sure copyright is updated in kvm-cmd
libfdt_env.h Initial commit of d32e8d0 from qemu-kvm
linux-aio.c Initial commit of d32e8d0 from qemu-kvm
m68k-dis.c Initial commit of d32e8d0 from qemu-kvm
m68k-semi.c Initial commit of d32e8d0 from qemu-kvm
m68k.ld Initial commit of d32e8d0 from qemu-kvm
manifest
microblaze-dis.c Initial commit of d32e8d0 from qemu-kvm
migration-exec.c Initial commit of d32e8d0 from qemu-kvm
migration-fd.c Initial commit of d32e8d0 from qemu-kvm
migration-tcp.c Initial commit of d32e8d0 from qemu-kvm
migration-unix.c Initial commit of d32e8d0 from qemu-kvm
migration.c Initial commit of d32e8d0 from qemu-kvm
migration.h Initial commit of d32e8d0 from qemu-kvm
mips-dis.c Initial commit of d32e8d0 from qemu-kvm
mips.ld Initial commit of d32e8d0 from qemu-kvm
module.c Initial commit of d32e8d0 from qemu-kvm
module.h Initial commit of d32e8d0 from qemu-kvm
monitor.c
monitor.h Initial commit of d32e8d0 from qemu-kvm
nbd.c Initial commit of d32e8d0 from qemu-kvm
nbd.h Initial commit of d32e8d0 from qemu-kvm
net-checksum.c Initial commit of d32e8d0 from qemu-kvm
net.c [HVM-636] Add support for more than one DHCP server
net.h HVM-588 Make sure copyright is updated in kvm-cmd
notify.c Initial commit of d32e8d0 from qemu-kvm
notify.h Initial commit of d32e8d0 from qemu-kvm
os-posix.c Initial commit of d32e8d0 from qemu-kvm
os-win32.c Initial commit of d32e8d0 from qemu-kvm
osdep.c Initial commit of d32e8d0 from qemu-kvm
osdep.h Initial commit of d32e8d0 from qemu-kvm
oslib-posix.c Initial commit of d32e8d0 from qemu-kvm
oslib-win32.c Initial commit of d32e8d0 from qemu-kvm
path.c Initial commit of d32e8d0 from qemu-kvm
pci-ids.txt Initial commit of d32e8d0 from qemu-kvm
pflib.c Initial commit of d32e8d0 from qemu-kvm
pflib.h Initial commit of d32e8d0 from qemu-kvm
poison.h Initial commit of d32e8d0 from qemu-kvm
posix-aio-compat.c Initial commit of d32e8d0 from qemu-kvm
ppc-dis.c Initial commit of d32e8d0 from qemu-kvm
ppc.ld Initial commit of d32e8d0 from qemu-kvm
ppc64.ld Initial commit of d32e8d0 from qemu-kvm
qbool.c Initial commit of d32e8d0 from qemu-kvm
qbool.h Initial commit of d32e8d0 from qemu-kvm
qdict-test-data.txt Initial commit of d32e8d0 from qemu-kvm
qdict.c Initial commit of d32e8d0 from qemu-kvm
qdict.h Initial commit of d32e8d0 from qemu-kvm
qemu-aio.h Initial commit of d32e8d0 from qemu-kvm
qemu-barrier.h
qemu-char.c Initial commit of d32e8d0 from qemu-kvm
qemu-char.h Initial commit of d32e8d0 from qemu-kvm
qemu-common.h Initial commit of d32e8d0 from qemu-kvm
qemu-config.c Initial commit of d32e8d0 from qemu-kvm
qemu-config.h Initial commit of d32e8d0 from qemu-kvm
qemu-doc.texi Initial commit of d32e8d0 from qemu-kvm
qemu-error.c Initial commit of d32e8d0 from qemu-kvm
qemu-error.h Initial commit of d32e8d0 from qemu-kvm
qemu-img-cmds.hx Initial commit of d32e8d0 from qemu-kvm
qemu-img.c Initial commit of d32e8d0 from qemu-kvm
qemu-img.texi Initial commit of d32e8d0 from qemu-kvm
qemu-io.c Initial commit of d32e8d0 from qemu-kvm
qemu-kvm-ia64.c Initial commit of d32e8d0 from qemu-kvm
qemu-kvm-x86.c HVM-588 Make sure copyright is updated in kvm-cmd
qemu-kvm.c HVM-588 Make sure copyright is updated in kvm-cmd
qemu-kvm.h HVM-588 Make sure copyright is updated in kvm-cmd
qemu-lock.h Initial commit of d32e8d0 from qemu-kvm
qemu-log.h Initial commit of d32e8d0 from qemu-kvm
qemu-malloc.c HVM-588 Make sure copyright is updated in kvm-cmd
qemu-nbd.c Initial commit of d32e8d0 from qemu-kvm
qemu-nbd.texi Initial commit of d32e8d0 from qemu-kvm
qemu-objects.h Initial commit of d32e8d0 from qemu-kvm
qemu-option.c Initial commit of d32e8d0 from qemu-kvm
qemu-option.h Initial commit of d32e8d0 from qemu-kvm
qemu-options.h Initial commit of d32e8d0 from qemu-kvm
qemu-options.hx Initial commit of d32e8d0 from qemu-kvm
qemu-os-posix.h Initial commit of d32e8d0 from qemu-kvm
qemu-os-win32.h Initial commit of d32e8d0 from qemu-kvm
qemu-queue.h Initial commit of d32e8d0 from qemu-kvm
qemu-sockets.c Initial commit of d32e8d0 from qemu-kvm
qemu-tech.texi Initial commit of d32e8d0 from qemu-kvm
qemu-thread.c Initial commit of d32e8d0 from qemu-kvm
qemu-thread.h Initial commit of d32e8d0 from qemu-kvm
qemu-timer-common.c HVM-711 need an interval timer-based alarm timer backend
qemu-timer.c HVM-717 multiticks error message mistakenly implies spasmodic contrac…
qemu-timer.h HVM-711 need an interval timer-based alarm timer backend
qemu-tool.c Initial commit of d32e8d0 from qemu-kvm
qemu-x509.h Initial commit of d32e8d0 from qemu-kvm
qemu.sasl Initial commit of d32e8d0 from qemu-kvm
qemu_mdb.c
qemu_socket.h Initial commit of d32e8d0 from qemu-kvm
qerror.c Initial commit of d32e8d0 from qemu-kvm
qerror.h Initial commit of d32e8d0 from qemu-kvm
qfloat.c Initial commit of d32e8d0 from qemu-kvm
qfloat.h Initial commit of d32e8d0 from qemu-kvm
qint.c Initial commit of d32e8d0 from qemu-kvm
qint.h Initial commit of d32e8d0 from qemu-kvm
qjson.c Initial commit of d32e8d0 from qemu-kvm
qjson.h Initial commit of d32e8d0 from qemu-kvm
qlist.c Initial commit of d32e8d0 from qemu-kvm
qlist.h Initial commit of d32e8d0 from qemu-kvm
qmp-commands.hx Initial commit of d32e8d0 from qemu-kvm
qobject.h Initial commit of d32e8d0 from qemu-kvm
qstring.c Initial commit of d32e8d0 from qemu-kvm
qstring.h Initial commit of d32e8d0 from qemu-kvm
range.h Initial commit of d32e8d0 from qemu-kvm
readline.c Initial commit of d32e8d0 from qemu-kvm
readline.h Initial commit of d32e8d0 from qemu-kvm
rules.mak
rwhandler.c Initial commit of d32e8d0 from qemu-kvm
rwhandler.h Initial commit of d32e8d0 from qemu-kvm
s390-dis.c Initial commit of d32e8d0 from qemu-kvm
s390.ld Initial commit of d32e8d0 from qemu-kvm
savevm.c Initial commit of d32e8d0 from qemu-kvm
sh4-dis.c Initial commit of d32e8d0 from qemu-kvm
simpletrace.c Initial commit of d32e8d0 from qemu-kvm
simpletrace.h Initial commit of d32e8d0 from qemu-kvm
softmmu-semi.h Initial commit of d32e8d0 from qemu-kvm
softmmu_defs.h Initial commit of d32e8d0 from qemu-kvm
softmmu_exec.h Initial commit of d32e8d0 from qemu-kvm
softmmu_header.h Initial commit of d32e8d0 from qemu-kvm
softmmu_template.h Initial commit of d32e8d0 from qemu-kvm
sparc-dis.c Initial commit of d32e8d0 from qemu-kvm
sparc.ld Initial commit of d32e8d0 from qemu-kvm
sparc64.ld Initial commit of d32e8d0 from qemu-kvm
spice-qemu-char.c Initial commit of d32e8d0 from qemu-kvm
sysemu.h
targphys.h Initial commit of d32e8d0 from qemu-kvm
tcg-runtime.c Initial commit of d32e8d0 from qemu-kvm
thunk.c Initial commit of d32e8d0 from qemu-kvm
thunk.h Initial commit of d32e8d0 from qemu-kvm
trace-events HVM-711 need an interval timer-based alarm timer backend
translate-all.c Initial commit of d32e8d0 from qemu-kvm
uboot_image.h Initial commit of d32e8d0 from qemu-kvm
usb-bsd.c Initial commit of d32e8d0 from qemu-kvm
usb-linux.c Initial commit of d32e8d0 from qemu-kvm
usb-stub.c Initial commit of d32e8d0 from qemu-kvm
version.rc Initial commit of d32e8d0 from qemu-kvm
vgafont.h Initial commit of d32e8d0 from qemu-kvm
vl.c
x86_64.ld Initial commit of d32e8d0 from qemu-kvm
README.md
  ___  _____ __  __ _   _
 / _ \| ____|  \/  | | | |
| | | |  _| | |\/| | | | |
| |_| | |___| |  | | |_| |
 \__\_\_____|_|  |_|\___/

For full documentation on all the various options for QEMU please see the html docs.

BUILDING

Preparing:

Edit build.sh and change the --kerneldir option to point to the directory of the kvm repository and change the --prefix option to whatever you want.

$ ./build.sh
$ make install

USING

Follow the qemu documentation for all of the various options available. The rest of this will be examples and specific pieces about how to use things with a VNIC and a ZVOL. The following is a sample configuration for qemu running a Linux VM.

$ /smartdc/bin/qemu-system-x86_64 \
    -enable-kvm \
    -nographic \
    -drive file=smartdc.iso,media=cdrom,if=ide \
    -boot order=cd \
    -smp 4 \
    -m 1024 \
    -vnc 0.0.0.0:0 \
    -net nic,vlan=0,name=net0,model=virtio,macaddr=90:b8:d0:c0:ff:ee\
    -net vnic,vlan=0,name=net0,ifname=eth0,macaddr=90:b8:d0:c0:ff:ee,\
         ip=10.88.88.50,netmask=255.255.255.0,gateway_ip=10.88.88.2,\
         server_ip=10.88.88.200,dns_ip0=8.8.4.4,dns_ip1=8.8.4.4,\
     hostname=host1,lease_time=3600 \
    -no-hpet \
    -chardev socket,id=serial0,path=/tmp/vm.console,server,nowait \
    -serial chardev:serial0 \
    -drive file=/dev/zvol/rdsk/zones/rec-8,if=virtio,index=0

ZVOLs

It is highly desirable to be able to give a virtual machine a zvol to use as a disk. This is accomplished via the -drive option. Simply pass the block device that corresponds to the zvol.

To create a zvol use a command similar to:

$ zfs create -V 10g tank/vm-hdd

VNICs

We have added an option to have a virtual machine's network interface card directly correspond to a Crossbow vnic on the system. The -net vnic has several mandatory arguments:

  • vlan must be specified and correspond to a single -net nic line
  • name must be specified and correspond to a single -net nic line
  • macaddr must be specified if the MAC Address of the VNIC does not match the MAC address on the -net nic line.
  • ifname must be specified and correspond to the name of the crossbow vnic.

To set up the crossbow vnic, simply create it. There is no need to plumb it. The device will be opened up in promiscuous mode.

To create a vnic you'll want something akin to:

$ dladm create-vnic -l e1000g0 vnic0

The -net vnic option also supports configuring networking on the virtual machine via dhcp. In this mode, qemu acts as a DHCP server for the virtual machine. To enable vnic dhcp, specify the following arguments:

  • ip (eg: 192.168.0.2) must be specified in order to enable dhcp
  • netmask (eg: 255.255.255.0) must be specified
  • gateway_ip (eg: 192.168.0.1) must be specified
  • server_ip (eg: 192.168.0.3) is optional. This allows specifying the IP address of qemu's DHCP server.
  • dns_ip (eg: 8.8.4.4) is optional, and allows specifying the DNS server the virtual machine will use. The default value is 8.8.8.8.
  • dns_ip0, dns_ip1, dns_ip2, and dns_ip3 are optional, and allow specifying a list of DNS servers, rather than just one. These options override the dns_ip option.
  • hostname (eg: myhostname) is optional. This defaults to no hostname.
  • lease_time (eg: 3600) is optional, and allows specifying the DHCP lease time in seconds. The default value is 86400 (or 1 day).

The following is a sample -net vnic line for running with DHCP:

-net vnic,vlan=0,name=net0,ifname=eth0,macaddr=90:b8:d0:c0:ff:ee, \
    ip=10.88.88.50,netmask=255.255.255.0,gateway_ip=10.88.88.2, \
    server_ip=10.88.88.200,dns_ip=8.8.4.4,hostname=host1,lease_time=3600
Something went wrong with that request. Please try again.