mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Add discussion of management network
This commit is contained in:
parent
1484a9fb36
commit
04c4d32c5d
27
README.md
27
README.md
@ -99,8 +99,6 @@ This provider exposes quite a few provider-specific configuration options:
|
|||||||
* `password` - Password to access Libvirt.
|
* `password` - Password to access Libvirt.
|
||||||
* `id_ssh_key_file` - The id ssh key file name to access Libvirt (eg: id_dsa or id_rsa or ... in the user .ssh directory)
|
* `id_ssh_key_file` - The id ssh key file name to access Libvirt (eg: id_dsa or id_rsa or ... in the user .ssh directory)
|
||||||
* `storage_pool_name` - Libvirt storage pool name, where box image and instance snapshots will be stored.
|
* `storage_pool_name` - Libvirt storage pool name, where box image and instance snapshots will be stored.
|
||||||
* `management_network_name` - Name of libvirt network to which all VMs will be connected. If not specified the default is 'vagrant-libvirt'.
|
|
||||||
* `management_network_address` - Address of network to which all VMs will be connected. Must include the address and subnet mask. If not specified the default is '192.168.121.0/24'.
|
|
||||||
|
|
||||||
### Domain Specific Options
|
### Domain Specific Options
|
||||||
|
|
||||||
@ -236,15 +234,24 @@ starts with 'libvirt__' string. Here is a list of those options:
|
|||||||
Default mode is 'bridge'.
|
Default mode is 'bridge'.
|
||||||
* `:mac` - MAC address for the interface.
|
* `:mac` - MAC address for the interface.
|
||||||
|
|
||||||
## Obtaining Domain IP Address
|
### Management Network
|
||||||
|
|
||||||
Libvirt doesn't provide standard way how to find out an IP address of running
|
Vagrant-libvirt uses a private network to perform some management operations
|
||||||
domain. But we know, what is MAC address of virtual machine. Libvirt is closely
|
on VMs. All VMs will have an interface connected to this network and
|
||||||
connected with dnsmasq server, which acts also as a DHCP server. Dnsmasq server
|
an IP address dynamically assigned by libvirt. This is in addition to any
|
||||||
makes lease information public in `/var/lib/libvirt/dnsmasq` directory, or in
|
networks you configure. The name and address used by this network are
|
||||||
`/var/lib/misc/dnsmasq.leases` file on some systems. This is the place, where
|
configurable at the provider level.
|
||||||
information like which MAC address has which IP address resides and it's parsed
|
|
||||||
by vagrant-libvirt plugin.
|
* `management_network_name` - Name of libvirt network to which all VMs will be connected. If not specified the default is 'vagrant-libvirt'.
|
||||||
|
* `management_network_address` - Address of network to which all VMs will be connected. Must include the address and subnet mask. If not specified the default is '192.168.121.0/24'.
|
||||||
|
|
||||||
|
You may wonder how vagrant-libvirt knows the IP address a VM received.
|
||||||
|
Libvirt doesn't provide a standard way to find out the IP address of a running
|
||||||
|
domain. But we do know the MAC address of the virtual machine's interface on
|
||||||
|
the management network. Libvirt is closely connected with dnsmasq, which acts as
|
||||||
|
a DHCP server. dnsmasq writes lease information in the `/var/lib/libvirt/dnsmasq`
|
||||||
|
directory. Vagrant-libvirt looks for the MAC address in this file and extracts
|
||||||
|
the corresponding IP address.
|
||||||
|
|
||||||
## SSH Access To VM
|
## SSH Access To VM
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user