I'm trying to create a VM using the Azure Python SDK and the service management services in Azure, as documented here:
http://azure.microsoft.com/en-us/documentation/articles/cloud-services-python-how-to-use-service-management/#CreateVM
However, I can't seem to get a simple example to create a Windows-based VM to work. Here's a snippet from my attempt:
image_name = 'regthree-20140626-os-2014-06-26.vhd'
media_link = 'https://regressiondeploy.blob.core.windows.net/vhds/regthree-foobar-out.vhd'
windows_config = WindowsConfigurationSet(computer_name='testmachine',admin_username='luciens',admin_password='abc-123+')
os_hd = OSVirtualHardDisk(image_name, media_link)
sms.create_virtual_machine_deployment(
service_name=name,
deployment_name=name,
deployment_slot='production',
label=name,
role_name='role1',
system_config=windows_config,
os_virtual_hard_disk=os_hd,
With the WindowsConfigurationSet() object initialized like this, the server returns this error:
"Invalid domain join
information specified. Ensure that the JoinDomain setting is specified, and tha
t either the Credentials or Provisioning setting is specified. See the Windows
Automated Installation Kit documentation for more information"
If I try something like admin_username='TESTMACHINE\luciens' the server returns:
"Invalid Windows administrator username"
The VMs don't join any domain; they only need to talk to Azure services out on the internet and that's it.
So what is a valid admin username? Nothing I've tried seems to work here.
LS