vmware/pyvmomi

If open-vm-tools installed on VM/template, editing a network device will not connect to it at power on

Open

#243 aberto em 6 de mai. de 2015

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)Python (807 forks)batch import
help wantedneeds verification

Métricas do repositório

Stars
 (2.141 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Trying to edit a network adapter of a VM when cloning it from a template.

If VMware tools is installed, it edits and connects after power on successfully but if open-vm-tools is installed instead, it will edit the network adapter successfully but it will not connect to it at power on automatically. I have to manually check "Connect at power on" from the client which for some reason was unchecked even though in the device specs I marked startConnected = true.

Here's the spec:

      deviceChange = (vim.vm.device.VirtualDeviceSpec) [
         (vim.vm.device.VirtualDeviceSpec) {
            dynamicType = <unset>,
            dynamicProperty = (vmodl.DynamicProperty) [],
            operation = 'edit',
            fileOperation = <unset>,
            device = (vim.vm.device.VirtualE1000) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               key = 4000,
               deviceInfo = (vim.Description) {
                  dynamicType = <unset>,
                  dynamicProperty = (vmodl.DynamicProperty) [],
                  label = 'Network adapter 1',
                  summary = '10.20.30-VLAN-Test'
               },
               backing = (vim.vm.device.VirtualEthernetCard.DistributedVirtualPortBackingInfo) {
                  dynamicType = <unset>,
                  dynamicProperty = (vmodl.DynamicProperty) [],
                  port = (vim.dvs.PortConnection) {
                     dynamicType = <unset>,
                     dynamicProperty = (vmodl.DynamicProperty) [],
                     switchUuid = '81 b7 0e 50 6e 8f 67 c5-40 46 3a 40 d5 e5 4b 32',
                     portgroupKey = 'dvportgroup-1235',
                     portKey = <unset>,
                     connectionCookie = <unset>
                  }
               },
               connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
                  dynamicType = <unset>,
                  dynamicProperty = (vmodl.DynamicProperty) [],
                  startConnected = true,
                  allowGuestControl = true,
                  connected = true,
                  status = 'ok'
               },
               slotInfo = <unset>,
               controllerKey = 100,
               unitNumber = 7,
               addressType = 'assigned',
               macAddress = '00:50:56:8e:70:53',
               wakeOnLanEnabled = true
            },
            profile = (vim.vm.ProfileSpec) []
         }
      ]

Guia do colaborador