Allow the user to specify what the domif name will be for an interface
by defining a name in the Vagrantfile. This allows one to later build link
toggling from within vagrant or easily toggle the link using virsh. An
example using virsh.
By default the name of tunnel interfaces will be "tnet" + interface
number.
Given a Vagrantfile snippet:
node.vm.network :private_network,
:libvirt__tunnel_type => 'udp',
:libvirt__tunnel_port => 8001,
:libvirt__tunnel_local_port => 8002,
:libvirt__iface_name => 'test1'
Generates named domain interface called 'test1':
$ virsh -c qemu:///system domiflist vagrant_default
Interface Type Source Model MAC
-------------------------------------------------------
vnet0 network vagrant-libvirt virtio 52:54:00:2f:c1:82
vnet1 network switch_mgmt virtio 12:11:22:33:44:11
test1 udp - virtio 52:54:00:7d:8a:2a
tnet3 udp - virtio 52:54:00:ec:39:12
To toggle the interface link status one can do the following, toggle
the link up:
$ virsh -c qemu:///system domif-setlink vagrant_default test1 up
$ vagrant ssh -- sudo ip link set eth2 up
$ vagrant ssh -- ip link show eth2
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:7d:8a:2a brd ff:ff:ff:ff:ff:ff
Toggle the link down:
$ virsh -c qemu:///system domif-setlink vagrant_default test1 down
$ vagrant ssh -- sudo ip link set eth2 up
$ vagrant ssh -- ip link show eth2
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:7d:8a:2a brd ff:ff:ff:ff:ff:ff
Signed-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com>
Allows one to set a empty prefix for domain names
and it would create domain with the same name as set by define
method in the Vagrantfile.
Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
When the path to the Vagrant environment contains spaces, the IdentityFile argument to SSH does not get parsed correctly. The result is that the command fails and no ports are forwarded to the host. Log Output: command-line line 0: garbage at end of line;
This update places a double quote around the private key path with another pair of single quotes outside of it. With single or double quotes alone, the command fails. Combining the double quotes embedded in single quotes results in SSH parsing the argument correctly and the ports are forwarded properly.
* Fixed regression when using additional disks. Now disk_bus setting
applies only to main disk.
* Added ability to change additional disk bus on reload. Updated readme.
Task-Url: https://github.com/pradels/vagrant-libvirt/issues/418
Signed-off-by: Max Kutsevol <max@coolvds.com>
In some cases env[:machine].box is 'nil' when a box is
not already locally present. Combined with the box_optional
flag this causes the box definition in the Vagrantfile to be
ignored completely, yielding unexpected results. All references
are changed to ensure it does not cause other issues.
* Error handler in case of error when saving domain state with a hint
how to handle the problem.
* Managed saves are deleted prior to undefining a domain.
Task-Url: https://github.com/pradels/vagrant-libvirt/issues/411
Signed-off-by: Max Kutsevol <max@coolvds.com>
* Added the suspend_mode domain specific option. Now it can perform a
managed save/resume. Switching this domain specific option can be done
when the domain is supended, it will correctly resume the domain.
Task-Url: https://github.com/pradels/vagrant-libvirt/issues/411
Signed-off-by: Max Kutsevol <max@coolvds.com>
* Added support to modify domain specific options on already defined
domain, updated relevant documentation. For list of modifiable options
please see updated documentation.
* Added new domain specific option - uuid. To force domain UUID when
creating new VM.
Task-Url: https://github.com/pradels/vagrant-libvirt/issues/418
Signed-off-by: Max Kutsevol <max@coolvds.com>
Readme file is large, so navigation may be quite compilated.
Table of contents improves navigation but adds a little work when the content is changed.
Table of Contents was generated with http://doctoc.herokuapp.com/
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