Коробка Chef Kitchen Vagrant не запускается при добавлении дополнительных дисков - PullRequest
0 голосов
/ 15 мая 2018

Разработка происходит на Mac OSX

Запись кулинарной книги для динамического разделения, форматирования и монтирования дисков на основе дисков, которые не разбиты на разделы, не смонтированы или не отформатированы. Возможно, они были выведены из конфигурации raid-0 с одним приводом или еще не настроены через raid-контроллер ...

Во время работы над написанием тестовых примеров для поваренной книги У меня следующие проблемы.

.kitchen.yml file:

driver:
  name: vagrant
  # ssh:
  #   insert_key: false
  customize:
    cableconnected1: 'on'
      createhd:
      - filename: /tmp/disk1.vdi
        size: 128
    storagectl:
      - name: SATA Controller
        portcount: 4
    storageattach:
      - storagectl: SATA Controller
        port: 0
        device: 0
        type: hdd
        medium: /tmp/disk1.vdi
  privileged: true

Команда: kitchen verify

Застревает на следующем

Выход:

    -----> Starting Kitchen (v1.20.0)
    $$$$$$ Deprecated configuration detected:
    require_chef_omnibus
    Run 'kitchen doctor' for details.

    -----> Creating <default-centos-7>...
    (erb):173: warning: constant ::Fixnum is deprecated
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'bento/centos-7'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Checking if box 'bento/centos-7' is up to date...
    ==> default: Setting the name of the VM: default-centos- 
    7_default_1526333511693_18382
    ==> default: Fixed port collision for 22 => 2222. Now on port 2200.
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
    ==> default: Forwarding ports...
        default: 22 (guest) => 2200 (host) (adapter 1)
    ==> default: Running 'pre-boot' VM customizations...
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few 
    minutes...
       default: SSH address: 127.0.0.1:2200
       default: SSH username: vagrant
       default: SSH auth method: private key
       Timed out while waiting for the machine to boot. This means that
   Vagrant was unable to communicate with the guest machine within
   the configured ("config.vm.boot_timeout" value) time period.

   If you look above, you should be able to see the error(s) that
   Vagrant had when attempting to connect to the machine. These errors
   are usually good hints as to what may be wrong.

   If you're using a custom box, make sure that networking is properly
   working and you're able to connect to the machine. It is a common
   problem that networking isn't setup properly in these boxes.
   Verify that authentication configurations are also setup properly,
   as well.

   If the box appears to be booting properly, you may want to increase
   the timeout ("config.vm.boot_timeout") value.

Больше не будет. Код для добавления диска был взят непосредственно из документации для добавления диска. Я могу удалить разделы createhd, storagectl и storageattach, после чего блок vagrant работает как положено. Я проверил, что файл /tmp/disk1.vdi создан, я также должен удалить файл между запусками, после уничтожения кухни, иначе я получаю следующую ошибку:

    -----> Starting Kitchen (v1.20.0)
    $$$$$$ Deprecated configuration detected:
    require_chef_omnibus
    Run 'kitchen doctor' for details.

    -----> Creating <default-centos-7>...
    (erb):173: warning: constant ::Fixnum is deprecated
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Checking if box 'bento/centos-7' is up to date...
    ==> default: Machine not provisioned because `--no-provision` is 
    specified.
    Waiting for SSH service on 127.0.0.1:2200, retrying in 3 seconds

Он будет продолжать зависать retying in 3 seconds до тех пор, пока я не выполню команду.

Я пробовал с и без:

    ssh: 
      insert_key: false

Я пробовал разные форматы файлов, которые vagrant должен поддерживать как диск, включая .vdi, .vmdk

Я убедился, что SATA Controller - соответствующий контроллер, доступный для коробки.

1 Ответ

0 голосов
/ 15 мая 2018

Это похоже на проблему с версиями vagrant и virtualbox. Вы можете найти похожую проблему здесь

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...