VMware Cloud Community
NiclasEriksson
Enthusiast
Enthusiast

Windows image with or without cloud-init?

I'm struggeling with getting a windows 20012 r2 image to work properly. I've done some tests and these are the results:

1
Installed Cloud-Init and sysprepped image using cloud-init unattend file as doc from cloud-init. Nothing changed except adapter to lsiLogicsas. Launch image and checked the "Configuration drive".
Result: Image boots, sysprep (cloud-init) begins but after a while VIO shuts down VM and runs guest customization and starts again resulting the VM to halt because the sysprep didn't finish.

2
Using a clean windows image without any cloud-init. Changed to customize the image during launch with vmware and did not checked Config drive". The image lunches, vmware shuts it down, customizing guest, power on, the VM reboots 3 times and then it's up and running. The only thing I notice is that the partintion isn't expanded to the total disksize. Otherwise it seems to work. 

My questions. 
1: Can I disable the VMware guest custom during launch if I want to use Cloud-init? In that case, how?
2: 
What is the recommended path, cloud.init o vmware guest custom? Or maybe both somehow?
3: How can I force the partition to max out the disksize? I have the Disk partition set to auto in the advanced tab during launch.

0 Kudos
8 Replies
faillax23
Enthusiast
Enthusiast

I have the same questions, I have Vsphere 5.5 UPD 2 and VIO2.

I prepare windows image with vmware toos or cloud-init but without changes.

With linux guests i have no problems, but with windows guests when i launch a set of istances i receive the random error 'no valid host' and in in the vsphere console appears this messagge "error vmware tools are not installed".

Example:

- launch 20 linux instances results no problem

- launch 20 windows 2012 R2 instances results in 5/20 not working instances in a very random way,

Do you have an idea of how is the right way to prepare a windows image on VIO?

There is a bug in windows lauching? scheduling? of VIO?

I'm struggling with these problems, i have to prepare a working deployment 😞

0 Kudos
NiclasEriksson
Enthusiast
Enthusiast

I didn't test to deploy several windows instances at once before, but now I did and we also have that problem. Deployed 5 instances, 4 came up fine but the 5'th failed before it even created the VM.
0 Kudos
faillax23
Enthusiast
Enthusiast

There is a vmware expert that can tell if this is a bug or we are making a provisioning error with windows images?

Today i create also a windows 7 x64 sp1 image ...  same problem ...

With cirros image i'm able to launch 50 instances at one time without problems.

0 Kudos
ericwbrown
VMware Employee
VMware Employee

1. Yes guest customization can be disabled to avoid conflicts with cloudbase-init

  • Guest customizations in the Nova compute driver is enabled by default for all Windows images
    • To disable (for example if using cloudbase-init):
      • On the management server VM of VIO: Create or edit this file /opt/vmware/vio/custom/custom.yml
      • Set
        • nova_compute_vmware_use_guest_customizations: false
      • Then run to reconfigure the VIO deployment
        • viocli deployment --limit compute configure

2. I would recommend cloudbase-init as the preferred OpenStack method of customization.  But for those VMware users that are more comfortable with guest customizations, the other option exists.

0 Kudos
faillax23
Enthusiast
Enthusiast

Thank you very much!!!

Now my system work perfectly!

So the problem is the new introduced vmware guest customization ... sometimes it doesnt work Smiley Sad

0 Kudos
NiclasEriksson
Enthusiast
Enthusiast

Works great for me as well. Thanks!

0 Kudos
faillax23
Enthusiast
Enthusiast

What about about password metadata?

I installed cloud-init (vmware tools are need or not?) on a windows server 2012 R2 machine.

I select to create the new user Admin  with metadata password then sysprep and shut down

Exported to OVA

Imported to Glance

The instance start but i cant access RDP (Admin user + password selected with horizon) because of "wrong password"

In the console i can see this messagge "Administrator -> you must change password before signin"

Any idea?

0 Kudos
NiclasEriksson
Enthusiast
Enthusiast

During launch make sure to check the "config drive" under advanced. Or set metadata on the image to have the config drive mandatory. 
0 Kudos