snobear / ezmomi

cli tool for common VMware vSphere tasks
MIT License
119 stars 50 forks source link

Clone task creates the VM using a standard vSwitch even when the network passed is a dVS #55

Open technologistpro opened 9 years ago

technologistpro commented 9 years ago

Clone task creates the VM using a standard vSwitch even when the network passed is a dVS.

The 'dvpg-vlan-104' is a distributed virtual switch. $ ezmomi list --type Network Network list MOID Name network-89 VM Network dvportgroup-4044 dvpg-vlan-104

When I clone: $ ezmomi clone --template mytemplate --hostname ga1ggitlabd1 --domain 'example.org' --cpus 2 --mem 4 --ips 10.10.10.235 --resource-pool RP1

The VM is disconnected from the network and it shows a standard virtual switch which does not exist - because it is a DVS.

m-attoni commented 8 years ago

Hello, for me the same situation.

config.yml: network: 'dmz12' distributedvirtualportgroup: 'dvportgroup-12'

ezmomi list --type Network: dvportgroup-11 dmz11 dvportgroup-12 dmz12

After I made deploy from template It create new network as you can see here: ezmomi list --type Network: network-101 dmz12 dvportgroup-11 dmz11 dvportgroup-12 dmz12

Have I properly set up config.yaml? Is distributedvirtualportgroup option valid for ezmomi version 6.0.1?

It looks like show stopper, so thanks for your answers.

snobear commented 8 years ago

Hi - ezmomi currently does not support distributed virtual port groups. This was requested in #28. I apologize as I have not had the time to work on ezmomi as of late. I'm open to pull requests for this feature -- someone posted some starter code in #28 that could be used.