Commit Graph

520 Commits

Author SHA1 Message Date
stanley karunditu
a5cd2024ed update README. fix mention of test_vm1. should be test_vm2 2015-07-11 10:55:21 -04:00
stanley karunditu
555470efe3 update README. should say 'test_vm2' instead of 'test_vm1' 2015-07-11 10:53:23 -04:00
stanley karunditu
789fa369c8 add libvirt interface tcp tunnel support.
Useful when configuring Virtualized Switch topologies using Switch VMs like Cumulus
Linux.

vagrant network interface auto_config is disabled in the code. This may be
re-enabled in a future update, once it is better understood how to
auto configure these types of links. All guestOS ports, for now, that are
connected to a tcp tunnel are in a link down state.

TCP tunnels allow guest OSes to exchange STP and LLDP information as
if they are directly connected to each other.

This is not possible with the default virtual switch network mode.

Reference:
https://libvirt.org/formatdomain.html#elementsNICSTCP
2015-07-11 10:49:00 -04:00
Dmitry Vasilets
ab34b7d29b Merge pull request #408 from dcbw/dcbw/pass-mac-to-vagrant
Read MAC address from libvirt and pass up to Vagrant
2015-07-01 00:38:22 +02:00
Dan Williams
ee7afab369 Read MAC address from libvirt and pass up to Vagrant
Configuring networks based solely on slot numbers doesn't work very
well, since there's no way to guarantee that the interface Vagrant
finds is the same one that vagrant-libvirt created at that index.

For example, Vagrant's Fedora configure_networks action does this:

  machine.communicate.sudo("ls /sys/class/net | grep -v lo") do |_, result|
    interface_names = result.split("\n")
  end

  interface_names = networks.map do |network|
    "#{interface_names[network[:interface]]}"
  end

which means that if your image has 'docker' pre-installed, then
interface_names[0] = "docker0" and hilarity ensues, with the first
non-management network being assigned to the vagrant-libvirt
management interface.

Since interface names are very unreliable (they can be renamed by
udev at will or when hardware changes) the only way to ensure that
the interface vagrant-libvirt attaches to the domain maps to the
correct one inside the VM is by MAC address.  Pull the MAC address
out of the libvirt config once the interface has been attached and
pass that up to Vagrant so we have a chance of doing the right thing.
2015-06-30 16:24:30 -05:00
Dmitry Vasilets
b08420409e Merge pull request #406 from lxsli/master
Specify units for machine_virtual_size
2015-06-30 11:34:06 +02:00
Alexis Lee
cd0322ccaf Specify units for machine_virtual_size 2015-06-29 17:14:13 +01:00
Dmitry Vasilets
c01ba1075c Merge pull request #404 from electrofelix/support-volume-resizing
Support volume size resize configuration
2015-06-28 18:32:32 +02:00
Darragh Bailey
d4c72212eb Support volume size resize configuration
Allow control of the volume size to be increased from the box default
virtual_size value so that it is possible to use a box configured with a
minimal initial disk size and create virtual guests with larger disk
sizes.

Warn the user and ignore sizes that are less than the box size, and
inform them that a manual filesystem resize will be needed to take
advantage of the additional available disk space.

fixes: #37
2015-06-28 15:50:44 +01:00
Dmitry Vasilets
313c56e254 Merge pull request #400 from alexblackie/master
Do not remove `.ssh` on package
2015-06-22 12:38:24 +02:00
Alex Blackie
07c6fff1ac Do not remove .ssh on package
`virt-sysprep` will, by default, remove all `.ssh` directories from all
users' home directories. Since we need to have the default Vagrant
insecure keypair in the `authorized_keys`, this causes problems later
when trying to use the packaged box, as Vagrant is unable to log in.

`virt-sysprep` has the ability to disable options via the `--operations`
argument; the `ssh-userdir` option should be disabled.
2015-06-18 10:44:40 -07:00
Dmitry Vasilets
9b5801be50 simplify 2015-06-09 22:29:11 +02:00
Dmitry Vasilets
529588ff50 Merge pull request #389 from electrofelix/identify-disk-by-pool
Use storage pool to identify correct volume
2015-06-09 22:20:04 +02:00
Darragh Bailey
bc517934c2 Use storage pool to identify correct volume
Compare storage pool on the found volumes to avoid selecting a disk from
a different and unreachable to the domain storage pool.

Users may move between storage pools by configuring the driver which
will mean that it is possible to find the same image name in multiple
storage pools and incorrectly perform operations based on the one not
associated with the currently specified pool.

When using persistent images to attach to storage this will cause domain
creation to fail since although the image was found in one of the
storage pools, it may not be connected since it does not exist in the
storage pool requested for the VM.
2015-06-09 18:24:10 +01:00
Dmitry Vasilets
65f14f4fe6 Merge pull request #388 from electrofelix/fix-parallel-up
Fixes #387: Break from mutex synchronize before calling next action
2015-06-08 17:19:30 +02:00
Darragh Bailey
ac7563e6c3 Fixes #387: Break from mutex synchronize before calling next action
Exit the synchronize block before performing calling the next item in
the middleware chain otherwise the mutex lock applies to the entire
provision sequence from that point onwards until the entire chain has
returned to the same point.

