]> xenbits.xensource.com Git - libvirt.git/commit
bhyve: implement bhyve argument parser
authorFabian Freyer <fabian.freyer@physik.tu-berlin.de>
Wed, 1 Jun 2016 08:01:17 +0000 (10:01 +0200)
committerRoman Bogorodskiy <rb0427@att.com>
Sun, 10 Jul 2016 19:40:10 +0000 (15:40 -0400)
commit8151b300fbb8a0b134f981f4bcb23b39d8233931
treeb82421311650a1a9f3f067d79ae72f89c49b063e
parent01163b1b1fad29fbeea6085e530f79432227383a
bhyve: implement bhyve argument parser

A simpe getopt-based argument parser is added for the /usr/sbin/bhyve command,
loosely based on its argument parser, which reads the following from the bhyve
command line string:

* vm name
* number of vcpus
* memory size
* the time offset (UTC or localtime)
* features:
  * acpi
  * ioapic: While this flag is deprecated in FreeBSD r257423, keep checking for
    it for backwards compatibiility.
* the domain UUID; if not explicitely given, one will be generated.
* lpc devices: for now only the com1 and com2 are supported. It is required for
   these to be /dev/nmdm[\d+][AB], and the slave devices are automatically
   inferred from these to be the corresponding end of the virtual null-modem
   cable: /dev/nmdm<N>A <-> /dev/nmdm<N>B
* PCI devices:
  * Disks: these are numbered in the order they are found, for virtio and ahci
    disks separately. The destination is set to sdX or vdX with X='a'+index;
    therefore only 'z'-'a' disks are supported.
    Disks are considered to be block devices if the path
    starts with /dev, otherwise they are considered to be files.
  * Networks: only tap devices are supported. Since it isn't possible to tell
    the type of the network, VIR_DOMAIN_NET_TYPE_ETHERNET is assumed, since it
    is the most generic. If no mac is specified, one will be generated.

Signed-off-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
src/bhyve/bhyve_parse_command.c