Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Template clone #87

Open
mrtweb opened this issue Mar 30, 2018 · 8 comments
Open

Windows Template clone #87

mrtweb opened this issue Mar 30, 2018 · 8 comments

Comments

@mrtweb
Copy link

mrtweb commented Mar 30, 2018

error!

Traceback (most recent call last):
  File "/usr/bin/ezmomi", line 4, in <module>
    cli.cli()
  File "/usr/lib/python2.7/site-packages/ezmomi/cli.py", line 18, in cli
    ez.clone()
  File "/usr/lib/python2.7/site-packages/ezmomi/ezmomi.py", line 415, in clone
    result = self.WaitForTasks(tasks)
  File "/usr/lib/python2.7/site-packages/ezmomi/ezmomi.py", line 909, in WaitForTasks
    raise task.info.error
pyVmomi.VmomiSupport.InvalidArgument: (vmodl.fault.InvalidArgument) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'A specified parameter was not correct: spec.identity',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [],
   invalidProperty = u'spec.identity'
}
@Akasurde
Copy link

@mrtweb Are you cloning from Windows template ?

@snobear
Copy link
Owner

snobear commented Mar 31, 2018 via email

@mrtweb
Copy link
Author

mrtweb commented Apr 1, 2018

I try it but not working. Did you succeed?

@mrtweb
Copy link
Author

mrtweb commented Apr 1, 2018

@snobear Yes vcenter gui succed win template cloning

@snobear
Copy link
Owner

snobear commented Apr 3, 2018

@mrtweb can you add the --debug flag to your clone command and put the full output in a gist and link it here?

@ilyinon
Copy link

ilyinon commented Nov 27, 2018

Cloning w7_template_Nov_26_2018 to new host qawinnode653.tf with 3584MB RAM...
DEBUG: Destination cluster
{'_moId': u'domain-c918',
 '_serverGuid': None,
 '_stub': <pyVmomi.SoapAdapter.SoapStubAdapter instance at 0x10365dd88>}