Executing a return statement inside a block does not exit the block
automatically. Instead only when the statement returned has been
processed is the wrapping block exited.

Since the return call is actually calling the next action in the chain,
this change ensures that the mutex is not held for subsequent actions
and thus allows vagrant to perform remaining actions in parallel.

Without this all provisioning of machines will always occur serially
instead of parallel when requested.
2015-06-08 16:10:34 +01:00
dima
d12405ed82 0.0.30 2015-06-04 22:46:55 +02:00
Dmitry Vasilets
33850c2567 Merge pull request #383 from dc-bradwadsworth/add_boot_order
Add boot order
2015-06-03 08:18:25 +02:00
Brad Wadsworth
0851b5d804 fixed grammar 2015-06-02 20:33:37 -05:00
Brad Wadsworth
56818642e5 fixed indent and added example 2015-06-02 20:31:21 -05:00
Brad Wadsworth
0b2ebc102b edited domain.xml.erb 2015-06-01 10:26:31 -05:00
Brad Wadsworth
23d0a5b012 changes to boot order option 2015-06-01 10:19:06 -05:00
dima
738ad918a5 Merge branch 'thefallentree-master' 2015-06-01 07:14:51 +02:00
coding
ba9050984e Make NFS correctly detect host/guest addresses.
The logic is that we first gather all usable guest addresses, then
use routing information (through a udp socket) to figure out host
IP for use to connect to guest.
2015-06-01 11:55:27 +08:00
Brad Wadsworth
6c0d15288e added boot_order option 2015-05-29 16:32:20 -05:00
Dmitry Vasilets
76942c38ba Merge pull request #379 from iNecas/no-exception-when-ip-not-ready
Don't raise an error when ip address is not found when calling ssh_info
2015-05-28 10:03:33 +02:00
Ivan Nečas
ba619e04bb Don't raise an error when ip address is not found when calling ssh_info
Vagrant defines that, when the ssh info is not available, the method
should return nil, instead of raising exception:
https://github.com/mitchellh/vagrant/blob/v1.7.2/lib/vagrant/plugin/v2/provider.rb#L52-L75

Also, as per
efd1d5e11b/plugins/providers/virtualbox/provider.rb (L60) , not getting into waiting for the ssh info
when the machine is not running.

The motivation for this patch is the ansible integration issues when raising
the errors and waiting for the ssh info. See also:
https://github.com/mitchellh/vagrant/pull/5743
2015-05-27 12:57:08 +02:00
Dmitry Vasilets
27710febe5 Merge pull request #377 from rds13/removeStaleVolume
add step to remove stale volume on destroy action
2015-05-23 22:05:56 +02:00
Romuald du Song
2e01a54fc3 add step to remove stale volume on destroy action 2015-05-23 21:49:51 +02:00
Dmitry Vasilets
89dd37c843 Merge pull request #376 from rds13/removeGithubAccountDependency
change repo ref to https
2015-05-23 16:12:49 +02:00
Romuald du Song
c5a6107ead change repo ref to https 2015-05-23 15:44:27 +02:00
dima
b6babcdade 0.0.29 2015-05-22 06:44:40 +02:00
dima
fa004ab251 require only read for create image 2015-05-18 09:30:29 +02:00
dima
98e4b3b0be typo 2015-05-18 07:48:39 +02:00
Dmitry Vasilets
b092a5444b Merge pull request #374 from kampka/master
Add ability to specify the machine architecture via the domain arguments
2015-05-18 07:47:09 +02:00
Christian Kampka
298a45d3d8 Add ability to specify the machine architecture via the domain arguments 2015-05-18 07:30:48 +02:00
Dmitry Vasilets
83a0a37b4d Merge pull request #375 from tsl0922/patch-1
README: Add note for remote nfs synced folders
2015-05-18 06:19:47 +02:00
Shuanglei Tao
d4b013a66d Add note for remote nfs synced folders 2015-05-18 11:46:04 +08:00
dima
4de1560027 improve package process 2015-05-17 19:47:07 +02:00
dima
9ad2389a92 remove temp dir after package creation 2015-05-17 16:39:05 +02:00
dima
82c2f69c5d looks good. anyway require more tests. 2015-05-17 15:23:23 +02:00
Shuanglei Tao
6ffad6104f Replace ifconfig with ip addr 2015-05-17 19:59:17 +08:00
Shuanglei Tao
0deb63911b Mounting nfs remotely through bridged public network, fixes #366 2015-05-17 19:10:38 +08:00
Shuanglei Tao
91c768158a Ensure VM booted and network configured before creating synced folders 2015-05-17 19:02:41 +08:00
Dmitry Vasilets
4b7fedbd42 Merge pull request #372 from tsl0922/patch-1
Set private key for proxy_command
2015-05-17 12:51:37 +02:00
Shuanglei Tao
0a23a986b3 Set private key for proxy_command 2015-05-17 18:37:13 +08:00
Dmitry Vasilets
c7f37649ec example for 9p 2015-05-17 10:34:58 +02:00
Dmitry Vasilets
78c525b364 typo 2015-05-17 10:12:42 +02:00
Dmitry Vasilets
4af0163c5e update readme with example accessmode 9p 2015-05-17 10:11:40 +02:00
dima
08037d1941 port tools/create_box.sh to package action. close #11 2015-05-16 17:35:00 +02:00