Closed fmbiete closed 9 years ago
Is there a reason you want a specific MAC address? You can query by VM name / uuid and return the generated one. You just do:
server = connection.servers.find { |server| server.uuid == #{uuid} } Mac = server.vifs.mac.first
Sent from my iPhone
On Mar 6, 2015, at 6:42 AM, Francisco Miguel Biete notifications@github.com wrote:
Hi,
I'm trying to create a VIF with a custom MAC address (since later is not possible to change it). But the mac address is silently discarded:
connection.vifs.create(server: vm_object, network: network_object, MAC: 'mac address') connection.vifs.create(server: vm_object, network: network_object, mac: 'mac address') Both will create a vif but with autogenerated MAC.
\ Reply to this email directly or view it on GitHub.
Yes, I need to use a specific MAC because I will be using a static DHCP server, and the MAC will tell some attributes (DNS, gateway...). For example if the MAC starts with 02:01 thats CPD 02 client 01, use their config.
@fmbiete I'm not sure the reason behind this. When using fog i had this same behavior so i guess it was just extracted as well. Perhaps you have time to dig it further?
The problem was that I only had fog in my Gemfile, adding fog-xenserver fixes the xenserver support in fog, and the MAC is added at creation time.
Sorry for this.
@fmbiete. Awesome to know. Thanks
Hi,
I'm trying to create a VIF with a custom MAC address (since later is not possible to change it). But the mac address is silently discarded:
Both will create a vif but with autogenerated MAC.