Commit Graph

694 Commits

Author SHA1 Message Date
Chris Roberts 2451c859e8 Merge pull request #8746 from mastersin/alt
Add ALT Linux platforms guest detection and network configuration support (#8745)
2017-09-06 17:49:38 -07:00
Antonio Terceiro acda71edd9 plugins/guests/kali: fix file permissions
Those Ruby files are not standalone scripts, so there is no point in
having them being executable.
2017-09-06 12:21:23 -03:00
Brian Cain 0ac26be4ef (#8917) Fix shell_expand_guest_path capability
Prior to this commit, when the guest capability attempted to expand a
path with spaces it would quote the path passed in. However if the path
also had a relative path those quotes would end up making `printf`
ignore it and not properly expand the path fully. This commit updates
that to first escape the quotes of a path and then pass in the new path
to be expanded.
2017-08-25 10:02:36 -07:00
Chris Roberts 93f6451261 Retain winssh_ method prefix on auth key helper 2017-08-21 14:48:52 -07:00
Rui Lopes 7fac854cf3 winssh communicator: simplify the authorized_keys file modification 2017-08-21 14:42:18 -07:00
Rui Lopes 4ab0dc19b1 winssh communicator: retain the authorized_keys file acl permissions 2017-08-21 14:42:18 -07:00
Rui Lopes aeac480683 winssh communicator: fix public key insertion 2017-08-21 14:42:18 -07:00
Brian Cain 2b8f7f67ea Add unit tests for shell_expand_guest_path function 2017-08-15 09:33:29 -07:00
Brian Cain 61c501cc65 Ensure paths with spaces are preserved
Prior to this commit, if a user set the `destination` path to include a
space, the `shell_expand_guest_path` function would remove that space
and return a partial path. This commit updates that to quote the path to
be expanded to preserve the entire path.
2017-08-14 15:34:10 -07:00
Brian Cain 5ee3b0c3b9 Merge pull request #8760 from marblenix/fix/Unable_to_list_network_interfaces_on_FreeBSD
Fix vagrant not being able to list network devices on some FreeBSD boxes.
2017-07-21 14:27:05 -07:00
Evgeny Sinelnikov 015d98e76c guests/alt: Fix flavor and network configure with unit tests 2017-07-11 00:35:28 +03:00
Evgeny Sinelnikov 6ef55c172d guests/alt: Adjust flavour detect and restart network after set hostname 2017-07-09 18:16:25 +03:00
Evgeny Sinelnikov 88c0cb855f guests/alt: Update network configuration
Fix network mask to CIDR notation and network configure stop and
restart commands with NetworkManager
2017-07-08 21:30:52 +03:00
Chris Roberts cef38eefd0 Add public key capability to Windows guests for winssh communicator 2017-07-07 11:26:32 -07:00
Caleb Marble 2aceb03b19 Fix vagrant not being able to list network devices on FreeBSD boxes. 2017-07-07 09:03:38 -05:00
Evgeny Sinelnikov 3dd90aa955 Add ALT Linux platforms guest detection and support
* ALT Linux platforms is an original rpm based distribution
forked as Mandrake Russian Edition Spring at 2001 year
* Distributions of ALT Linux use etcnet (https://www.altlinux.org/Etcnet) as
internal network configuration system needs for configure_networks support
2017-07-03 00:25:33 +03:00
James Nugent b0b9d044b5 guests/smartos: Add/fix various guest capabilities
This commit adds a variety of fixes for SmartOS guest support:

- Host name setting now works in the global zone and in non-global zones
- NFS now works in the global zone and the non-global zone.
- Tests are updated and moved to the (apparently) more modern style
2017-06-16 17:00:50 -04:00
Chris Roberts 12e63de542 Merge pull request #8553 from bdwyertech/kali
Add support for Kali Linux
2017-06-14 16:47:32 -07:00
Chris Roberts 60a438396f Merge pull request #8588 from aligenttimaslat/bugfix/rsync_mkdir_on_windows
Fix a problem when using rsync folders on windows clients
2017-06-14 16:41:36 -07:00
James Nugent b84acaed3c guests/smartos: Add/fix various guest capabilities
This commit adds/changes the following for SmartOS guests:

- modifies the "Halt" capability to use /usr/sbin/poweroff in preference
  to /usr/sbin/shutdown with parameters, and modifies the associated
  test.

- adds an "InsertPublicKey" capability and tests.

- adds a "RemovePublicKey" capability and tests.

With this commit applied, the vast majority of typical Vagrant workflow
is available to SmartOS global zone guests (provided NFS mounts are used
rather than VMWare shared folders).
2017-05-30 15:18:18 +01:00
Tim Aslat 630858b9a8 This patch fixes an issue when using rsync folders on windows clients with cygwin & ssh enabled.
Before the patch this error will happen if the original directory already exists

-------------------------------------------------------------------------------------------------
==> windows: Rsyncing folder: /vhosts/oxfamshop.com.au/ => /cygdrive/c/inetpub/wwwroot
==> windows:   - Exclude: [".vagrant/", ".git/", "target/", "node_modules/"]
==> windows: Showing rsync output...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mkdir '/cygdrive/c/inetpub/wwwroot'

Stdout from the command:

Stderr from the command:

mkdir: cannot create directory ‘/cygdrive/c/inetpub/wwwroot’: File exists
-------------------------------------------------------------------------------------------------

After the patch, this is result

-------------------------------------------------------------------------------------------------
==> windows: Rsyncing folder: /vhosts/oxfamshop.com.au/ => /cygdrive/c/inetpub/wwwroot
==> windows:   - Exclude: [".vagrant/", ".git/", "target/", "node_modules/"]
==> windows: Showing rsync output...
==> windows: rsync[stdout] -> sending incremental file list
==> windows: rsync[stdout] ->
==> windows: rsync[stdout] -> sent 500855 bytes  received 6635 bytes  78075.38 bytes/sec
==> windows: rsync[stdout] -> total size is 175357552  speedup is 345.54
-------------------------------------------------------------------------------------------------
2017-05-16 16:38:29 +09:30
Chris Roberts 2f5e15da55 Fetch first network device and pass to template for rendering 2017-05-10 12:44:37 -07:00
Chris Roberts a16b6f84e3 Remove reload via cli and just restart the service 2017-05-09 09:13:40 -07:00
Chris Roberts c081916ce8 Always disconnect interface when controlled by NetworkManager 2017-05-08 19:30:35 -07:00
Chris Roberts ee79dd0575 Enable windows guest capabilities using winssh communicator 2017-05-05 14:04:54 -07:00
Brian Dwyer d427dd03d8
Add support for Kali Linux
Signed-off-by: Brian Dwyer <bdwyer@IEEE.org>
2017-05-02 23:30:10 -04:00
Chris Roberts 1df852c88a Reduce commands. Allow nm reload/restart to bring interfaces up.
Reduce the total number of commands run to configure interfaces. If
a service reload/restart is required, only execute it once instead
of once per device. When nm is managing a device, the explicit up
is not required.
2017-05-01 13:17:17 -07:00
Chris Roberts 414184b76b guests/rhel: Update network configuration
Properly detects NetworkManager on guest as well as devices controlled
by NetworkManager. Provides configuration option to enable/disbale
NetworkManager control on devices.
2017-04-26 13:15:33 -07:00
Chris Roberts e62d71b645 Remove comment removal from /etc/hosts file on guests
Fixes: #7794
2017-04-20 17:07:56 -07:00
Chris Roberts e52821364a Merge pull request #8407 from gh2k/gentoo-systemd
Add support for gentoo guests that use systemd
2017-04-16 14:17:19 -07:00
Chris Roberts 1a17d829f5 Merge pull request #8472 from derks/elementary-guest
Support for Elementary OS 0.4 - Issue #8471
2017-04-16 08:16:06 -07:00
Chris Roberts 38a5f7c873 Merge pull request #8310 from tsmolka/patch-guest-esxi
guests/esxi: Added public_key capability
2017-04-16 08:13:26 -07:00
BJ Dierkes 55da086f5f Support for Elementary OS 0.4 - Issue #8471 2017-04-12 02:36:47 -05:00
Chris Roberts 21e195c75a Merge pull request #7425 from tjuerge/6220-mount_shared_folder-via-ssh
Add support for mounting synched folders on windows guest via ssh
2017-04-05 15:11:32 -07:00
Chris Roberts 98b0ad1464 Fix linux guest mount smb capability 2017-03-24 13:42:51 -07:00
Simon Detheridge 3a3216ae0c gentoo/guest: #8406 support systemd when configuring net 2017-03-24 16:11:16 +00:00
Simon Detheridge e06848a649 gentoo/guest: #8406 support systemd when changing hostname 2017-03-24 16:10:52 +00:00
Chris Roberts dbf01572ef Merge pull request #8122 from chrisroberts/virtualbox/uid-gid
Use uid/gid from mount_options if provided for synced folders.
2017-03-06 14:21:11 -08:00
Tobias e3e7484e16 Merge tag 'tags/v1.9.1' into patch-guest-esxi 2017-02-28 06:30:34 -08:00
Tobias cdeac10b36 guests/esxi: Added public_key capability 2017-02-28 02:35:00 -08:00
Chris Roberts 0c307476fa Merge pull request #8165 from kaorimatz/fix-arch-multiple-networks
guests/arch: fix configuring multiple network interfaces fails
2017-02-09 17:41:09 -08:00
Chris Roberts 5004f37a36 Merge pull request #8148 from mikefaille/netfixRHEL
Revert "Fix `service network restart` on RHEL-7 / Fedora"
2017-01-05 15:07:17 -08:00
Satoshi Matsumoto 829b995225
guests/arch: fix configuring multiple network interfaces fails 2017-01-02 15:32:23 +09:00
Michaël Faille 96611341a9 Revert "Fix `service network restart` on RHEL-7 / Fedora"
`/etc/init.d/network restart` already restart NM and shutdown interfaces.

In start() :
```
        if [ "$(LANG=C nmcli -t --fields running general status 2>/dev/null)" = "running" ]; then
                nmcli connection reload
        fi

```

In stop() :

```
       for i in $vpninterfaces $xdslinterfaces $bridgeinterfaces $vlaninterfaces $remaining; do
                unset DEVICE TYPE
                (. ./ifcfg-$i
                if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi

                if ! check_device_down $DEVICE; then
                   action $"Shutting down interface $i: " ./ifdown $i boot
                   [ $? -ne 0 ] && rc=1
                fi
                )
        done
```
Where $remaining include all "others" interfaces including eth*

This reverts commit 166d10d4e1.
2016-12-21 20:33:57 -05:00
Chris Roberts 9f393fc1e0 Use uid/gid from mount_options if provided for synced folders.
This also extracts the gid/uid detection and upstart actions into
reusable module to provide consistent behavior.
2016-12-14 12:12:17 -08:00
ephemeralsnow 556b82da1c Fix quotes 2016-12-07 18:04:33 +09:00
Chris Roberts 0587707044 Merge pull request #8051 from jklippel/vagrant-issue-7368
redirect any output to stderr by /sbin/init to /dev/null when checking for upstart capability
2016-12-05 15:21:04 -08:00
Latchezar Tzvetkoff 166d10d4e1 Fix `service network restart` on RHEL-7 / Fedora
RHEL-7 / Current Fedora versions tend to use NetworkManager for
configuring the networks, and `service network restart` might fail.
If the `NetworkManager` service is running, we should restart it,
otherwise we try restarting `network`.
2016-11-29 15:40:48 +02:00
jklippel b10bc2e8c2 Vagrant-Issue: 7368: redirect any output to stderr by /sbin/init to /dev/null when checking for upstart capability 2016-11-29 08:10:25 +01:00
Chris Roberts 5482692127 guests/linux: Only match interfaces without special characters 2016-11-10 07:19:26 -08:00