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…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 QMP
Octocat-spinner-32 audio
Octocat-spinner-32 bin Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 block
Octocat-spinner-32 bsd-user
Octocat-spinner-32 compat
Octocat-spinner-32 darwin-user Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 default-configs
Octocat-spinner-32 docs
Octocat-spinner-32 etc Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 fpu Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 fsdev
Octocat-spinner-32 gdb-xml Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 hw HVM-763 uhci timer does not properly set expire time January 10, 2013
Octocat-spinner-32 kvm Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 linux-user Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 net
Octocat-spinner-32 pc-bios
Octocat-spinner-32 scripts
Octocat-spinner-32 share
Octocat-spinner-32 slirp Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 sysconfigs Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 target-alpha Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 target-arm
Octocat-spinner-32 target-cris Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 target-i386
Octocat-spinner-32 target-ia64
Octocat-spinner-32 target-m68k Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 target-microblaze
Octocat-spinner-32 target-mips
Octocat-spinner-32 target-ppc
Octocat-spinner-32 target-s390x Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 target-sh4
Octocat-spinner-32 target-sparc Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 tcg
Octocat-spinner-32 tests Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 ui
Octocat-spinner-32 .gitignore [HVM-489] build kvm-cmd with png support for VNC. August 02, 2011
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 CODING_STYLE
Octocat-spinner-32 COPYING Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 COPYING.LIB Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 Changelog Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 HACKING
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MAINTAINERS Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 Makefile
Octocat-spinner-32 Makefile.dis Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 Makefile.hw
Octocat-spinner-32 Makefile.joyent
Octocat-spinner-32 Makefile.objs
Octocat-spinner-32 Makefile.target
Octocat-spinner-32 Makefile.user
Octocat-spinner-32 README.md
Octocat-spinner-32 README.qemu
Octocat-spinner-32 TODO Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 VERSION
Octocat-spinner-32 a.out.h
Octocat-spinner-32 acl.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 acl.h
Octocat-spinner-32 aes.c
Octocat-spinner-32 aes.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 aio.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 alpha-dis.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 alpha.ld
Octocat-spinner-32 arch_init.c
Octocat-spinner-32 arch_init.h
Octocat-spinner-32 arm-dis.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 arm-semi.c
Octocat-spinner-32 arm.ld
Octocat-spinner-32 async.c
Octocat-spinner-32 balloon.c
Octocat-spinner-32 balloon.h
Octocat-spinner-32 block-migration.c
Octocat-spinner-32 block-migration.h
Octocat-spinner-32 block.c
Octocat-spinner-32 block.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 block_int.h
Octocat-spinner-32 blockdev.c
Octocat-spinner-32 blockdev.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 bswap.h
Octocat-spinner-32 bt-host.c
Octocat-spinner-32 bt-host.h
Octocat-spinner-32 bt-vhci.c
Octocat-spinner-32 buffered_file.c
Octocat-spinner-32 buffered_file.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 build.sh
Octocat-spinner-32 cache-utils.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 cache-utils.h
Octocat-spinner-32 check-qdict.c
Octocat-spinner-32 check-qfloat.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 check-qint.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 check-qjson.c
Octocat-spinner-32 check-qlist.c
Octocat-spinner-32 check-qstring.c
Octocat-spinner-32 cmd.c
Octocat-spinner-32 cmd.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 compatfd.c
Octocat-spinner-32 compatfd.h
Octocat-spinner-32 config.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 configure
Octocat-spinner-32 console.c
Octocat-spinner-32 console.h
Octocat-spinner-32 cpu-all.h
Octocat-spinner-32 cpu-common.h
Octocat-spinner-32 cpu-defs.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 cpu-exec.c
Octocat-spinner-32 cpus.c
Octocat-spinner-32 cpus.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 cris-dis.c
Octocat-spinner-32 ctf.sh HVM-785 kvm-cmd build should use CTFMERGE and CTFCONVERT October 25, 2013
Octocat-spinner-32 cursor.c
Octocat-spinner-32 cursor_hidden.xpm Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 cursor_left_ptr.xpm Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 cutils.c
Octocat-spinner-32 def-helper.h
Octocat-spinner-32 device_tree.c
Octocat-spinner-32 device_tree.h
Octocat-spinner-32 dis-asm.h
Octocat-spinner-32 disas.c
Octocat-spinner-32 disas.h
Octocat-spinner-32 dma-helpers.c
Octocat-spinner-32 dma.h
Octocat-spinner-32 dyngen-exec.h
Octocat-spinner-32 elf.h
Octocat-spinner-32 envlist.c
Octocat-spinner-32 envlist.h
Octocat-spinner-32 exec-all.h
Octocat-spinner-32 exec.c
Octocat-spinner-32 gdbstub.c
Octocat-spinner-32 gdbstub.h
Octocat-spinner-32 gen-icount.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 hmp-commands.hx Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 host-utils.c
Octocat-spinner-32 host-utils.h
Octocat-spinner-32 hpet.h
Octocat-spinner-32 hppa-dis.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 hppa.ld
Octocat-spinner-32 i386-dis.c
Octocat-spinner-32 i386.ld Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 ia64-dis.c
Octocat-spinner-32 ia64.ld
Octocat-spinner-32 ia64intrin.h
Octocat-spinner-32 input.c
Octocat-spinner-32 ioport-user.c
Octocat-spinner-32 ioport.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 ioport.h
Octocat-spinner-32 iorange.h
Octocat-spinner-32 iov.c
Octocat-spinner-32 iov.h
Octocat-spinner-32 json-lexer.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 json-lexer.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 json-parser.c
Octocat-spinner-32 json-parser.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 json-streamer.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 json-streamer.h
Octocat-spinner-32 kvm-all.c HVM-588 Make sure copyright is updated in kvm-cmd August 09, 2011
Octocat-spinner-32 kvm-stub.c
Octocat-spinner-32 kvm-tpr-opt.c
Octocat-spinner-32 kvm.h
Octocat-spinner-32 libfdt_env.h
Octocat-spinner-32 linux-aio.c
Octocat-spinner-32 m68k-dis.c
Octocat-spinner-32 m68k-semi.c
Octocat-spinner-32 m68k.ld Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 manifest
Octocat-spinner-32 microblaze-dis.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 migration-exec.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 migration-fd.c
Octocat-spinner-32 migration-tcp.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 migration-unix.c
Octocat-spinner-32 migration.c
Octocat-spinner-32 migration.h
Octocat-spinner-32 mips-dis.c
Octocat-spinner-32 mips.ld Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 module.c
Octocat-spinner-32 module.h
Octocat-spinner-32 monitor.c
Octocat-spinner-32 monitor.h
Octocat-spinner-32 nbd.c
Octocat-spinner-32 nbd.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 net-checksum.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 net.c
Octocat-spinner-32 net.h
Octocat-spinner-32 notify.c
Octocat-spinner-32 notify.h
Octocat-spinner-32 os-posix.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 os-win32.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 osdep.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 osdep.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 oslib-posix.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 oslib-win32.c
Octocat-spinner-32 path.c
Octocat-spinner-32 pci-ids.txt Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 pflib.c
Octocat-spinner-32 pflib.h
Octocat-spinner-32 poison.h
Octocat-spinner-32 posix-aio-compat.c
Octocat-spinner-32 ppc-dis.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 ppc.ld
Octocat-spinner-32 ppc64.ld
Octocat-spinner-32 qbool.c
Octocat-spinner-32 qbool.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qdict-test-data.txt
Octocat-spinner-32 qdict.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qdict.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-aio.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-barrier.h HVM-750 guest virtio drivers are racy with respect to interrupts September 24, 2012
Octocat-spinner-32 qemu-char.c
Octocat-spinner-32 qemu-char.h
Octocat-spinner-32 qemu-common.h
Octocat-spinner-32 qemu-config.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-config.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-doc.texi Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-error.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-error.h
Octocat-spinner-32 qemu-img-cmds.hx
Octocat-spinner-32 qemu-img.c
Octocat-spinner-32 qemu-img.texi
Octocat-spinner-32 qemu-io.c
Octocat-spinner-32 qemu-kvm-ia64.c
Octocat-spinner-32 qemu-kvm-x86.c
Octocat-spinner-32 qemu-kvm.c
Octocat-spinner-32 qemu-kvm.h HVM-588 Make sure copyright is updated in kvm-cmd August 09, 2011
Octocat-spinner-32 qemu-lock.h
Octocat-spinner-32 qemu-log.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-malloc.c
Octocat-spinner-32 qemu-nbd.c
Octocat-spinner-32 qemu-nbd.texi Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-objects.h
Octocat-spinner-32 qemu-option.c
Octocat-spinner-32 qemu-option.h
Octocat-spinner-32 qemu-options.h
Octocat-spinner-32 qemu-options.hx
Octocat-spinner-32 qemu-os-posix.h
Octocat-spinner-32 qemu-os-win32.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-queue.h
Octocat-spinner-32 qemu-sockets.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-tech.texi
Octocat-spinner-32 qemu-thread.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-thread.h
Octocat-spinner-32 qemu-timer-common.c HVM-711 need an interval timer-based alarm timer backend January 03, 2012
Octocat-spinner-32 qemu-timer.c HVM-717 multiticks error message mistakenly implies spasmodic contrac… February 28, 2012
Octocat-spinner-32 qemu-timer.h
Octocat-spinner-32 qemu-tool.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu-x509.h
Octocat-spinner-32 qemu.sasl Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qemu_mdb.c
Octocat-spinner-32 qemu_socket.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qerror.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qerror.h
Octocat-spinner-32 qfloat.c
Octocat-spinner-32 qfloat.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qint.c
Octocat-spinner-32 qint.h
Octocat-spinner-32 qjson.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qjson.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qlist.c
Octocat-spinner-32 qlist.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qmp-commands.hx
Octocat-spinner-32 qobject.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 qstring.c
Octocat-spinner-32 qstring.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 range.h
Octocat-spinner-32 readline.c
Octocat-spinner-32 readline.h
Octocat-spinner-32 rules.mak
Octocat-spinner-32 rwhandler.c
Octocat-spinner-32 rwhandler.h
Octocat-spinner-32 s390-dis.c
Octocat-spinner-32 s390.ld Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 savevm.c
Octocat-spinner-32 sh4-dis.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 simpletrace.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 simpletrace.h
Octocat-spinner-32 softmmu-semi.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 softmmu_defs.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 softmmu_exec.h
Octocat-spinner-32 softmmu_header.h
Octocat-spinner-32 softmmu_template.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 sparc-dis.c
Octocat-spinner-32 sparc.ld
Octocat-spinner-32 sparc64.ld Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 spice-qemu-char.c
Octocat-spinner-32 sysemu.h HVM-758 Add a qmp entry for hw setup complete November 19, 2012
Octocat-spinner-32 targphys.h Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 tcg-runtime.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 thunk.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 thunk.h
Octocat-spinner-32 trace-events
Octocat-spinner-32 translate-all.c Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 uboot_image.h
Octocat-spinner-32 usb-bsd.c
Octocat-spinner-32 usb-linux.c
Octocat-spinner-32 usb-stub.c
Octocat-spinner-32 version.rc Initial commit of d32e8d0 from qemu-kvm June 24, 2011
Octocat-spinner-32 vgafont.h
Octocat-spinner-32 vl.c
Octocat-spinner-32 x86_64.ld Initial commit of d32e8d0 from qemu-kvm June 24, 2011
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.