Menu
Amazon Elastic Compute Cloud
User Guide for Linux Instances

Step 2: Prepare Your VM

Use the following guidelines to configure your VM before exporting it from the virtualization environment.

  • Review the prerequisites. For more information, see VM Import/Export Prerequisites.

  • Disable any antivirus or intrusion detection software on your VM. These services can be re-enabled after the import process is complete.

  • Uninstall the VMware Tools from your VMware VM.

  • Disconnect any CD-ROM drives (virtual or physical).

  • Set your network to DHCP instead of a static IP address. If you want to assign a static private IP address, be sure to use a non-reserved private IP address in your VPC subnet. Amazon Virtual Private Cloud (Amazon VPC) reserves the first four private IP addresses in a VPC subnet.

  • Shut down your VM before exporting it.

Windows

  • Enable Remote Desktop (RDP) for remote access.

  • Make sure that your host firewall (Windows firewall or similar), if configured, allows access to RDP. Otherwise, you will not be able to access your instance after the import is complete.

  • Make sure that the administrator account and all other user accounts use secure passwords. All accounts must have passwords or the importation might fail.

  • Make sure that your Windows VM has .NET Framework 3.5 or later installed, as required by Amazon Windows EC2Config Service.

  • You can run System Preparation (Sysprep) on your Windows Server 2008 or Windows Server 2012 VM images before or after they are imported. If you run Sysprep before importing your VM, the importation process adds an answer file (unattend.xml) to the VM that automatically accepts the End User License Agreement (EULA) and sets the locale to EN-US. If you choose to run Sysprep after importation, we recommend that you use the Amazon EC2 Config service to run Sysprep.

    To include your own answer file instead of the default (unattend.xml):

    1. Copy the sample unattend.xml file below and set the processorArchitecture parameter to x86 or amd64, depending on your OS architecture:

      <?xml version='1.0' encoding='UTF-8'?>
      <unattend xmlns:wcm='http://schemas.microsoft.com/WMIConfig/2002/State' xmlns='urn:schemas-microsoft-com:unattend'>
       <settings pass='oobeSystem'>
        <component versionScope='nonSxS' processorArchitecture='x86 or amd64' name='Microsoft-Windows-International-Core' publicKeyToken='31bf3856ad364e35' language='neutral'>
         <InputLocale>en-US</InputLocale>
         <SystemLocale>en-US</SystemLocale>
         <UILanguage>en-US</UILanguage>
         <UserLocale>en-US</UserLocale>
        </component> 
        <component versionScope='nonSxS' processorArchitecture='x86 or amd64' name='Microsoft-Windows-Shell-Setup' publicKeyToken='31bf3856ad364e35' language='neutral'>
         <OOBE>
          <HideEULAPage>true</HideEULAPage>
          <SkipMachineOOBE>true</SkipMachineOOBE>
          <SkipUserOOBE>true</SkipUserOOBE>
         </OOBE>
        </component>
       </settings>
      </unattend>
    2. Save the file in the C:\Windows\Panther directory with the name unattend.xml.

    3. Run Sysprep with the /oobe and /generalize options.

      Note

      The /oobe and /generalize options strip all unique system information from the Microsoft Windows installation and will prompt you to reset the administrator password.

    4. Shutdown the VM and export it from your virtualization environment.

  • Disable Autologon on your Windows VM.

  • Make sure that there are no pending Microsoft updates, and that the computer is not set to install software when it reboots.

  • Apply the following hotfixes:

  • Enable the RealTimeIsUniversal registry.

Linux

  • Enable Secure Shell (SSH) for remote access.

  • Make sure that your host firewall (such as Linux iptables) allows access to SSH. Otherwise, you will not be able to access your instance after the import is complete.

  • Make sure that you have configured a non-root user to use public key-based SSH to access your instance after it is imported. The use of password-based SSH and root login over SSH are both possible, but not recommended. The use of public keys and a non-root user is recommended because it is more secure. VM Import will not configure an ec2-user account as part of the import process.

  • Make sure that your Linux VM uses GRUB (GRUB legacy) or GRUB 2 as its bootloader.

  • Make sure that your Linux VM uses a root filesystem is one of the following: EXT2, EXT3, EXT4, Btrfs, JFS, or XFS.