For better VM performance CPU type should be set not to qemu64, but to
the host cpu type.
For example see the difference (uppercased)
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc
rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2
x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm
tpr_shadow vnmi flexpriority ept xsaveopt
Added extensions when emulating host cpu model:
flags : fpu VME de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
PAT pse36 clflush mmx fxsr sse sse2 SS syscall nx RDTSCP lm CONSTANT_TSC
rep_good nopl EAGERFPU pni PCLMULQDQ vmx SSSE3 cx16 PCID SSE4_1 SSE4_2
x2apic popcnt TSC_DEADLINE_TIMER AES XSAVE AVX hypervisor lahf_lm
tpr_shadow vnmi flexpriority ept XSAVEOPT
Nested virtualization requires VMX/SVM capabilities, which are still
being added when domain.nested is set to true.
Using the current default value for cpu_mode everyone will benefit from
the better VMs performance.
Signed-off-by: Max Kutsevol <max@kutsevol.com>
Previously, following Vagrant documentation to setup private DHCP
network failed with:
config.vm.network "private_network", type: "dhcp"
Now libvirt provider accepts both "dhcp" and :dhcp
management_network_address was defaulting to UNSET_VALUE which is of
type Object, thus management_network_address was always truthy.
This fixes issue introduced in
e904fd8941.
This is required because in current versions of libvirt, it is not
possible to specify a boot order when attaching a device; therefore we
can only parse the entire domain XML after all devices have been created
and then assign boot ordering according to the Vagrantfile
specification. This allows us to specify exact boot order for hd, cdrom
and network.
Vagrant already supports VMs without boxes with Docker.
We leverage this in libvirt as well. The use case for this is to PXE
oot a vagrant VM that is then installed over the network then
installed over the network; a different use case would be to test PXE
booted clients that do not use a hard drive whatsoever.
```ruby
Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |libvirt|
# very useful when having mouse issues when viewing VMs via VNC
libvirt.input :type => "tablet", :bus => "usb"
end
end
```
Remove the ReadSSHInfo and ReadState actions and corresponding calls to
dispatch queries by vagrant on the provider for current `ssh_info` and
`state` to be handled by actions. Change the corresponding methods added
to the Driver and Provider classes to avoid modifying `machine.id`
directly and allow vagrant to take care of resetting it whenever `state`
returns :not_created.
This ensures that both `ssh_info` and `state` may be called by other
threads, such as the ansible provisioner building the inventory file,
on machines without causing exceptions due to machine locks preventing
modification (setting `machine.id` to nil) and Batch locking preventing
multiple sets of actions being executed on the same machine by
different threads/processes.
Follows the design of the in-tree docker provider for vagrant.
Handle libvirt connection through a driver located within the provider
so it can be reached via the machine settings. Adopt the format followed
by the docker/virtualbox providers as this is likely to remain well
supported.
Will allow queries to be made without needing to setup a specific action
which is important when dealing with parallel machine provisioning.
Calling actions from other threads to retrieve information on the state
of the other running machines currently will cause vagrant to complain
about the machine being locked.
Loggers must be defined in the correct heirarchial order to ensure that
child loggers inherit the level defined on the parent logger. Otherwise
need to traverse the entire tree to modify the level.