DEBUG: Resource pool
None
DEBUG: CloneSpec
{'config': (vim.vm.ConfigSpec) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   changeVersion = <unset>,
   name = <unset>,
   version = <unset>,
   uuid = <unset>,
   instanceUuid = <unset>,
   npivNodeWorldWideName = (long) [],
   npivPortWorldWideName = (long) [],
   npivWorldWideNameType = <unset>,
   npivDesiredNodeWwns = <unset>,
   npivDesiredPortWwns = <unset>,
   npivTemporaryDisabled = <unset>,
   npivOnNonRdmDisks = <unset>,
   npivWorldWideNameOp = <unset>,
   locationId = <unset>,
   guestId = <unset>,
   alternateGuestName = <unset>,
   annotation = <unset>,
   files = <unset>,
   tools = <unset>,
   flags = <unset>,
   consolePreferences = <unset>,
   powerOpInfo = <unset>,
   numCPUs = 2,
   numCoresPerSocket = <unset>,
   memoryMB = 3584,
   memoryHotAddEnabled = true,
   cpuHotAddEnabled = true,
   cpuHotRemoveEnabled = <unset>,
   virtualICH7MPresent = <unset>,
   virtualSMCPresent = <unset>,
   deviceChange = (vim.vm.device.VirtualDeviceSpec) [
      (vim.vm.device.VirtualDeviceSpec) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         operation = 'remove',
         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 = 'DVSwitch: dc 3e 02 50 7a 13 7d 0f-05 25 66 9b c3 aa b2 2b'
            },
            backing = (vim.vm.device.VirtualEthernetCard.DistributedVirtualPortBackingInfo) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               port = (vim.dvs.PortConnection) {
                  dynamicType = <unset>,
                  dynamicProperty = (vmodl.DynamicProperty) [],
                  switchUuid = 'dc 3e 02 50 7a 13 7d 0f-05 25 66 9b c3 aa b2 2b',
                  portgroupKey = 'dvportgroup-166',
                  portKey = '5667',
                  connectionCookie = 1381355919
               }
            },
            connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               startConnected = true,
               allowGuestControl = true,
               connected = false,
               status = 'untried'
            },
            slotInfo = (vim.vm.device.VirtualDevice.PciBusSlotInfo) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               pciSlotNumber = 32
            },
            controllerKey = 100,
            unitNumber = 7,
            addressType = 'manual',
            macAddress = '00:50:56:04:31:dc',
            wakeOnLanEnabled = true,
            resourceAllocation = (vim.vm.device.VirtualEthernetCard.ResourceAllocation) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               reservation = 0L,
               share = (vim.SharesInfo) {
                  dynamicType = <unset>,
                  dynamicProperty = (vmodl.DynamicProperty) [],
                  shares = 50,
                  level = 'normal'
               },
               limit = -1L
            },
            externalId = <unset>,
            uptCompatibilityEnabled = false
         },
         profile = (vim.vm.ProfileSpec) []
      },
      (vim.vm.device.VirtualDeviceSpec) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         operation = 'add',
         fileOperation = <unset>,
         device = (vim.vm.device.VirtualVmxnet3) {
            dynamicType = <unset>,
            dynamicProperty = (vmodl.DynamicProperty) [],
            key = 4000,
            deviceInfo = (vim.Description) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               label = 'Network Adapter 1',
               summary = 'vlan48-NODES_01'
            },
            backing = (vim.vm.device.VirtualEthernetCard.DistributedVirtualPortBackingInfo) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               port = (vim.dvs.PortConnection) {
                  dynamicType = <unset>,
                  dynamicProperty = (vmodl.DynamicProperty) [],
                  switchUuid = '6f 0d 00 50 ad 05 ca b4-5f 08 03 83 10 39 a5 47',
                  portgroupKey = 'dvportgroup-2181024',
                  portKey = <unset>,
                  connectionCookie = <unset>
               }
            },
            connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               startConnected = true,
               allowGuestControl = true,
               connected = false,
               status = <unset>
            },
            slotInfo = <unset>,
            controllerKey = <unset>,
            unitNumber = <unset>,
            addressType = 'manual',
            macAddress = '00:50:56:03:32:f3',
            wakeOnLanEnabled = true,
            resourceAllocation = <unset>,
            externalId = <unset>,
            uptCompatibilityEnabled = <unset>
         },
         profile = (vim.vm.ProfileSpec) []
      }
   ],
   cpuAllocation = <unset>,
   memoryAllocation = <unset>,
   latencySensitivity = <unset>,
   cpuAffinity = <unset>,
   memoryAffinity = <unset>,
   networkShaper = <unset>,
   cpuFeatureMask = (vim.vm.ConfigSpec.CpuIdInfoSpec) [],
   extraConfig = (vim.option.OptionValue) [],
   swapPlacement = <unset>,
   bootOptions = <unset>,
   vAppConfig = <unset>,
   ftInfo = <unset>,
   repConfig = <unset>,
   vAppConfigRemoved = <unset>,
   vAssertsEnabled = <unset>,
   changeTrackingEnabled = <unset>,
   firmware = <unset>,
   maxMksConnections = <unset>,
   guestAutoLockEnabled = <unset>,
   managedBy = <unset>,
   memoryReservationLockedToMax = <unset>,
   nestedHVEnabled = <unset>,
   vPMCEnabled = <unset>,
   scheduledHardwareUpgradeInfo = <unset>,
   vmProfile = (vim.vm.ProfileSpec) [],
   messageBusTunnelEnabled = <unset>
},
 'customization': (vim.vm.customization.Specification) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   options = <unset>,
   identity = (vim.vm.customization.LinuxPrep) {
      dynamicType = <unset>,
      dynamicProperty = (vmodl.DynamicProperty) [],
      hostName = (vim.vm.customization.FixedName) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         name = 'qawinnode653tf'
      },
      domain = 'mycompany.com',
      timeZone = <unset>,
      hwClockUTC = <unset>
   },
   globalIPSettings = (vim.vm.customization.GlobalIPSettings) {
      dynamicType = <unset>,
      dynamicProperty = (vmodl.DynamicProperty) [],
      dnsSuffixList = 'mycompany.com',
      dnsServerList = (str) [
         '8.8.8.8',
         '8.8.4.4'
      ]
   },
   nicSettingMap = (vim.vm.customization.AdapterMapping) [
      (vim.vm.customization.AdapterMapping) {
         dynamicType = <unset>,
         dynamicProperty = (vmodl.DynamicProperty) [],
         macAddress = <unset>,
         adapter = (vim.vm.customization.IPSettings) {
            dynamicType = <unset>,
            dynamicProperty = (vmodl.DynamicProperty) [],
            ip = (vim.vm.customization.FixedIp) {
               dynamicType = <unset>,
               dynamicProperty = (vmodl.DynamicProperty) [],
               ipAddress = '10.10.48.182'
            },
            subnetMask = '255.255.252.0',
            gateway = '10.10.48.1',
            ipV6Spec = <unset>,
            dnsServerList = (str) [],
            dnsDomain = 'mycompany.com',
            primaryWINS = <unset>,
            secondaryWINS = <unset>,
            netBIOS = <unset>
         }
      }
   ],
   encryptionKey = (byte) []
},
 'dynamicProperty': (vmodl.DynamicProperty) [],
 'dynamicType': None,
 'location': (vim.vm.RelocateSpec) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   service = <unset>,
   folder = <unset>,
   datastore = 'vim.Datastore:datastore-474',
   diskMoveType = <unset>,
   pool = 'vim.ResourcePool:resgroup-919',
   host = <unset>,
   disk = (vim.vm.RelocateSpec.DiskLocator) [],
   transform = <unset>,
   deviceChange = (vim.vm.device.VirtualDeviceSpec) [],
   profile = (vim.vm.ProfileSpec) []
},
 'memory': None,
 'powerOn': True,
 'snapshot': None,
 'template': False}

Traceback (most recent call last):
  File "./bin/ezmomi", line 4, in <module>
    cli.cli()
  File "/Users/oilin/ezmoni/lib/python2.7/site-packages/ezmomi/cli.py", line 18, in cli
    ez.clone()
  File "/Users/oilin/ezmoni/lib/python2.7/site-packages/ezmomi/ezmomi.py", line 420, in clone
    result = self.WaitForTasks(tasks)
  File "/Users/oilin/ezmoni/lib/python2.7/site-packages/ezmomi/ezmomi.py", line 914, in WaitForTasks
    raise task.info.error
pyVmomi.VmomiSupport.InvalidArgument: (vmodl.fault.InvalidArgument) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'A specified parameter was not correct: spec.identity',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [],
   invalidProperty = u'spec.identity'
}

@snobear
Copy link
Owner

snobear commented Nov 27, 2018

@feld-ims do you guys spin up any Windows VMs with ezmomi? Wondering if you've hit this error before and could assist?

   msg = 'A specified parameter was not correct: spec.identity',

@felsys
Copy link
Collaborator

felsys commented Nov 27, 2018

We don't, but some light research suggests this can be caused when tacking on the domain name to the hostname when cloning (which looks like may be happening with that debug output).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants