Previous page

Next page

Locate page in Contents

Adding a Virtual Network Adapter

--device-add net --type <shared | bridged | host-only> [--iface <name>] [--mac <addr | auto>]

              [--ipadd <addr [/mask]> | --ipdel <addr[/mask]> | --dhcp <yes | no> | --dhcp6 <yes | no>]

              [--gw <gw>] [--gw6 <gw>] [--nameserver <addr>] [--searchdomain <addr>]

              [--configure <yes | no>] [--apply-iponly <yes | no>]

              [--adapter-type <virtio | e1000 | e1000e | rtl>]

Parameters

--type: the type of the network adapter to create in the virtual machine.

--iface: the host network interface to be assigned to the bridged or host-only virtual network adapter.

--mac: the MAC address to be assigned to the virtual network adapter. If omitted, the MAC address will be automatically generated.

--ipadd: the IP address to be assigned to the network adapter in the virtual machine.

--ipdel: the IP address to be removed from the network adapter in the virtual machine.

--dhcp: specifies whether the virtual network adapter should get its IP settings through a DHCP server.

--dhcp6: specifies whether the virtual network adapter should get its IPv6 settings through a DHCP server.

--gw: the default gateway to be used by the virtual machine.

--gw6: the default IPv6 gateway to be used by the virtual machine.

--nameserver: the default DNS server to be used by the virtual machine.

--searchdomain: the default search domain to be used by the virtual machine.

--configure: if set to yes, the settings above are applied to the virtual network adapter instead of its original settings. Configuring any of the settings above automatically sets this option to yes.

--apply-iponly: if set to yes, the hostname, nameserver, and search domain settings from the virtual machine configuration file are ignored.

--adapter-type: specifies the network adapter emulation type.