gushiren

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

此tdl和auto文件只可定义windows disk bus以ide模式启动,不支持virtio。

<template>
  <name>Windows-gushiren</name>
  <os>
    <name>Windows</name>
    <version>2008</version>
    <arch>x86_64</arch>
    <install type='iso'>
      <iso>file:///data/md0/DVD/en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617601.iso</iso>
    </install>
  </os>
  <disk>
    <size>40</size>
  </disk>
  <description>Windows2008</description>
    <files>
        <file name="C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\cloud.bat" type="url">
            file:///data/nvme0n1/oz/cloud.bat
        </file>
    </files>
</template>
windows2008.tdl
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  <settings pass="windowsPE">
    <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DiskConfiguration>
    <WillShowUI>OnError</WillShowUI>
    <Disk>
      <CreatePartitions>
        <CreatePartition>
          <Order>1</Order>
          <Size>1</Size>
          <Type>Primary</Type>
        </CreatePartition>
      </CreatePartitions>
      <DiskID>0</DiskID>
      <WillWipeDisk>true</WillWipeDisk>
      <ModifyPartitions>
        <ModifyPartition>
          <Active>true</Active>
          <Extend>true</Extend>
          <Format>NTFS</Format>
          <Label>C drive</Label>
          <Letter>C</Letter>
          <Order>1</Order>
          <PartitionID>1</PartitionID>
        </ModifyPartition>
      </ModifyPartitions>
    </Disk>
      </DiskConfiguration>
      <ImageInstall>
    <OSImage>
      <InstallFrom>
        <MetaData wcm:action="add">
          <Key>/IMAGE/INDEX</Key>
          <Value>1</Value>
        </MetaData>
      </InstallFrom>
      <InstallTo>
        <DiskID>0</DiskID>
        <PartitionID>1</PartitionID>
      </InstallTo>
      <WillShowUI>OnError</WillShowUI>
    </OSImage>
      </ImageInstall>
      <UserData>
    <AcceptEula>true</AcceptEula>
      </UserData>
    </component>
    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SetupUILanguage>
    <UILanguage>en-US</UILanguage>
      </SetupUILanguage>
      <SystemLocale>en-US</SystemLocale>
      <UILanguage>en-US</UILanguage>
      <UserLocale>en-US</UserLocale>
    </component>
  </settings>
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <UserAccounts>
    <AdministratorPassword>
      <Value>Ct@2017Yun!@$%.CN</Value>
      <PlainText>true</PlainText>
    </AdministratorPassword>
      </UserAccounts>
      <AutoLogon>
    <Password>
      <Value>123123</Value>
      <PlainText>true</PlainText>
    </Password>
    <Enabled>true</Enabled>
    <LogonCount>5</LogonCount>
    <Username>administrator</Username>
      </AutoLogon>
      <RegisteredOwner/>
      <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <ProtectYourPC>3</ProtectYourPC>
      </OOBE>
      <FirstLogonCommands>
    <SynchronousCommand wcm:action="add">
      <Order>1</Order>
      <Description>Shutting down Windows</Description>
      <CommandLine>cmd /C shutdown /s /t 0</CommandLine>
    </SynchronousCommand>
      </FirstLogonCommands>
    </component>
  </settings>
</unattend>
windows2008.ks

 

posted on 2018-08-21 16:53  gushiren  阅读(445)  评论(7编辑  收藏  举报