In some cases, the default options selected by the `mkfs.*` utilities
are insufficient. To allow overriding them, volumes and partitions in
the VM description now support an optional `mkfsargs` item, which will
be passed along when creating new filesystems.
The `configure.enable_sshd` function enables the SSH daemon in the
target system. It generates host keys and sets the daemon to start at
boot. This function is called by `configure.configure` if the VM
definition contains at least one network interface.
The `enable_console_login` function modifies `/etc/inittab` to enable
logins on a serial device. For virtio serial devices, a getty is
configured to launch on `hvc0`; for other devices, it is configured for
`ttyS0` (the default).
When using the `configure.configure` function to automatically configure
a virtual machine, `enable_console_login` is called if a console device
is specified in the VM definition.
When *lvmetad* is in use, it will cache volume group metadata from
previous runs of `mkvm` that used the same block device and prevent new
physical volumes from being created on it. Running `pvscan` alone does
not refresh the cache unless it is told to do so with the `--cache`
argument.
The main entry point of the `mkvm` program closes FD 3 (native stderr)
to prevent extraneous messages from libvirt. Unfortunately, this breaks
wget's progress indicator, as it is printed to stderr as well. To ensure
that the progress indicator works, we have to pass the FD of the copy of
stderr to wget.