“systemctl: command not found” with vagrant on fresh CentOS 6.5 install
I'm creating new vagrant box that uses virtualbox image of CentOS 6.5 that I installed. Inside everything looks fine, but from outside I can't access 80 port.
When I edited my Vagrantfile and added fixed IP:
config.vm.network "private_network", ip: "10.10.10.10"
And I ran vagrant up, I got "systemctl command not found".
I think this it tries to setup network interface, but fails because it uses systemctl which, I assume is not available in this version or distribution.
Is there a way to add it, or configure IP/network interface manually? So that vagrant connects to it?
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
systemctl stop etcd
ifconfig 10.10.10.10 netmask 255.255.255.0
mv /tmp/etcd-cluster.service /media/state/units/
systemctl restart local-enable.service
# Restart default etcd
systemctl start etcd
Stdout from the command:
Stderr from the command:
bash: line 3: systemctl: command not found
SIOCSIFNETMASK: No such device
SIOCGIFADDR: No such device
SIOCSIFBROADCAST: No such device
mv: cannot move `/tmp/etcd-cluster.service' to `/media/state/units/': No such file or directory
bash: line 6: systemctl: command not found
bash: line 9: systemctl: command not found
centos vagrant vagrantfile
add a comment |
I'm creating new vagrant box that uses virtualbox image of CentOS 6.5 that I installed. Inside everything looks fine, but from outside I can't access 80 port.
When I edited my Vagrantfile and added fixed IP:
config.vm.network "private_network", ip: "10.10.10.10"
And I ran vagrant up, I got "systemctl command not found".
I think this it tries to setup network interface, but fails because it uses systemctl which, I assume is not available in this version or distribution.
Is there a way to add it, or configure IP/network interface manually? So that vagrant connects to it?
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
systemctl stop etcd
ifconfig 10.10.10.10 netmask 255.255.255.0
mv /tmp/etcd-cluster.service /media/state/units/
systemctl restart local-enable.service
# Restart default etcd
systemctl start etcd
Stdout from the command:
Stderr from the command:
bash: line 3: systemctl: command not found
SIOCSIFNETMASK: No such device
SIOCGIFADDR: No such device
SIOCSIFBROADCAST: No such device
mv: cannot move `/tmp/etcd-cluster.service' to `/media/state/units/': No such file or directory
bash: line 6: systemctl: command not found
bash: line 9: systemctl: command not found
centos vagrant vagrantfile
systemctl
is part of new centos7 its not available on centos65 - are you running this command from provision script or how ?
– Frédéric Henri
Sep 30 '16 at 8:41
no, this is generated by vagrant when I change Vagrantfile and add fixed IP: config.vm.network "private_network", ip: "10.10.10.10"
– Artjom Kurapov
Sep 30 '16 at 9:48
sytemd is not the init system for Centos6 sosystemctl
cannot be made available.
– Matt Schuchard
Sep 30 '16 at 11:00
add a comment |
I'm creating new vagrant box that uses virtualbox image of CentOS 6.5 that I installed. Inside everything looks fine, but from outside I can't access 80 port.
When I edited my Vagrantfile and added fixed IP:
config.vm.network "private_network", ip: "10.10.10.10"
And I ran vagrant up, I got "systemctl command not found".
I think this it tries to setup network interface, but fails because it uses systemctl which, I assume is not available in this version or distribution.
Is there a way to add it, or configure IP/network interface manually? So that vagrant connects to it?
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
systemctl stop etcd
ifconfig 10.10.10.10 netmask 255.255.255.0
mv /tmp/etcd-cluster.service /media/state/units/
systemctl restart local-enable.service
# Restart default etcd
systemctl start etcd
Stdout from the command:
Stderr from the command:
bash: line 3: systemctl: command not found
SIOCSIFNETMASK: No such device
SIOCGIFADDR: No such device
SIOCSIFBROADCAST: No such device
mv: cannot move `/tmp/etcd-cluster.service' to `/media/state/units/': No such file or directory
bash: line 6: systemctl: command not found
bash: line 9: systemctl: command not found
centos vagrant vagrantfile
I'm creating new vagrant box that uses virtualbox image of CentOS 6.5 that I installed. Inside everything looks fine, but from outside I can't access 80 port.
When I edited my Vagrantfile and added fixed IP:
config.vm.network "private_network", ip: "10.10.10.10"
And I ran vagrant up, I got "systemctl command not found".
I think this it tries to setup network interface, but fails because it uses systemctl which, I assume is not available in this version or distribution.
Is there a way to add it, or configure IP/network interface manually? So that vagrant connects to it?
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
systemctl stop etcd
ifconfig 10.10.10.10 netmask 255.255.255.0
mv /tmp/etcd-cluster.service /media/state/units/
systemctl restart local-enable.service
# Restart default etcd
systemctl start etcd
Stdout from the command:
Stderr from the command:
bash: line 3: systemctl: command not found
SIOCSIFNETMASK: No such device
SIOCGIFADDR: No such device
SIOCSIFBROADCAST: No such device
mv: cannot move `/tmp/etcd-cluster.service' to `/media/state/units/': No such file or directory
bash: line 6: systemctl: command not found
bash: line 9: systemctl: command not found
centos vagrant vagrantfile
centos vagrant vagrantfile
asked Sep 30 '16 at 8:23
Artjom KurapovArtjom Kurapov
5,21832542
5,21832542
systemctl
is part of new centos7 its not available on centos65 - are you running this command from provision script or how ?
– Frédéric Henri
Sep 30 '16 at 8:41
no, this is generated by vagrant when I change Vagrantfile and add fixed IP: config.vm.network "private_network", ip: "10.10.10.10"
– Artjom Kurapov
Sep 30 '16 at 9:48
sytemd is not the init system for Centos6 sosystemctl
cannot be made available.
– Matt Schuchard
Sep 30 '16 at 11:00
add a comment |
systemctl
is part of new centos7 its not available on centos65 - are you running this command from provision script or how ?
– Frédéric Henri
Sep 30 '16 at 8:41
no, this is generated by vagrant when I change Vagrantfile and add fixed IP: config.vm.network "private_network", ip: "10.10.10.10"
– Artjom Kurapov
Sep 30 '16 at 9:48
sytemd is not the init system for Centos6 sosystemctl
cannot be made available.
– Matt Schuchard
Sep 30 '16 at 11:00
systemctl
is part of new centos7 its not available on centos65 - are you running this command from provision script or how ?– Frédéric Henri
Sep 30 '16 at 8:41
systemctl
is part of new centos7 its not available on centos65 - are you running this command from provision script or how ?– Frédéric Henri
Sep 30 '16 at 8:41
no, this is generated by vagrant when I change Vagrantfile and add fixed IP: config.vm.network "private_network", ip: "10.10.10.10"
– Artjom Kurapov
Sep 30 '16 at 9:48
no, this is generated by vagrant when I change Vagrantfile and add fixed IP: config.vm.network "private_network", ip: "10.10.10.10"
– Artjom Kurapov
Sep 30 '16 at 9:48
sytemd is not the init system for Centos6 so
systemctl
cannot be made available.– Matt Schuchard
Sep 30 '16 at 11:00
sytemd is not the init system for Centos6 so
systemctl
cannot be made available.– Matt Schuchard
Sep 30 '16 at 11:00
add a comment |
1 Answer
1
active
oldest
votes
Not sure if this was the cause, but the culprit could have been SELinux. Maybe it blocked connections or permissions. Got it working later:
setenforce Permissive
nano /etc/sysconfig/selinux
#setting SELINUX=disabled
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39786877%2fsystemctl-command-not-found-with-vagrant-on-fresh-centos-6-5-install%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Not sure if this was the cause, but the culprit could have been SELinux. Maybe it blocked connections or permissions. Got it working later:
setenforce Permissive
nano /etc/sysconfig/selinux
#setting SELINUX=disabled
add a comment |
Not sure if this was the cause, but the culprit could have been SELinux. Maybe it blocked connections or permissions. Got it working later:
setenforce Permissive
nano /etc/sysconfig/selinux
#setting SELINUX=disabled
add a comment |
Not sure if this was the cause, but the culprit could have been SELinux. Maybe it blocked connections or permissions. Got it working later:
setenforce Permissive
nano /etc/sysconfig/selinux
#setting SELINUX=disabled
Not sure if this was the cause, but the culprit could have been SELinux. Maybe it blocked connections or permissions. Got it working later:
setenforce Permissive
nano /etc/sysconfig/selinux
#setting SELINUX=disabled
answered Sep 30 '16 at 13:11
Artjom KurapovArtjom Kurapov
5,21832542
5,21832542
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39786877%2fsystemctl-command-not-found-with-vagrant-on-fresh-centos-6-5-install%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
systemctl
is part of new centos7 its not available on centos65 - are you running this command from provision script or how ?– Frédéric Henri
Sep 30 '16 at 8:41
no, this is generated by vagrant when I change Vagrantfile and add fixed IP: config.vm.network "private_network", ip: "10.10.10.10"
– Artjom Kurapov
Sep 30 '16 at 9:48
sytemd is not the init system for Centos6 so
systemctl
cannot be made available.– Matt Schuchard
Sep 30 '16 at 11:00