I found the reason. ;-)
Below code fixed my problem. Setting extra properties of GuestCustomizationSection fixed it. Look at red font color section.
GuestCustomizationSectionType guest_settings = vm.GetGuestCustomizationSection(); guest_settings.ComputerName = computerName; guest_settings.ChangeSid = true; guest_settings.ChangeSidSpecified = true; guest_settings.UseOrgSettings = false; guest_settings.UseOrgSettingsSpecified = true; guest_settings.DomainName = "<your doamin name>"; guest_settings.DomainUserName = "<user name>"; guest_settings.DomainUserPassword = "<password>"; guest_settings.JoinDomainEnabled = true; guest_settings.JoinDomainEnabledSpecified = true;
task = vm.UpdateSection(guest_settings); task.WaitForTask(timeout);