VMware Cloud Community
woter
Contributor
Contributor

Difference in VMDK between new VM and new disk

Hi,

Is there an underlying difference between a VMDK created with a new VM and a VMDK created on its own?

I'm deploying Windows using Puppet Razor to deliver Unattended.xml answer file and using a VM as a test bed. I find PXE works better on a totally clean disk, so to speed up test cycles, I wrote a simple PowerCLI script to:

1. Power down VM

2. Detach and delete VMDK

3. Create new disk and attach.

4. Power up VM.

After running through the above process, Windows installer reports the following error:

Windows could not apply the unattended answer file's <DiskConfiguration> setting.

However, when I delete the whole VM and recreate it, the deployment works.

Google is a little thin on the ground, but it appears that the error may be to do with missing disk drivers, therefore, I am wondering if the process of creating a new VM "injects" drivers into the VMDK.

I can write a script to destroy and re-create the VM, but I am intrigued as to why my current solution isn't working. As far as I can tell, the disk created with the new VM is identical to the one created with New-HardDisk. I'm running version 11.2 of PowerCLI (installed today (25/04/2019)).

If anyone has any pointers or ideas, please share.

TIA,

W.

Tags (2)
0 Kudos
4 Replies
a_p_
Leadership
Leadership

Are the settings the same in the .vmdk descriptor file, and in the .vmx file after destroying the old, and creating the new virtual disk (i.e. same adapter type, same scsi port, ...)?

André

0 Kudos
woter
Contributor
Contributor

Hi André,

Thanks for your reply.

These are the differences between the two VMX files:

Working (UI)Failing (PowerCLI)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

.encoding = "UTF-8"

config.version = "8"

virtualHW.version = "14"

nvram = "ipxe_test.nvram"

pciBridge0.present = "TRUE"

svga.present = "TRUE"

pciBridge4.present = "TRUE"

pciBridge4.virtualDev = "pcieRootPort"

pciBridge4.functions = "8"

pciBridge5.present = "TRUE"

pciBridge5.virtualDev = "pcieRootPort"

pciBridge5.functions = "8"

pciBridge6.present = "TRUE"

pciBridge6.virtualDev = "pcieRootPort"

pciBridge6.functions = "8"

pciBridge7.present = "TRUE"

pciBridge7.virtualDev = "pcieRootPort"

pciBridge7.functions = "8"

vmci0.present = "TRUE"

hpet0.present = "TRUE"

floppy0.present = "FALSE"

svga.vramSize = "8388608"

memSize = "3072"

powerType.powerOff = "default"

powerType.suspend = "default"

powerType.reset = "default"

tools.upgrade.policy = "manual"

sched.cpu.units = "mhz"

sched.cpu.affinity = "all"

sched.cpu.latencySensitivity = "normal"

vm.createDate = "1556282539234864"

scsi0.virtualDev = "lsisas1068"

scsi0.present = "TRUE"

scsi0:0.deviceType = "scsi-hardDisk"

scsi0:0.fileName = "ipxe_test.vmdk"

sched.scsi0:0.shares = "normal"

sched.scsi0:0.throughputCap = "off"

scsi0:0.present = "TRUE"

ethernet0.virtualDev = "e1000e"

ethernet0.networkName = "VLAN100"

ethernet0.addressType = "vpx"

ethernet0.generatedAddress = "00:50:56:89:46:62"

ethernet0.present = "TRUE"

displayName = "ipxe_test"

guestOS = "windows9-64"

toolScripts.afterPowerOn = "TRUE"

toolScripts.afterResume = "TRUE"

toolScripts.beforeSuspend = "TRUE"

toolScripts.beforePowerOff = "TRUE"

uuid.bios = "42 09 3d 94 15 e2 fa 27-e1 7f 5f 3d 48 3b 34 80"

vc.uuid = "50 09 17 1a 45 d1 9c 9a-41 64 56 22 d5 b1 e5 e6"

migrate.hostLog = "ipxe_test-66469401.hlog"

sched.cpu.min = "0"

sched.cpu.shares = "normal"

sched.mem.min = "0"

sched.mem.minSize = "0"

sched.mem.shares = "normal"

migrate.encryptionMode = "opportunistic"

.encoding = "UTF-8"

config.version = "8"

virtualHW.version = "14"

nvram = "ipxe_test.nvram"

pciBridge0.present = "TRUE"

svga.present = "TRUE"

pciBridge4.present = "TRUE"

pciBridge4.virtualDev = "pcieRootPort"

pciBridge4.functions = "8"

pciBridge5.present = "TRUE"

