Share via


OperatingSystemProfile [SPFSDK][VMROLE]

 

Applies To: Windows Azure Pack

The OperatingSystemProfile object specifies configuration of the operating system that is performed after the operating system virtual hard disk (VHD) is copied as part of provisioning the new virtual machine role (VM role) and before any applications are installed by the Resource Extension template.

Three simple sub-object types are included in this topic, which are described in the WindowsOperatingSystemProfile, DomainJoin, LinuxOperatingSystemProfile sections.

Type hierarchy

VirtualMachineRole (Instance) [SPFSDK][VMROLE].ResourceDefinition [SPFSDK][VMROLE]. IntrinsicSettings [SPFSDK][VMROLE].OperatingSystemProfile

Syntax

{
    "ComputerNamePattern": "computer name",
    "TimeZone": "time zone identifier",
    "AdminCredential": "username:password",

    "WindowsOperatingSystemProfile": {
        "WorkgroupName": "workgroup",
        "DomainJoin": {
            "DomainToJoin": "domain",
            "DomainJoinCredentials": "domain\\user:pwd"
        }
    },

    "LinuxOperatingSystemProfile": {
        "DNSDomainName": "domain",
        "SSHPublicKey": "f3:31:a8:c6:82:18:c8:0f:dd:6b:fb:27:98:83:3d:3b"
    }
}

Properties

Name

Type

Required

Default value

Description

ComputerNamePattern

String

Yes

None

The pattern for the computer name. Use the # character to indicate sequentially increasing numbers. Use the * character to indicate a randomly generated name.

TimeZone

String

Yes

None

The time zone for the virtual machine.

For a complete list of supported time zone entries, you can:

  1. Refer to the values that are listed in the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones on a computer that runs on the Windows 7, Windows Server 2008, or Windows Server 2008 R2 operating system.

  2. You can use the tzutil command-line tool to list the valid time. The tzutil tool is installed by default on Windows 7, Windows Server 2008, and Windows Server 2008 R2.

AdminCredential

String

Yes

None

Local administrator credentials in the format of username:password

WindowsOperatingSystemProfile

WindowsOperatingSystemProfile

Maybe

None

The configuration of the Windows operating system.

Either this property or the LinuxOperatingSystemProfile property must be declared, but not both.

LinuxOperatingSystemProfile

LinuxOperatingSystemProfile

Maybe

null

The configuration of the Linux operating system.

Either this property or the WindowsOperatingSystemProfile property must be declared, but not both.

WindowsOperatingSystemProfile

Name

Type

Required

Default value

Description

WorkgroupName

String

Maybe

None

The name of the workgroup.

Either this property or the DomainJoin property must be declared, but not both.

DomainJoin

DomainJoin

Maybe

None

The domain to join by using credentials.

Either this property or the WorkgroupName property must be declared, but not both.

DomainJoin

Name

Type

Required

Default value

Description

DomainToJoin

String

Yes

None

The name of the domain to join.

DomainJoinCredentials

String

Yes

None

The credentials with which join the domain, in the format of domain\username:password

LinuxOperatingSystemProfile

Name

Type

Required

Default value

Description

DNSDomainName

String

No

None

The DNS domain name.

SSHPublicKey

String

No

None

The Secure Shell (SSH) public key value.

Remarks

The following code example provides a sample OperatingSystemProfile object for the Windows operating system.

{
    "ComputerNamePattern": "MyComputer###",
    "TimeZone": "Pacific Standard Time",
    "AdminCredential": "user1:123abc",

    "WindowsOperatingSystemProfile": {
        "DomainJoin": {
            "DomainToJoin": "Redmond",
            "DomainJoinCredentials": "domain\\user:pwd"
        }
    }
}

The following code example provides a sample OperatingSystemProfile object for the Linux operating system.

{
    "ComputerNamePattern": "MyComputer###",
    "TimeZone": "Pacific Standard Time",
    "AdminCredential": "user1:123abc",

    "LinuxOperatingSystemProfile": {
        "DNSDomainName": "Redmond",
        "SSHPublicKey": "f3:31:a8:c6:82:18:c8:0f:dd:6b:fb:27:98:83:3d:3b"
    }
}

See Also

IntrinsicSettings [SPFSDK][VMROLE]
StorageProfile [SPFSDK][VMROLE]
NetworkProfile [SPFSDK][VMROLE]