Hi,
I'm running into an issue with the Vagrant Plugin for VMware on Windows 10.
My Vagrantfile:
BOX_IMAGE = "centos/7"
Vagrant.configure("2") do |config|
config.vm.define "service" do |subconfig|
subconfig.vm.box = BOX_IMAGE
subconfig.vm.hostname = "service"
subconfig.vm.network :private_network, ip: "192.168.47.50"
end
end
When I do a vagrant up, it gives an error of
========
==> service: Setting hostname...
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=\).*/\1service/' /etc/sysconfig/network
# Update DNS
sed -i 's/\(DHCP_HOSTNAME=\).*/\1"service"/' /etc/sysconfig/network-scripts/ifcfg-*
# Set the hostname - use hostnamectl if available
echo 'service' > /etc/hostname
if command -v hostnamectl; then
hostnamectl set-hostname --static 'service'
hostnamectl set-hostname --transient 'service'
else
hostname -F /etc/hostname
fi
# Prepend ourselves to /etc/hosts
grep -w 'service' /etc/hosts || {
sed -i'' '1i 127.0.0.1\tservice\tservice' /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 because the control process exited with error code. See "systemctl status network.service
" and "journalctl -xe" for details.
===============
What I see is in the settings for that VM, it is setup for the private_network adapter to be set to say "vmnet19". The adapter in VMware Workstation is named "VMnet19" which is case sensitive. If I change the adapter to be "VMnet19" in the VMX file, it works as expected.
Any thoughts on how to fix it or when VMware Workstation broke it?