pciBridge5.virtualDev = "pcieRootPort"

pciBridge5.functions = "8"

pciBridge6.present = "TRUE"

pciBridge6.virtualDev = "pcieRootPort"

pciBridge6.functions = "8"

pciBridge7.present = "TRUE"

pciBridge7.virtualDev = "pcieRootPort"

pciBridge7.functions = "8"

vmci0.present = "TRUE"

hpet0.present = "TRUE"

floppy0.present = "FALSE"

memSize = "3072"

vm.createDate = "1556282755877469"

scsi0.virtualDev = "lsisas1068"

scsi0.present = "TRUE"

scsi0:0.deviceType = "scsi-hardDisk"

scsi0:0.fileName = "ipxe_test.vmdk"

scsi0:0.present = "TRUE"

ethernet0.allowGuestConnectionControl = "FALSE"

ethernet0.virtualDev = "e1000e"

ethernet0.networkName = "VLAN100"

ethernet0.addressType = "vpx"

ethernet0.generatedAddress = "00:50:56:89:ea:c7"

ethernet0.present = "TRUE"

displayName = "ipxe_test"

guestOS = "windows9-64"

uuid.bios = "42 09 8d 4e b8 b9 07 95-ed 71 cd e5 ab 2c c4 72"

vc.uuid = "50 09 1e 38 b6 2b 23 ee-61 52 93 80 c3 52 09 59"

migrate.hostLog = "ipxe_test-2ac6ab5d.hlog"

Differences: Line 31, 50, 51 & 32, with the PowerCLI VM having line 39 (ethernet0.allowGuestConnectionControl = "FALSE" - and is only relevant to VM Tools.).

These are the two vmdk descriptor files:

Working (UI)Failing (PowerCLI)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

# Disk DescriptorFile

version=4

encoding="UTF-8"

CID=fffffffe

parentCID=ffffffff

createType="vmfs"

# Extent description

RW 67108864 VMFS "vsan://3b55c25c-6809-98eb-3605-0cc47a7c0c44"

# The Disk Data Base

#DDB

ddb.adapterType = "lsilogic"

ddb.geometry.cylinders = "4177"

ddb.geometry.heads = "255"

ddb.geometry.sectors = "63"

ddb.longContentID = "a720267e29b8e4e7add82e73fffffffe"

ddb.thinProvisioned = "1"

ddb.uuid = "60 00 C2 94 a9 ab 8d 0a-4d d2 1d 7f 3b cf 88 41"

ddb.virtualHWVersion = "14"

# Disk DescriptorFile

version=4

encoding="UTF-8"

CID=fffffffe

parentCID=ffffffff

createType="vmfs"

# Extent description

RW 67108864 VMFS "vsan://07e2c25c-7c49-c539-1be5-0cc47a7c0c44"

# The Disk Data Base

#DDB

ddb.adapterType = "lsilogic"

ddb.geometry.cylinders = "4177"

ddb.geometry.heads = "255"

ddb.geometry.sectors = "63"

ddb.longContentID = "25a83377881cf0a3619885ebfffffffe"

ddb.thinProvisioned = "1"

ddb.uuid = "60 00 C2 9a 10 72 e0 93-e6 a4 1d 19 ad 69 27 6d"

ddb.virtualHWVersion = "14"

Differences: Lines 9, 18 & 20.

I'm not sure why the VSAN line is different. I only have one vSAN data store, and neither of those UUIDs match the directory name, but I guess it's not referring to the directory.

I can't see any substantial differences. Just to be sure, I am making sure both VMs are created on the same host.

Any suggestions?

TIA,

W.

0 Kudos
a_p_
Leadership
Leadership

I don't see an issue with the metadata you've posted.

The issue may however be related to something that needs to be considered when creating virtual disks (objects) on a vSAN datastores.

Would you mind to share/post the part of your script (or the whole script), which is involved in creating, and attaching the new virtual disk to the VM?

Out of curiosity. Is the new virtual disk accessible/usable, when you try to start the VM from e.g. a Windows installation image?

André

PS: If you want me to move the question to the PowerCLI community, please let me know.

0 Kudos
ThompsG
Virtuoso
Virtuoso

Hi woter​,

Could you try something? In your unattended.xml can you check these lines:

<DiskID>O</DiskID>

In your file it will either be a 0 (zero) or 1 - I suspect it will currently be 0 so try changing to 1 and running through your script/deployment process again. There will be multiple instances of this so change all of them.

Not going to expand the why this is happening but wondering if the DiskID is changing.

Kind regards.

0 Kudos