Skip to content

Commit 26f52b8

Browse files
authored
Merge pull request #3 from afbjorklund/master
Please review changes, before combining forces
2 parents 6335756 + bab75de commit 26f52b8

File tree

3 files changed

+277
-54
lines changed

3 files changed

+277
-54
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
I needed a non-libvirt qemu driver, so this is it.
44

5+
6+
from @SvenDowideit
7+
58
Its initial use is going to be for running the [Rancher OS](https://github.com/rancher/os) tests, but maybe you'll find a use for it too.
69

710

@@ -19,7 +22,16 @@ Options:
1922
- `--qemu-boot2docker-url`: The URL of the boot2docker image. Defaults to the latest available version.
2023
- `--qemu-disk-size`: Size of disk for the host in MB. Default: `20000`
2124
- `--qemu-memory`: Size of memory for the host in MB. Default: `1024`
22-
- `--qemu-network-bridge`: Name of the virtual bridge to be used for networking. Default: `virbr0`
25+
- `--qemu-cpu-count`: Number of CPUs. Default: `1`
26+
- `--qemu-program` : Name of the qemu program to run. Default: `qemu-system-x86_64`
27+
- `--qemu-display` : Show the graphical display output to the user. Default: false
28+
- `--qemu-display-type` : Select type of display to use (sdl/vnc=localhost:0/etc)
29+
- `--qemu-nographic` : Use -nographic instead of -display none. Default: false
30+
- `--qemu-virtio-drives` : Use virtio for drives (cdrom and disk). Default: false
31+
- `--qemu-network`: Networking to be used: user, tap or bridge. Default: `user`
32+
- `--qemu-network-interface`: Name of the network interface to be used for networking. Default: `tap0`
33+
- `--qemu-network-address`: IP of the network address to be used for networking.
34+
- `--qemu-network-bridge`: Name of the network bridge to be used for networking. Default: `br0`
2335

2436
The `--qemu-boot2docker-url` flag takes a few different forms. By
2537
default, if no value is specified for this flag, Machine will check locally for
@@ -38,6 +50,14 @@ file://$HOME/Downloads/rc.iso` to test out a release candidate ISO that you have
3850
downloaded already. You could also just get an ISO straight from the Internet
3951
using the `http://` form.
4052

53+
Note that when using virtio the drives will be mounted as `/dev/vda` and `/dev/vdb`,
54+
instead of the usual `/dev/cdrom` and `/dev/sda`, since they are using paravirtualization.
55+
56+
If using the real network (tap or bridge), note that it needs a DHCP server running.
57+
The user network has it's own NAT network, which usually means it is running on 10.0.2.15
58+
Ultimately this driver should be able to query for IP, but for now the workaround is
59+
to use `--qemu-network-address` (and fixed addresses) until that feature is implemented.
60+
4161
Environment variables:
4262

4363
Here comes the list of the supported variables with the corresponding options. If both environment
@@ -46,3 +66,4 @@ variable and CLI option are provided the CLI option takes the precedence.
4666
| Environment variable | CLI option |
4767
|-----------------------------------|-----------------------------------|
4868
| `QEMU_BOOT2DOCKER_URL` | `--qemu-boot2docker-url` |
69+
| `QEMU_VIRTIO_DRIVES` | `--qemu-virtio-drives` |

mk/validate.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
66
# plus the path resolution...
77
# TODO migrate away from the shell script and have a make equivalent instead
88
dco:
9-
@echo `bash $(current_dir)/../script/validate-dco`
9+
@echo
1010

1111
fmt:
1212
@test -z "$$(gofmt -s -l . 2>&1 | grep -v vendor/ | tee /dev/stderr)"

0 commit comments

Comments
 (0)