can you try with a different box?

if the box have the issue you need to fix the base box.

not sure what box are you using.

On Fri, Feb 16, 2018 at 7:59 PM, Sergei Gerasenko <[email protected]> wrote:

> Hi,
>
> I have the following definition for a VM:
>
>   config.vm.define 'ipa-client-2' do |client_2|
>     config.vm.provider "virtualbox" do |vb|
>       # Display the VirtualBox GUI when booting the machine
>       vb.memory = "4000"
>       vb.gui = true
>       vb.name = 'ipa-client-2'
>     end
>     client_2.vm.network "private_network", :name => 'vboxnet1', ip:
> "172.240.0.4", auto_config: false
>     client_2.vm.hostname = 'ipa-client-2'
>     config.vm.provision :salt do |salt|
>       salt.masterless = true
>       salt.minion_config = "salt/minion"
>       salt.run_highstate = true
>     end
>   end
>
> When i do vagrant up ipa-client-2, I get:
>
> The following SSH command responded with a non-zero exit status.
> Vagrant assumes that this means the command failed!
>
>
> # Update sysconfig
> sed -i 's/\(HOSTNAME=\).*/\1ipa-client-2/' /etc/sysconfig/network
>
>
> # Update DNS
> sed -i 's/\(DHCP_HOSTNAME=\).*/\1"ipa-client-2"/' /etc/sysconfig/network-
> scripts/ifcfg-*
>
>
> # Set the hostname - use hostnamectl if available
> echo 'ipa-client-2' > /etc/hostname
> if command -v hostnamectl; then
>   hostnamectl set-hostname --static 'ipa-client-2'
>   hostnamectl set-hostname --transient 'ipa-client-2'
> else
>   hostname -F /etc/hostname
> fi
>
>
> # Prepend ourselves to /etc/hosts
> grep -w 'ipa-client-2' /etc/hosts || {
>   sed -i'' '1i 127.0.0.1\tipa-client-2\tipa-client-2' /etc/hosts
> }
>
>
> # Restart network
> service network restart
>
>
>
>
> Stdout from the command:
>
>
> /bin/hostnamectl
> Restarting network (via systemctl):  [FAILED]
>
>
>
>
> Stderr from the command:
>
>
> Job for network.service failed. See 'systemctl status network.service' and 
> 'journalctl
> -xn' for details.
>
> It turns out it's because of the *ifcfg-enp03s* interface. It's defined
> like this:
>
> # Generated by dracut initrd
> NAME="enp0s3"
> DEVICE="enp0s3"
> ONBOOT=yes
> NETBOOT=yes
> UUID="8924a5b0-f9f4-453b-910d-118a91dac1ec"
> IPV6INIT=yes
> BOOTPROTO=dhcp
> TYPE=Ethernet
>
> If I move it out of the way, it starts working.
>
> Is there something I can do to remove that interface before network
> restart?
>
> Thanks
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/f9da5409-5877-45fd-b72e-c4225abcea01%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/f9da5409-5877-45fd-b72e-c4225abcea01%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ex9A%2B9aJiT-OpZ%3D3OtiiyDEvmd1GcBkLwtaLgs1b%2B12_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to