想要在同一个网卡上运行多个接口。
通过Vagrant文件运行Shell ifconfig命令,命令运行但是它失败了。 任何解决方法。 Ť
batcher.withBatchSize(500)
.withThreadCount(8)
.onUrisReady(
new QueryBatchListener() {
@Override
public void processEvent(QueryBatch queryBatch) {
LOGGER.info(String.join(",", queryBatch.getItems()));
}
}
)
.onQueryFailure(Exception::printStackTrace);
JobTicket jobTicket = dataMovementManager.startJob(batcher);
batcher.awaitCompletion();
dataMovementManager.stopJob(jobTicket);
命令错误是: - 我理解错误意味着这个vagrant shell没有运行ifconfig命令的权限。但任何想法我们如何解决这个问题
config.vm.define :custom_vm1 do |custom_vm1 |
custom_vm1.vm.network :public_network,
:dev => "br1",
:type => "bridge",
:ip => "10.132.251.127",
:auto_config => "false",
:netmask => "255.255.255.0"
custom_vm1.vm.provision "shell",
run: "always",
inline: "sudo ifconfig \"eth1:1\" 10.132.251.128 netmask 255.255.255.0 up",
privileged: "true"
custom_vm1.vm.provision "shell",
run: "always",
inline: "sudo ifconfig \"eth1:2\" 10.132.251.129 netmask 255.255.255.0 up",
privileged: "true"
end