vmware/pyvmomi

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

Open

#243 aperta il 6 mag 2015

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)Python (807 fork)batch import
help wantedneeds verification

Metriche repository

Star
 (2141 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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) []
         }
      ]

Guida contributor