Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpontillo committed May 23, 2016
1 parent 727d79d commit 721ce99
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ Ubuntu cloud images onto local virtual machines.
## Prerequisites

This set of scripts was developed on Ubuntu 16.04 LTS (Xenial). It is not
guaranteed to work on any other platform.
guaranteed to work on any other platform. (At least one script requires
`python3` at the time of this writing.)

First, you'll need to ensure the following packages are installed:

sudo apt install libvirt-bin qemu-kvm virtinst python3-netaddr
sudo apt install libvirt-bin qemu-kvm virtinst

Your `~/.ssh/authorized_keys` file *MUST* be populated with whatever keys
you wish to use with the virtual machines. The cloud images do not have
Expand Down Expand Up @@ -47,6 +48,18 @@ After you've finished with the virutal machine, you can easily delete it
This repository also contains a few helper scripts, which can be helpful
(assuming, as the scripts do, that you are using `virbr0`).

### `get_mac`

Utility to return a consistent MAC address given the specified hostname. This
is useful so that when tearing down and recreating virtual machines with the
same name, consistent MAC addresses are used, which should cause `dnsmasq` to
hand out consistent IP addresses as well.

### `get_ip_via_arp`

Utility to return (based on `virbr0`'s ARP cache) the IP address for the given
hostname, assuming the hostname's MAC was generated by the `get_mac` script.

### `ussh`

The `ussh` utility stands for **Untrusted SSH**. It is a wrapper that allows
Expand All @@ -55,21 +68,14 @@ SSH without checking the key of the remote system.
### `vssh`

The `vssh` utility stands for **VM SSH**. It is a wrapper which attempts to
look up the IP address of the virtual machine (based on `dnsmasq`'s idea of
that host mapping), then runs `ussh` to open a session.
look up the IP address of the virtual machine (based on the ARP cache and the
expected hostname-based MAC from the `get_mac` script), then runs `ussh` to open a session.

### `vcleardns`

Utility script to clear out `dnsmasq`'s lease database for `virbr0`.
Also restarts the `libvirt-bin` service.

### `get_mac`

Utility to return a consistent MAC address given the specified hostname. This
is useful so that when tearing down and recreating virtual machines with the
same name, consistent MAC addresses are used, which should cause `dnsmasq` to
hand out consistent IP addresses as well.

### `vdig`

Wrapper to use `dig` to query the `dnsmasq` running on `virbr0`.

0 comments on commit 721ce99

Please sign in to comment.