qemu picture

vmrndmac(1) man page

NAME

vmrndmacgenerate a random MAC address

SYNOPSIS

vmrndmac [-h] [prefix]

DESCRIPTION

Generate a random MAC address.
Such address can be used to manually update a virtual machine network settings.
prefix must be a valid prefix for the MAC address. It must contain up to six groups of two hexadecimal digits separated by colons. A final colon may be present or omitted. It is not possible to break a group of two hexadecimal digits.
Moreover, care should be taken for the address to be valid from a network perspective. It is recommended to use valid Organizationally Unique Identifier (OUI). At the very least the multicast bit must be set to zero to avoid frames drop and the locally administered bit should be set to one.
Addresses fulfilling both of these recommendations have their first byte ending with either 2, 6, A or E (see EXAMPLES below). Addresses with the multicast bit set to zero have an even first byte.
If no prefix is provided, vm_networking_default_mac is read from vmtools.conf(5).

OPTIONS

The options are as follows:
-h
Show usage information summary then exit.

ENVIRONMENT

XDG_CONFIG_HOME
Location of user’s configuration files, by default ~/.config.

FILES

/usr/local/lib/vmtools
Libraries shared by the vmtools project utilities.
/usr/local/share/vmtools/vmtools.conf
Virtual machine default settings, see vmtools.conf(5).
Moreover, the content of /usr/local/share/vmtools can be overridden in the following locations (in the order of precedence):
~/.config/vmtools
User overrides (if cfg_include_userhome is set to “yes”).
/etc/vmtools
System-wide overrides.

EXIT STATUS

The vmrndmac utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

Example 1:
Generate a random MAC address using the default prefix:
vmrndmac
Example 2:
Generate a random MAC address with a fixed prefix (the first byte ending with a 2 denotes a locally administered, unicast MAC address):
vmrndmac '12:34:ab:cd'

REPORTING BUGS

Please send bug reports to the vmtools issues page.

Popular tags see all

Website

Author

Follow