ezmomi
ezmomi copied to clipboard
Cloning a template while providing multiple ips in the same network, will create a VM with multiple interfaces having the same IP Address
Clone a template: ./bin/ezmomi clone --template some_template --hostname new_vm --domain some_domaine --ips 192.168.0.10 192.168.0.11 192.168.0.12
The new created VM will have 3 network interfaces and all of them will use the same IP (the last one): 192.168.0.12.
The issue is in file ezmomi.py, around line 185
for network in self.config['networks']: if ip in IPNetwork(network): self.config['networks'][network]['ip'] = ip
Where a configured network can have only one IP Address.
@ciorceri thats strange, i use multiple IPs all of the time and it creates separate NICs with each of the listed ips. Questions:
- what version of ezmomi?
ezmomi --version
to check that - what OS distro and version are you cloning?
@snobear I'm using version 6.3.0, and I'm deploying from template a RHEL7 distro. Probably my description was not very clear so I will try again.
In my env I have only ONE VLAN and I wanted to add in the clone few interfaces using IP's from the same network.
Anyway, I've spot where is the issue and I will try to fix it in my branch and I will do a pull request here in the future.
@ciorceri OK I see. Thanks for investigating a potential fix!
I ran into this today, actually. And your title and description was very clear actually, I just wasn't getting it originally :). I was putting up two interfaces in the same network today, and, as your issue title says, the two interfaces end up with the same ipaddress. I guess I've rarely had to do that.
A PR would would very appreciated, BUT even if you have just have a tiny bit of time to add a quick description of the code issue here, then I can implement it.
Hi Jason Nice to get in touch again. I will try to look at that next week (I don't promise that, since I moved to another project and I don't have any ESXi6 in current setup to test things)
Sorin
On Jan 21, 2017 4:29 AM, "Jason Ashby" [email protected] wrote:
I ran into this today, actually. And your title and description was very clear actually, I just wasn't getting it originally :). I was putting up two interfaces in the same network today, and, as your issue title says, the two interfaces end up with the same ipaddress. I guess I've rarely had to do that.
A PR would would very appreciated, BUT even if you have just have a tiny bit of time to add a quick description of the code issue here, then I can implement it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imsweb/ezmomi/issues/75#issuecomment-274226734, or mute the thread https://github.com/notifications/unsubscribe-auth/AQmXERAJYSVud84WwdJUgoezbdMlaBPCks5rUW2jgaJpZM4KrbKe .