在Vagrant中设置VM的Mac地址 [英] Setting a VM's mac address in Vagrant

查看:130
本文介绍了在Vagrant中设置VM的Mac地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档列出可以在Vagrantfile中设置VM的mac地址,但是我添加的所有内容似乎最终都是语法错误.有人成功做到了吗?

The documentation lists that the mac address of a VM can be set in the Vagrantfile, however everything I add seems to end up being a syntax error. Anyone successfully done this?

推荐答案

我用了这个

config.vm.network :bridged , :mac => "080027XXXXXX"

得到我想要的.

文档尚不清楚选项哈希的语法是什么,并且似乎没有任何示例.所以,就在这里!与Mac地址桥接(当然已编辑).这会使用指定的mac调出eth1,这使我的DHCP服务器感到满意,并在我的网络上给它一个合适的fqdn.

The docs are unclear on what the syntax for the options hash were, and there seemed to be no example on what this should look like. So, here it is! Bridged with a mac address (edited of course). This brings up eth1 with the mac specified, which makes my DHCP server happy, and gives it a proper fqdn on my network.

这篇关于在Vagrant中设置VM的Mac地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