Amazon виртуальная машина linux

Run Amazon Linux 2 as a virtual machine on premises

Use the Amazon Linux 2 virtual machine (VM) images for on-premises development and testing. We offer a different Amazon Linux 2 VM image for each of the supported virtualization platforms. You can view the list of supported platforms on the Amazon Linux 2 virtual machine images page.

To use the Amazon Linux 2 virtual machine images with one of the supported virtualization platforms, do the following:

Step 1: Prepare the seed.iso boot image

The seed.iso boot image includes the initial configuration information that is needed to boot your new VM, such as the network configuration, host name, and user data.

Note

The seed.iso boot image includes only the configuration information required to boot the VM. It does not include the Amazon Linux 2 operating system files.

To generate the seed.iso boot image, you need two configuration files:

  • meta-data – This file includes the hostname and static network settings for the VM.
  • user-data – This file configures user accounts, and specifies their passwords, key pairs, and access mechanisms. By default, the Amazon Linux 2 VM image creates an ec2-user user account. You use the user-data configuration file to set the password for the default user account.
To create the seed.iso boot disc
  1. Create a new folder named seedconfig and navigate into it.
  2. Create the meta-data configuration file.
    1. Create a new file named meta-data .
    2. Open the meta-data file using your preferred editor and add the following.
    local-hostname: vm_hostname # eth0 is the default network interface enabled in the image. You can configure static network settings with an entry like the following. network-interfaces: | auto eth0 iface eth0 inet static address 192.168.1.10 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.254

    For an example meta-data configuration file that specifies a VM hostname ( amazonlinux.onprem ), configures the default network interface ( eth0 ), and specifies static IP addresses for the necessary network devices, see the sample Seed.iso file .

    1. Create a new file named user-data .
    2. Open the user-data file using your preferred editor and add the following.
    #cloud-config #vim:syntax=yaml users: # A user by the name `ec2-user` is created in the image by default. - default chpasswd: list: | ec2-user:plain_text_password # In the above line, do not add any spaces after 'ec2-user:'.
    # NOTE: Cloud-init applies network settings on every boot by default. To retain network settings # from first boot, add the following ‘write_files’ section: write_files: - path: /etc/cloud/cloud.cfg.d/80_disable_network_after_firstboot.cfg content: | # Disable network configuration after first boot network: config: disabled

    You can also create additional user accounts and specify their access mechanisms, passwords, and key pairs. For more information about the supported directives, see Module reference . For an example user-data file that creates three additional users and specifies a custom password for the default ec2-user user account, see the sample Seed.iso file .

    $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data

    For macOS, use a tool such as hdiutil. Navigate one level up from the seedconfig folder, and run the following command.

    $ hdiutil makehybrid -o seed.iso -hfs -joliet -iso -default-volume-name cidata seedconfig/

    Step 2: Download the Amazon Linux 2 VM image

    We offer a different Amazon Linux 2 VM image for each of the supported virtualization platforms. You can view the list of supported platforms and download the correct VM image for your chosen platform from the Amazon Linux 2 virtual machine images page.

    Step 3: Boot and connect to your new VM

    To boot and connect to your new VM, you must have the seed.iso boot image (created in Step 1) and an Amazon Linux 2 VM image (downloaded in Step 2). The steps vary depending on your chosen VM platform.

    The VM image for VMware is made available in the OVF format.

    To boot the VM using VMware vSphere
    1. Create a new datastore for the seed.iso file, or add it to an existing datastore.
    2. Deploy the OVF template, but do not start the VM yet.
    3. In the Navigator panel, right-click the new virtual machine and choose Edit Settings.
    4. On the Virtual Hardware tab, for New device, choose CD/DVD Drive, and then choose Add.
    5. For New CD/DVD Drive, choose Datastore ISO File. Select the datastore to which you added the seed.iso file, browse to and select the seed.iso file, and then choose OK.
    6. For New CD/DVD Drive, select Connect, and then choose OK.

    After you have associated the datastore with the VM, you should be able to boot it.

    To boot the VM using KVM
    1. Open the Create new VM wizard.
    2. For Step 1, choose Import existing disk image.
    3. For Step 2, browse to and select the VM image. For OS type and Version, choose Linux and Red Hat Enterprise Linux 7.0 respectively.
    4. For Step 3, specify the amount of RAM and the number of CPUs to use.
    5. For Step 4, enter a name for the new VM and select Customize configuration before install, and choose Finish.
    6. In the Configuration window for the VM, choose Add Hardware.
    7. In the Add New Virtual Hardware window, choose Storage.
    8. In the Storage configuration, choose Select or create custom storage. For Device type, choose CDROM device. Choose Manage, Browse Local, and then navigate to and select the seed.iso file. Choose Finish.
    9. Choose Begin Installation.
    To boot the VM using Oracle VirtualBox
    1. Open Oracle VirtualBox and choose New.
    2. For Name, enter a descriptive name for the virtual machine, and for Type and Version, select Linux and Red Hat (64-bit) respectively. Choose Continue.
    3. For Memory size, specify the amount of memory to allocate to the virtual machine, and then choose Continue.
    4. For Hard disk, choose Use an existing virtual hard disk file, browse to and open the VM image, and then choose Create.
    5. Before you start the VM, you must load the seed.iso file in the virtual machine’s virtual optical drive:
      1. Select the new VM, choose Settings, and then choose Storage.
      2. In the Storage Devices list, under Controller: IDE, choose the Empty optical drive.
      3. In the Attributes section for the optical drive, choose the browse button, select Choose Virtual Optical Disk File, and then select the seed.iso file. Choose OK to apply the changes and close the Settings.

      After you have added the seed.iso file to the virtual optical drive, you should be able to start the VM.

      The VM image for Microsoft Hyper-V is compressed into a zip file. You must extract the contents of the zip file.

      To boot the VM using Microsoft Hyper-V
      1. Open the New Virtual Machine Wizard.
      2. When prompted to select a generation, select Generation 1.
      3. When prompted to configure the network adapter, for Connection choose External.
      4. When prompted to connect a virtual hard disk, choose Use an existing virtual hard disk, choose Browse, and then navigate to and select the VM image. Choose Finish to create the VM.
      5. Right-click the new VM and choose Settings. In the Settings window, under IDE Controller 1, choose DVD Drive.
      6. For the DVD drive, choose Image file and then browse to and select the seed.iso file.
      7. Apply the changes and start the VM.

      After the VM has booted, log in using one of the user accounts that is defined in the user-data configuration file. After you have logged in for the first time, you can then disconnect the seed.iso boot image from the VM.

      Источник

      Amazon Linux AMI

      Стандартная поддержка Amazon Linux AMI прекращена 31 декабря 2020 г. Теперь она перешла на этап технического обслуживания. Здесь вы найдете полный список поддерживаемых и неподдерживаемых пакетов. Мы рекомендуем нашим клиентам выполнить обновления своих приложений, чтобы иметь возможность использовать сервис Amazon Linux 2, для которого доступна долговременная поддержка до конца 2023 года.

      AMI Amazon Linux

      Amazon Linux AMI – это поддерживаемый и обслуживаемый образ Linux, предоставляемый Amazon Web Services для использования в Amazon Elastic Compute Cloud (Amazon EC2). Он предназначен для обеспечения стабильной, безопасной и высокопроизводительной среды выполнения для приложений, работающих в Amazon EC2. Образ поддерживает возможности новейших типов инстансов EC2 и содержит пакеты для простой интеграции с AWS. AWS регулярно выпускает обновления безопасности и рабочие исправления для всех инстансов, на которых используется AMI Amazon Linux. AMI Amazon Linux предоставляется пользователям Amazon EC2 бесплатно.

      Основные возможности

      Интеграция с сервисами AWS

      AMI Amazon Linux включает в себя пакеты и конфигурации, которые обеспечивают тесную интеграцию с Amazon Web Services. AMI Amazon Linux поставляется с большим количеством предварительно установленных инструментов API AWS и CloudInit. Инструменты API AWS позволяют использовать скрипты для выполнения важных задач по выделению ресурсов внутри инстанса Amazon EC2. CloudInit позволяет во время запуска инстансов передавать на них команды для выполнения определенных действий, связанных с конфигурацией, что дает возможность осуществлять удаленную конфигурацию инстансов Amazon EC2. Команды передаются с помощью полей пользовательских данных EC2.

      Образы AMI Amazon Linux доступны во всех регионах AWS. Подробнее см. в таблице поддерживаемых комбинаций образов AMI Amazon Linux и типов инстансов.

      Безопасная конфигурация

      Конфигурация AMI Amazon Linux повышает безопасность по двум основным направлениям: ограничение доступа и снижение уязвимости программного обеспечения. Для ограничения удаленного доступа в AMI Amazon Linux используются пары SSH‑ключей и запрещается удаленное подключение с правами root. Кроме того, AMI Amazon Linux содержит меньше второстепенных пакетов, что позволяет уменьшить количество потенциальных уязвимостей безопасности. Критические и важные обновления безопасности применяются автоматически при начальной загрузке AMI. После входа в систему отображается «Сообщение дня» (из файла /etc/motd), в котором указано, доступны ли дополнительные обновления.

      Доступ к репозиторию пакетов

      AMI Amazon Linux включает в себя пакеты и конфигурации, которые обеспечивают полную интеграцию с Amazon Web Services. Это позволяет запускать и использовать AMI Amazon Linux с различными сервисами AWS без дополнительной настройки.

      Репозитории доступны во всех регионах через менеджер пакетов yum. Размещение репозиториев в каждом регионе позволяет выполнять обновление быстро и без расходов на передачу данных.

      Обновления безопасности

      Обновления безопасности можно установить из репозиториев AMI Amazon Linux с помощью менеджера пакетов yum. Кроме того, можно воспользоваться обновленными образами AMI Amazon Linux. Предупреждения о необходимости установки обновлений безопасности публикуются в Центре безопасности AMI Amazon Linux. Для получения подробной информации о политиках безопасности AWS, а также для отправки сообщений о выявленных проблемах безопасности обращайтесь в Центр безопасности AWS.

      Облегченная конфигурация

      По умолчанию AMI Amazon Linux включает в себя небольшой набор сервисов, служебных программ и инструментов для интеграции с AWS. Образ AMI Amazon Linux AMI служит функциональной основой, которую можно расширить путем добавления дополнительных служебных программ и сервисов с помощью репозиториев пакетов. Начало работы с меньшим количеством пакетов означает, что меньше компонентов требует обслуживания, а системам безопасности меньше угрожают потенциальные уязвимости.

      AWS Support

      Помощь по установке и использованию базового образа AMI Amazon Linux предоставляется в рамках подписки на сервисы AWS Support. Подробнее об AWS Support см. на веб‑странице AWS Support.

      Предыдущие версии AMI и обновленные пакеты можно запускать в Amazon EC2 и устанавливать из yum‑репозитория AMI Amazon Linux даже после выпуска новых версий AMI Amazon Linux.

      Тем не менее для обеспечения наилучшего качества обслуживания мы рекомендуем клиентам использовать самые последние версии AMI Amazon Linux.

      Цены

      AMI Amazon Linux предоставляется пользователям Amazon EC2 бесплатно. За запуск инстансов Amazon EC2 и использование других сервисов AWS взимается стандартная плата.

      Источник

      Читайте также:  Подсистема линукс виндовс 10
Оцените статью
Adblock
detector