Packer: builder / qemu: le packer envoie le mauvais code clé pour "

Créé le 7 janv. 2018  ·  48Commentaires  ·  Source: hashicorp/packer

version du packer: 1.1.3
version de qemu: 2.11
Plateforme hôte: Arch Linux

Bonjour,
packer envoie le mauvais code clé pour "<". Ma ligne vagrant.json ressemble à ceci:

            "boot_command": [
                "<enter><wait10><wait10><wait10><wait10><wait10><enter><enter>",
                "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-chroot}.sh'<enter><wait>",
                "bash install.sh < install-chroot.sh && systemctl reboot<enter>"
            ]

Avec PACKER_LOG=1 je vois cette ligne:

2018/01/07 01:07:07 packer-io: 2018/01/07 01:07:07 Sending char '<', code 60, shift true

mais dans ma session VNC dans mon qemu, je vois cette ligne:

bash install.sh > install-chroot.sh && systemctl reboot
buildeqemu question

Commentaire le plus utile

@foutrelis merci beaucoup pour le débogage!

Tous les 48 commentaires

Le code 60 est le code clé correct pour <. Très probablement, vous avez un keymap (logiciel) dans la VM remappant cette clé au caractère>.

FWIW, avec xev Je vois le code clé 59 pour < et le code clé 60 pour > .

Cela semble provenir de xkeyboard-config:

$ grep -A1 'less, lesst' /usr/share/X11/xkb/symbols/us 
    key <AB08> { [     comma,       less, lessthanequal,      dead_macron ] };
    key <AB09> { [    period,    greater, greaterthanequal,    dead_breve ] };
$ grep AB0[89] /usr/share/X11/xkb/keycodes/evdev 
    <AB08> = 59;
    <AB09> = 60;

@ rickard-von-essen Lorsque je tape le "<" manuellement, cela fonctionne. Donc, je ne pense pas que j'ai le mauvais keymap dans la VM.

0x3c => 60 voir vnc_keysym.h

Si vous fournissez les informations demandées dans le modèle de problème, cela nous permet de reproduire plus rapidement ceci:

  • Sortie du journal de débogage de PACKER_LOG=1 packer build template.json .
    Veuillez coller ceci dans un résumé .
  • Le modèle d'exemple le plus simple et les scripts sont nécessaires pour reproduire le bogue
    Incluez-les dans votre essence .

@ rickard-von-essen

Le modèle: https://github.com/archlinux/arch-boxes/blob/master/vagrant.json
Projet: https://github.com/archlinux/arch-boxes/ (branche principale)
Lien vers le journal Packer: http://ix.io/DPe
Lien vers la capture d'écran de la session VNC: http://ix.io/DPf

Le code clé dans la session vnc est incorrect. Le packer_log indique que le bon code est soumis mais la session VNC montre une autre clé sur cette position. Comment est-ce possible? Je suppose qu'il y a quelque chose à faire avec la version qemu: 2.11

Vos guillemets simples (') ne ressemblent-ils pas aussi à des apostrophes (')?

@ rickard-von-essen mhhh pas sûr. Peut-être la police? Je vais vérifier cela.
Avez-vous des nouvelles de ce comportement fou de keycode?

@foutrelis avez-vous le même problème? Si oui, quelle est votre version du système d'exploitation (invité et hôte) qemu et la version du packer?

@shibumi n'a pas encore eu le temps de lire le repro.

Une mise à jour pour ceci?

@vtolstov Ce serait génial si vous pouviez le reprocher?

Dans qemu builder, je ne peux pas reproduire ce problème:
qemu 2.11.0-4.fc27.x86_64 fedora 27

journal de l'emballage:
2018/01/21 23:47:34 packerio: 2018/01/21 23:47:34 Envoi du caractère '<', code 60, shift true

OS invité: debian jessie 8.10.0

Salut @vtolstov ,
pouvez-vous essayer la dernière ISO Arch linux en tant qu'OS invité? https://www.archlinux.de/download/iso/2018.01.01/archlinux-2018.01.01-x86_64.iso

Et avez-vous vérifié le bon caractère? Il me semble que vous n'avez regardé que sur le journal de l'emballage. J'avais la même ligne en exécutant packer ..

Voici ma configuration de packer: https://github.com/archlinux/arch-boxes/blob/master/vagrant.json

Gardez à l'esprit que vous devez modifier certaines variables dans vagrant.json

je ne confirme pas ce problème. fedora 27:
archlinux 2018.01.01
boot_command: ">>>> <<<"
fonctionne bien dans le constructeur de qemu

Est-il possible que cela ait quelque chose à voir avec le système hôte ou les paramètres régionaux du système hôte?
@foutrelis exécute également Arch Linux en tant que système hôte et a les mêmes problèmes.

Sur mon ordinateur portable (Arch Linux), j'obtiens également le code clé "60" pour ">":

KeyRelease event, serial 33, synthetic NO, window 0x1a00001,
    root 0xce, subw 0x0, time 7199217, (202,929), root:(1485,951),
    state 0x1, keycode 94 (keysym 0x3e, greater), same_screen YES,
    XKeysymToKeycode returns keycode: 60
    XLookupString gives 1 bytes: (3e) ">"
    XFilterEvent returns: False

localectl dit:

  System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: us

Voici une capture d'écran supplémentaire du problème

Vous pouvez voir à 20:10:48 la clé "<" dans le packer mais sur la session VNC vous pouvez clairement voir un ">". Est-ce que je peux remplacer le code clé?

Je n'ai aucune idée de pourquoi ce comportement n'existe que sur les systèmes hôtes Arch Linux. Peut-être un logiciel plus récent? Si tel est le cas, toutes les autres distributions fonctionneront avec la même erreur à l'avenir.

   System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: n/a
< - key press 59
< - key release 59
> - key press 60
> - key release 60

je pense que vous pouvez expérimenter avec le clavier qemu lang pour vnc ...

@vtolstov Eh bien sur VNC, cela fonctionne plutôt bien. Quand j'appuie sur ">" j'obtiendrai ">" (idem pour "<"). Le problème est le packer .. packer semble envoyer le mauvais code clé. J'aurais besoin d'un moyen de remplacer les codes clés pour le packer. Mais je suppose que ce n'est pas possible sans changer directement le code go. (Si tout échoue, je pense que je vais juste patcher le code ... cela vous dérange-t-il de me montrer le mappage dans votre? Ensuite, je vais simplement appliquer le correctif pour toutes les images de packer dans arch linux. Je maintiens packer sur arch linux.)

@shibumi désolé pour ma question, mais utilisez-vous directement le constructeur de qemu ou utilisez-vous vagrant / virtualbox?
Pouvez-vous essayer ce modèle de packer:

{
    "variables": {
        "name": "archlinux-current-x86_64"
    },
    "builders": [
        {
            "accelerator": "kvm",
            "boot_command": [
                "<enter><wait120s>",
                "<enter><wait10s>",
                "echo <<< >>><wait60m>"
            ],
            "boot_wait": "14s",
            "disk_interface": "virtio-scsi",
            "disk_size": 5000,
            "disk_cache": "unsafe",
            "disk_discard": "unmap",
            "disk_compression": true,
            "iso_skip_cache": true,
            "format": "qcow2",
            "headless": true,
            "http_directory": "http",
            "iso_urls": [ "http://mirror.yandex.ru/archlinux/iso/latest/archlinux-2018.01.01-x86_64.iso" ],
            "net_device": "virtio-net",
            "output_directory": "output/{{user `name`}}-qemu/",
            "machine_type": "q35",
            "qemuargs": [
                [
                    "-m",
                    "768"
                ]
            ],
            "shutdown_command": "systemctl poweroff",
            "ssh_password": "packer",
            "ssh_username": "root",
            "ssh_wait_timeout": "1h",
            "type": "qemu",
            "vm_name": "{{user `name`}}.qcow2"
        }
    ]
}

Je suis intéressant d'une partie de l'écho dans boot_command ...

Cela fait partie de ma configuration lorsque je crée une image d'archive pour notre hébergement vps

également, veuillez envoyer la cmdline qemu complète à partir de la commande ps lorsque vous exécutez la compilation du packer avec vous config

@vtolstov Même résultat que mon vagrant.json:

Vous pouvez voir que la sortie dans le journal du packer semble correcte .. mais dans le vncviewer, vous pouvez clairement voir à nouveau que le résultat est juste: echo >>> >>>

Vous utilisez le binaire packer de la page de publication ou le compilez à la main? Si à la main - quelle version go avez-vous?

est-il possible de désactiver la mise en page x11 lors de l'exécution de packer?
Quel client vnc utilisez-vous également? Ma question est la suivante: envoie-t-il KeyEvent ou envoie-t-il quelque chose comme QemuExtendedKeyEvent ou d'autres choses spécifiques ...

@vtolstov
J'utilise le paquet officiel arch linux de packer: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/packer -io
Il s'agit de la version 1.1.3 avec go 1.9.3. Le processus de compilation s'exécute sur l'un de nos serveurs de compilation arch linux. (Nous construisons des images Linux officielles de l'archive avec lui). Il n'y a pas de jeu de disposition X11.

En tant que client VNC, j'utilise gvncviewer, mais cela n'a pas vraiment d'importance. Parce que j'attache le gvncviewer APRÈS avoir vu les lignes de débogage dans la sortie PACKER_LOG. Il est donc impossible qu'une clé ait été envoyée au processus.

Ce que vous voyez sur la capture d'écran est exactement ce que produit le packer. Comme je l'ai dit .. cela ressemble au code clé pour "<". (Quand je tape "<" normalement via VNC dans la machine, cela fonctionne btw ...)

Je suis presque sûr que le code d'accès a changé en raison d'une nouvelle version du logiciel. (Arch Linux exécute de nouvelles versions stables de chaque logiciel). Par conséquent, je suis presque sûr que vous exécuterez ce comportement avec toutes les autres distributions à l'avenir. C'est juste une question de temps..

J'essaie de comprendre pourquoi exactement la même version de packer envoie exactement le même code clé que celui produit sur vous hébergez une clé différente à l'intérieur de vnc.
Si cela est possible, pouvez-vous essayer le binaire alpin qemu?

Question sur la visionneuse - parce que j'ai besoin de savoir quel message vous envoie le client lorsque vous voyez le bon symbole.

@vtolstov
Bien sûr, je peux tester le binaire qemu sur linux alpin. Donne-moi du temps. Je dois installer alpine sur une machine, installer qemu et packer et réessayer.

J'aimerais également tester d'autres choses (merci à @bastelfreak pour cela):

  1. Testez votre fichier json avec un autre système d'exploitation invité (peut-être Debian?)
  2. Téléchargez votre binaire packer et essayez-le avec votre binaire officiel (peut-être qu'il y a quelque chose qui ne va pas dans le paquet officiel arch linux (?))

@vtolstov
Ce que je peux dire pour le moment, c'est que sur Arch Linux, le code clé pour "<" n'est certainement pas 60. Parce que sur Arch Linux, le code clé 60 est ">"

@shibumi oui, et c'est étrange aussi, car j'ai 60 pour <et 62 pour>

@shibumi vous pouvez utiliser l'image alpine docker, je construis mes images à partir d'un conteneur docker privilégié.

des nouvelles?

désolé, je n'ai pas encore le temps. Je vais probablement le tester ce week-end et je peux en dire plus.

@vtolstov J'ai quelques problèmes avec essayer packer sur linux alpin. Une idée?

/ # PACKER_LOG=1 ./packer build test.json
2018/02/11 02:42:14 [INFO] Packer version: 1.2.0
2018/02/11 02:42:14 Packer Target OS/Arch: linux amd64
2018/02/11 02:42:14 Built with Go Version: go1.9.4
2018/02/11 02:42:14 Detected home directory from env var: /root
2018/02/11 02:42:14 Using internal plugin for cloudstack
2018/02/11 02:42:14 Using internal plugin for docker
2018/02/11 02:42:14 Using internal plugin for file
2018/02/11 02:42:14 Using internal plugin for lxc
2018/02/11 02:42:14 Using internal plugin for lxd
2018/02/11 02:42:14 Using internal plugin for openstack
2018/02/11 02:42:14 Using internal plugin for qemu
2018/02/11 02:42:14 Using internal plugin for amazon-ebssurrogate
2018/02/11 02:42:14 Using internal plugin for oracle-oci
2018/02/11 02:42:14 Using internal plugin for parallels-iso
2018/02/11 02:42:14 Using internal plugin for triton
2018/02/11 02:42:14 Using internal plugin for vmware-vmx
2018/02/11 02:42:14 Using internal plugin for alicloud-ecs
2018/02/11 02:42:14 Using internal plugin for parallels-pvm
2018/02/11 02:42:14 Using internal plugin for amazon-ebsvolume
2018/02/11 02:42:14 Using internal plugin for azure-arm
2018/02/11 02:42:14 Using internal plugin for vmware-iso
2018/02/11 02:42:14 Using internal plugin for hyperv-vmcx
2018/02/11 02:42:14 Using internal plugin for null
2018/02/11 02:42:14 Using internal plugin for oracle-classic
2018/02/11 02:42:14 Using internal plugin for amazon-ebs
2018/02/11 02:42:14 Using internal plugin for amazon-chroot
2018/02/11 02:42:14 Using internal plugin for amazon-instance
2018/02/11 02:42:14 Using internal plugin for digitalocean
2018/02/11 02:42:14 Using internal plugin for googlecompute
2018/02/11 02:42:14 Using internal plugin for hyperv-iso
2018/02/11 02:42:14 Using internal plugin for ncloud
2018/02/11 02:42:14 Using internal plugin for oneandone
2018/02/11 02:42:14 Using internal plugin for scaleway
2018/02/11 02:42:14 Using internal plugin for virtualbox-ovf
2018/02/11 02:42:14 Using internal plugin for profitbricks
2018/02/11 02:42:14 Using internal plugin for virtualbox-iso
2018/02/11 02:42:14 Using internal plugin for puppet-server
2018/02/11 02:42:14 Using internal plugin for shell
2018/02/11 02:42:14 Using internal plugin for shell-local
2018/02/11 02:42:14 Using internal plugin for windows-restart
2018/02/11 02:42:14 Using internal plugin for windows-shell
2018/02/11 02:42:14 Using internal plugin for chef-client
2018/02/11 02:42:14 Using internal plugin for chef-solo
2018/02/11 02:42:14 Using internal plugin for powershell
2018/02/11 02:42:14 Using internal plugin for ansible-local
2018/02/11 02:42:14 Using internal plugin for converge
2018/02/11 02:42:14 Using internal plugin for salt-masterless
2018/02/11 02:42:14 Using internal plugin for ansible
2018/02/11 02:42:14 Using internal plugin for file
2018/02/11 02:42:14 Using internal plugin for puppet-masterless
2018/02/11 02:42:14 Using internal plugin for amazon-import
2018/02/11 02:42:14 Using internal plugin for docker-push
2018/02/11 02:42:14 Using internal plugin for manifest
2018/02/11 02:42:14 Using internal plugin for shell-local
2018/02/11 02:42:14 Using internal plugin for vagrant
2018/02/11 02:42:14 Using internal plugin for vsphere
2018/02/11 02:42:14 Using internal plugin for alicloud-import
2018/02/11 02:42:14 Using internal plugin for artifice
2018/02/11 02:42:14 Using internal plugin for docker-import
2018/02/11 02:42:14 Using internal plugin for docker-save
2018/02/11 02:42:14 Using internal plugin for atlas
2018/02/11 02:42:14 Using internal plugin for checksum
2018/02/11 02:42:14 Using internal plugin for googlecompute-export
2018/02/11 02:42:14 Using internal plugin for compress
2018/02/11 02:42:14 Using internal plugin for docker-tag
2018/02/11 02:42:14 Using internal plugin for vagrant-cloud
2018/02/11 02:42:14 Using internal plugin for vsphere-template
2018/02/11 02:42:14 Detected home directory from env var: /root
2018/02/11 02:42:14 Attempting to open config file: /root/.packerconfig
2018/02/11 02:42:14 [WARN] Config file doesn't exist: /root/.packerconfig
2018/02/11 02:42:14 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[lxc:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxc qemu:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu null:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null oracle-classic:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-classic lxd:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd oracle-oci:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci alicloud-ecs:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs parallels-pvm:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm oneandone:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oneandone scaleway:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway virtualbox-ovf:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-ovf virtualbox-iso:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox-iso file:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-file parallels-iso:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso vmware-vmx:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx amazon-instance:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance amazon-chroot:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-chroot hyperv-iso:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-iso docker:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-docker amazon-ebsvolume:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume azure-arm:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm vmware-iso:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-iso amazon-ebs:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebs digitalocean:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-digitalocean googlecompute:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute cloudstack:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack openstack:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack amazon-ebssurrogate:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate triton:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton hyperv-vmcx:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx ncloud:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud profitbricks:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-profitbricks] PostProcessors:map[googlecompute-export:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export amazon-import:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import manifest:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest alicloud-import:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import artifice:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice checksum:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum docker-save:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save vagrant-cloud:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud docker-push:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push shell-local:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-shell-local compress:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-compress vsphere-template:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere-template vagrant:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant vsphere:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere docker-import:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import atlas:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-atlas docker-tag:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag] Provisioners:map[puppet-server:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server salt-masterless:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless ansible:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible file:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file puppet-masterless:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless chef-solo:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-solo powershell:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell converge:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge shell-local:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local windows-shell:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell ansible-local:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local shell:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell windows-restart:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart chef-client:/packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client]}
2018/02/11 02:42:14 Detected home directory from env var: /root
2018/02/11 02:42:14 Setting cache directory: /packer_cache
2018/02/11 02:42:14 Detected home directory from env var: /root
2018/02/11 02:42:14 Loading builder: qemu
2018/02/11 02:42:14 Plugin could not be found. Checking same directory as executable.
2018/02/11 02:42:14 Current exe path: /packer
2018/02/11 02:42:14 Creating plugin client for path: /packer
2018/02/11 02:42:14 Starting plugin: /packer []string{"/packer", "plugin", "packer-builder-qemu"}
2018/02/11 02:42:14 Waiting for RPC address for: /packer
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 [INFO] Packer version: 1.2.0
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Packer Target OS/Arch: linux amd64
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Built with Go Version: go1.9.4
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Detected home directory from env var: /root
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Attempting to open config file: /root/.packerconfig
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 [WARN] Config file doesn't exist: /root/.packerconfig
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[] PostProcessors:map[] Provisioners:map[]}
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Detected home directory from env var: /root
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Setting cache directory: /packer_cache
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 args: []string{"packer-builder-qemu"}
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Plugin minimum port: 10000
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Plugin maximum port: 25000
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Detected home directory from env var: /root
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Plugin address: unix /tmp/packer-plugin568161178
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Waiting for connection...
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Serving a plugin connection...
2018/02/11 02:42:14 ui: qemu output will be in this color.
2018/02/11 02:42:14 ui: 
2018/02/11 02:42:14 Build debug mode: false
2018/02/11 02:42:14 Force build: false
2018/02/11 02:42:14 On error: 
2018/02/11 02:42:14 Preparing build: qemu
qemu output will be in this color.

2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 use specified accelerator: kvm
2018/02/11 02:42:14 ui: Warnings for build 'qemu':

2018/02/11 02:42:14 ui: * A checksum type of 'none' was specified. Since ISO files are so big,
a checksum is highly recommended.
2018/02/11 02:42:14 ui: 
2018/02/11 02:42:14 Waiting on builds to complete...
2018/02/11 02:42:14 Starting build run: qemu
2018/02/11 02:42:14 Running builder: qemu
2018/02/11 02:42:14 [INFO] (telemetry) Starting builder qemu
Warnings for build 'qemu':

* A checksum type of 'none' was specified. Since ISO files are so big,
a checksum is highly recommended.
2018/02/11 02:42:14 packer: 2018/02/11 02:42:14 Qemu path: /usr/bin/qemu-system-x86_64, Qemu Image page: /usr/bin/qemu-img

2018/02/11 02:42:14 ui error: ==> qemu: No byte serving support. The HTTP server must support Accept-Ranges=bytes
==> qemu: No byte serving support. The HTTP server must support Accept-Ranges=bytes
2018/02/11 02:42:14 [INFO] (telemetry) ending qemu
2018/02/11 02:42:14 [INFO] (telemetry) found error: No byte serving support. The HTTP server must support Accept-Ranges=bytes
2018/02/11 02:42:14 ui error: Build 'qemu' errored: No byte serving support. The HTTP server must support Accept-Ranges=bytes
2018/02/11 02:42:14 Builds completed. Waiting on interrupt barrier...
2018/02/11 02:42:14 machine readable: error-count []string{"1"}
2018/02/11 02:42:14 ui error: 
==> Some builds didn't complete successfully and had errors:
2018/02/11 02:42:14 machine readable: qemu,error []string{"No byte serving support. The HTTP server must support Accept-Ranges=bytes"}
2018/02/11 02:42:14 ui error: --> qemu: No byte serving support. The HTTP server must support Accept-Ranges=bytes
2018/02/11 02:42:14 ui: 
==> Builds finished but no artifacts were created.
2018/02/11 02:42:14 [INFO] (telemetry) Finalizing.
Build 'qemu' errored: No byte serving support. The HTTP server must support Accept-Ranges=bytes

==> Some builds didn't complete successfully and had errors:
--> qemu: No byte serving support. The HTTP server must support Accept-Ranges=bytes

==> Builds finished but no artifacts were created.
2018/02/11 02:42:15 waiting for all plugin processes to complete...
2018/02/11 02:42:15 /packer: plugin process exited

Je rencontre les mêmes symptômes sur macOS 10.12.6. Impossible de reproduire sur Ubuntu 17.10.

J'ai qemu de MacPorts sur macOS.

$ port installed | grep qemu
  qemu @2.11.0_0+cocoa+target_i386+target_x86_64+usb+vnc (active)

Voici un extrait de ma configuration:

{
    "builders": [
        {
            "boot_command": [
                "S<enter>",
                "cat <<EOF >>install.conf<enter>",
                "Choose your keyboard layout = default<enter>",
================== SNIP ==================
                "EOF<enter>",
                "install -af install.conf && reboot<enter>"
            ],
            "boot_wait": "30s",
            "disk_interface": "virtio",
            "disk_size": 80000,
            "format": "qcow2",
            "headless": true,
            "iso_checksum": "b7994d29c7db3087db65158901d700fb7d10500b9b7496c1d86b285cabce0a2b",
            "iso_checksum_type": "sha256",
            "iso_checksum_url": "{{user `iso_mirror`}}/pub/OpenBSD/6.2/amd64/SHA256",
            "iso_url": "{{user `iso_mirror`}}/pub/OpenBSD/6.2/amd64/install62.iso",
            "net_device": "e1000",
            "output_directory": "openbsd62",
            "shutdown_command": "/sbin/halt -p",
            "type": "qemu",
            "ssh_host_port_min": 2222,
            "ssh_host_port_max": 2229,
            "ssh_password": "root",
            "ssh_port": 22,
            "ssh_username": "root",
            "ssh_wait_timeout": "1800s",
            "vm_name": "openbsd62.qcow2"
        }
    ],
    "post-processors": [],
    "provisioners": [],
    "variables": {
        "iso_mirror": "http://ftp.openbsd.org"
    }
}

Comme on peut le voir sur la capture d'écran, << n'est pas imprimé.

screen

==> qemu: Typing the boot command over VNC...
2018/02/27 13:47:12 packer: 2018/02/27 13:47:12 Sending char 'S', code 83, shift true
2018/02/27 13:47:12 packer: 2018/02/27 13:47:12 Special code '<enter>' found, replacing with: 65293
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Sending char 'c', code 99, shift false
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Sending char 'a', code 97, shift false
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Sending char 't', code 116, shift false
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Sending char ' ', code 32, shift false
2018/02/27 13:47:14 packer: 2018/02/27 13:47:14 Sending char '<', code 60, shift true
2018/02/27 13:47:14 packer: 2018/02/27 13:47:14 Sending char '<', code 60, shift true
2018/02/27 13:47:14 packer: 2018/02/27 13:47:14 Sending char 'E', code 69, shift true
2018/02/27 13:47:15 packer: 2018/02/27 13:47:15 Sending char 'O', code 79, shift true
2018/02/27 13:47:15 packer: 2018/02/27 13:47:15 Sending char 'F', code 70, shift true
2018/02/27 13:47:15 packer: 2018/02/27 13:47:15 Sending char ' ', code 32, shift false
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Sending char '>', code 62, shift true
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Sending char '>', code 62, shift true
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Sending char 'i', code 105, shift false
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Sending char 'n', code 110, shift false
2018/02/27 13:47:17 packer: 2018/02/27 13:47:17 Sending char 's', code 115, shift false
2018/02/27 13:47:17 packer: 2018/02/27 13:47:17 Sending char 't', code 116, shift false
2018/02/27 13:47:17 packer: 2018/02/27 13:47:17 Sending char 'a', code 97, shift false
2018/02/27 13:47:18 packer: 2018/02/27 13:47:18 Sending char 'l', code 108, shift false
2018/02/27 13:47:18 packer: 2018/02/27 13:47:18 Sending char 'l', code 108, shift false
2018/02/27 13:47:18 packer: 2018/02/27 13:47:18 Sending char '.', code 46, shift false


$ env PACKER_LOG = 1 ~ / bin / packer build openbsd-6.2-x86_64.json
2018/02/27 13:46:39 [INFO] Version du packer: 1.2.1
2018/02/27 13:46:39 Packer Target OS / Arch: darwin amd64
2018/02/27 13:46:39 Construit avec Go Version: go1.10
2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 Utilisation du plugin interne pour digitalocean
2018/02/27 13:46:39 Utilisation du plugin interne pour hyperv-iso
2018/02/27 13:46:39 Utilisation du plugin interne pour vmware-vmx
2018/02/27 13:46:39 Utilisation du plugin interne pour amazon-instance
2018/02/27 13:46:39 Utilisation du plugin interne pour virtualbox-ovf
2018/02/27 13:46:39 Utilisation du plugin interne pour vmware-iso
2018/02/27 13:46:39 Utilisation du plugin interne pour azure-arm
2018/02/27 13:46:39 Utilisation du plugin interne pour cloudstack
2018/02/27 13:46:39 Utilisation du plugin interne pour virtualbox-iso
2018/02/27 13:46:39 Utilisation du plugin interne pour parallels-pvm
2018/02/27 13:46:39 Utilisation du plugin interne pour amazon-ebsvolume
2018/02/27 13:46:39 Utilisation d'un plugin interne pour googlecompute
2018/02/27 13:46:39 Utilisation du plugin interne pour oracle-classic
2018/02/27 13:46:39 Utilisation du plugin interne pour triton
2018/02/27 13:46:39 Utilisation du plugin interne pour docker
2018/02/27 13:46:39 Utilisation du plugin interne pour lxd
2018/02/27 13:46:39 Utilisation du plugin interne pour ncloud
2018/02/27 13:46:39 Utilisation d'un plugin interne pour profitbricks
2018/02/27 13:46:39 Utilisation du plugin interne pour qemu
2018/02/27 13:46:39 Utilisation du plugin interne pour amazon-chroot
2018/02/27 13:46:39 Utilisation du plugin interne pour amazon-ebssurrogate
2018/02/27 13:46:39 Utilisation du plugin interne pour oracle-oci
2018/02/27 13:46:39 Utilisation du plugin interne pour oneandone
2018/02/27 13:46:39 Utilisation du plugin interne pour openstack
2018/02/27 13:46:39 Utilisation du plugin interne pour parallels-iso
2018/02/27 13:46:39 Utilisation du plugin interne pour scaleway
2018/02/27 13:46:39 Utilisation du plugin interne pour amazon-ebs
2018/02/27 13:46:39 Utilisation du plugin interne pour hyperv-vmcx
2018/02/27 13:46:39 Utilisation du plugin interne pour lxc
2018/02/27 13:46:39 Utilisation du plugin interne pour alicloud-ecs
2018/02/27 13:46:39 Utilisation du plugin interne pour le fichier
2018/02/27 13:46:39 Utilisation du plugin interne pour null
2018/02/27 13:46:39 Utilisation d'un plugin interne pour converger
2018/02/27 13:46:39 Utilisation du plugin interne pour le fichier
2018/02/27 13:46:39 Utilisation d'un plugin interne pour PowerShell
2018/02/27 13:46:39 Utilisation du plugin interne pour shell
2018/02/27 13:46:39 Utilisation du plugin interne pour redémarrer Windows
2018/02/27 13:46:39 Utilisation du plugin interne pour ansible-local
2018/02/27 13:46:39 Utilisation du plugin interne pour chef-client
2018/02/27 13:46:39 Utilisation d'un plugin interne pour puppet-server
2018/02/27 13:46:39 Utilisation du plugin interne pour windows-shell
2018/02/27 13:46:39 Utilisation d'un plugin interne pour ansible
2018/02/27 13:46:39 Utilisation d'un plugin interne pour chef-solo
2018/02/27 13:46:39 Utilisation d'un plugin interne pour puppet-masterless
2018/02/27 13:46:39 Utilisation d'un plugin interne pour salt-masterless
2018/02/27 13:46:39 Utilisation du plugin interne pour shell-local
2018/02/27 13:46:39 Utilisation d'un plugin interne pour artifice
2018/02/27 13:46:39 Utilisation du plugin interne pour docker-save
2018/02/27 13:46:39 Utilisation du plugin interne pour docker-push
2018/02/27 13:46:39 Utilisation d'un plugin interne pour le manifeste
2018/02/27 13:46:39 Utilisation du plugin interne pour shell-local
2018/02/27 13:46:39 Utilisation du plugin interne pour amazon-import
2018/02/27 13:46:39 Utilisation d'un plugin interne pour la somme de contrôle
2018/02/27 13:46:39 Utilisation d'un plugin interne pour compresser
2018/02/27 13:46:39 Utilisation du plugin interne pour docker-tag
2018/02/27 13:46:39 Utilisation d'un plugin interne pour vagrant
2018/02/27 13:46:39 Utilisation d'un plugin interne pour vagrant-cloud
2018/02/27 13:46:39 Utilisation du plugin interne pour vsphere-template
2018/02/27 13:46:39 Utilisation du plugin interne pour alicloud-import
2018/02/27 13:46:39 Utilisation du plugin interne pour atlas
2018/02/27 13:46:39 Utilisation du plugin interne pour l'importation de docker
2018/02/27 13:46:39 Utilisation d'un plugin interne pour googlecompute-export
2018/02/27 13:46:39 Utilisation du plugin interne pour vsphere
2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 Tentative d'ouverture du fichier de configuration: /Users/REDACTED/.packerconfig
2018/02/27 13:46:39 [WARN] Le fichier de configuration n'existe pas: /Users/REDACTED/.packerconfig
2018/02/27 13:46:39 Config Packer: & {DisableC heckpoint: false DisableCheckpoint Signature: false Plug inMinPort: 10000 Plug inMaxPort: 25000 Builders: map [hyperv-iso: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE- plugin-PACKERSPACE-packer-builder-hyperv-iso triton: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-triton docker: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE- packer-builder-docker alicloud-ecs: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-alicloud-ecs vmware-iso: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE- packer-builder-vmware-iso hyperv-vmcx: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-hyperv-vmcx virtualbox-iso: / Users / REDACTED / bin / packer-PACKERSPACE-plugin- PACKERSPACE-packer-builder-virtualbox-iso amazon-ebssurrogate: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebssurrogate lxc: / Users / REDACTED / bin / packer-PACKERSPACE-plugin- PACKERSPACE-packer-bui lder-lxc parallels-pvm: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-pvm oracle-classic: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer- builder-oracle-classic openstack: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-openstack amazon-ebs: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder- amazon-ebs ncloud: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-ncloud amazon-chroot: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon- chroot scaleway: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-scaleway vmware-vmx: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-vmware-vmx amazon -instance: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-instance virtualbox-ovf: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-virtualbox- ovf cloudstack: / Utilisateurs / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-cloudstack parallels-iso: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-parallels-iso null: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-null azure-arm: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-azure-arm googlecompute: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-googlecompute lxd: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-lxd oneandone: / Users / REDACTED / bin / packer-PACKERSPACE-plugin -PACKERSPACE-packer-builder-oneandone amazon-ebsvolume: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-amazon-ebsvolume profitbricks: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE -packer-builder-profitbricks oracle-oci: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-oracle-oci digitalocean: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPAC E-packer-builder-digitalocean qemu: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder-qemu fichier: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-builder- file] Processeurs PostP: map [vagrant: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant shell-local: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE- packer-post-processor-shell-local docker-tag: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-tag googlecompute-export: / Users / REDACTED / bin / packer- PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-googlecompute-export checksum: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-checksum docker-push: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-push manifest: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-manifest compress: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PAC KERSPACE-packer-post-processor-compress alicloud-import: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-alicloud-import atlas: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE- plugin-PACKERSPACE-packer-post-processor-atlas docker-import: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-import docker-save: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-docker-save amazon-import: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-amazon-import vagrant-cloud: / Utilisateurs / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vagrant-cloud vsphere-template: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere- template vsphere: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-vsphere artifice: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-post-processor-artifice] Visionnaires professionnels: carte [ ansible: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible puppet-masterless: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-masterless salt- masterless: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-salt-masterless chef-client: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef-client windows-shell: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-shell chef-solo: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-chef -solo shell: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell puppet-server: / Users / REDACTED / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-puppet-server converge: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-converge file: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-file pouvoirs enfer: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-powershell windows-restart: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-windows-restart ansible- local: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-ansible-local shell-local: / Users / SUPPRIMÉ / bin / packer-PACKERSPACE-plugin-PACKERSPACE-packer-provisioner-shell-local ]}
2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 Définition du répertoire de cache: / Users / SUPPRIMÉ / repos / packer-configs / packer_cache
2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 Chargement du constructeur: qemu
2018/02/27 13:46:39 Le plug-in n'a pas pu être trouvé. Vérification du même répertoire que l'exécutable.
2018/02/27 13:46:39 Chemin exe actuel: / Users / SUPPRIMÉ / bin / packer
2018/02/27 13:46:39 Création d'un client de plugin pour le chemin: / Users / SUPPRIMÉ / bin / packer
2018/02/27 13:46:39 Démarrage du plugin: / Users / SUPPRIMÉ / bin / packer [] string {"/ Users / SUPPRIMÉ / bin / packer", "plugin", "packer-builder-qemu"}
2018/02/27 13:46:39 En attente de l'adresse RPC pour: / Users / SUPPRIMÉ / bin / packer
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 [INFO] Packer version: 1.2.1
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Packer Target OS / Arch: darwin amd64
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Construit avec Go Version: go1.10
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Tentative d'ouverture du fichier de configuration: /Users/REDACTED/.packerconfig
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 [WARN] Le fichier de configuration n'existe pas: /Users/REDACTED/.packerconfig
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Packer config: & {DisableC heckpoint: false DisableCheckpoint Signature: false Plug inMinPort: 10000 Plug inMaxPort: 25000 Builders: map [] Rocesseurs PostP : map [] Visionneurs professionnels: map []}
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Définition du répertoire de cache: / Users / SUPPRIMÉ / repos / packer-configs / packer_cache
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 args: [] string {"packer-builder-qemu"}
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Plugin minimum port: 10000
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Plugin port maximum: 25000
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Adresse du plug-in: unix / var / folders / cd / 59vmvhd93_g042_b779256jw00bdld / T / packer-plugin090374948
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 En attente de connexion ...
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Servir une connexion de plugin ...
2018/02/27 13:46:39 Chargement de l'approvisionneur: shell
2018/02/27 13:46:39 Le plug-in n'a pas pu être trouvé. Vérification du même répertoire que l'exécutable.
2018/02/27 13:46:39 Chemin exe actuel: / Users / SUPPRIMÉ / bin / packer
2018/02/27 13:46:39 Création d'un client de plugin pour le chemin: / Users / SUPPRIMÉ / bin / packer
2018/02/27 13:46:39 Démarrage du plugin: / Users / SUPPRIMÉ / bin / packer [] string {"/ Users / SUPPRIMÉ / bin / packer", "plugin", "packer-provisioner-shell"}
2018/02/27 13:46:39 En attente de l'adresse RPC pour: / Users / SUPPRIMÉ / bin / packer
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 [INFO] Packer version: 1.2.1
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Packer Target OS / Arch: darwin amd64
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Construit avec Go Version: go1.10
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Tentative d'ouverture du fichier de configuration: /Users/REDACTED/.packerconfig
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 [WARN] Le fichier de configuration n'existe pas: /Users/REDACTED/.packerconfig
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Packer config: & {DisableC heckpoint: false DisableCheckpoint Signature: false Plug inMinPort: 10000 Plug inMaxPort: 25000 Builders: map [] Rocesseurs PostP : map [] Visionneurs professionnels: map []}
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Définition du répertoire de cache: / Users / SUPPRIMÉ / repos / packer-configs / packer_cache
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Répertoire de base détecté depuis env var: / Users / SUPPRIMÉ
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 args: [] string {"packer-provisioner-shell"}
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Plugin minimum port: 10000
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Plugin port maximum: 25000
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Adresse du plug-in: unix / var / folders / cd / 59vmvhd93_g042_b779256jw00bdld / T / packer-plugin087824806
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 En attente de connexion ...
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Servir une connexion de plugin ...
2018/02/27 13:46:39 ui: la sortie qemu sera dans cette couleur.
2018/02/27 13:46:39 ui:
2018/02/27 13:46:39 Mode de débogage de construction: false
2018/02/27 13:46:39 Force build: false
2018/02/27 13:46:39 En cas d'erreur:
2018/02/27 13:46:39 Préparation de la compilation: qemu
La sortie qemu sera dans cette couleur.

2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 utiliser l'accélérateur détecté: tcg
2018/02/27 13:46:39 En attente de compilation pour terminer ...
2018/02/27 13:46:39 Démarrage de la compilation: qemu
2018/02/27 13:46:39 Générateur en cours d'exécution: qemu
2018/02/27 13:46:39 [INFO] (télémétrie) Démarrage du générateur qemu
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Chemin Qemu: / opt / local / bin / qemu-system-x86_64, page d'image Qemu: / opt / local / bin / qemu -img
2018/02/27 13:46:39 ui: ==> qemu: Téléchargement ou copie ISO
==> qemu: Téléchargement ou copie ISO
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Acquisition du verrou à télécharger: http://ftp.openbsd.org/pub/OpenBSD/6.2/amd64/install62.iso
2018/02/27 13:46:39 packer: 2018/02/27 13:46:39 Vérification de la somme de contrôle de /Users/REDACTED/repos/packer-configs/packer_cache/d56b4f393beacc5c8d3707a93a0226d79854f3380a0352dae1de713f1d02f1disf1
2018/02/27 13:46:40 ui: qemu: Trouvé déjà téléchargé, somme de contrôle initiale correspondante, aucun téléchargement nécessaire: http://ftp.openbsd.org/pub/OpenBSD/6.2/amd64/install62.iso
qemu: trouvé déjà téléchargé, somme de contrôle initiale correspondante, aucun téléchargement nécessaire: http://ftp.openbsd.org/pub/OpenBSD/6.2/amd64/install62.iso
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Aucun fichier de disquette spécifié. La disquette ne sera pas créée.
2018/02/27 13:46:40 ui: ==> qemu: Création du disque dur ...
==> qemu: Création du disque dur ...
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Exécution de qemu-img: [] string {"create", "-f", "qcow2", "openbsd62 / openbsd62.qcow2 "," 80000M "}
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 stdout: Formatage 'openbsd62 / openbsd62.qcow2', fmt = qcow2 size = 83886080000 cluster_size = 65536 lazy_refcounts = off refcount_bits = 16
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 stderr:
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Recherche du port communicateur disponible (SSH, WinRM, etc.) entre 2222 et 2229
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Essai de port: 2229
2018/02/27 13:46:40 ui: ==> qemu: port trouvé pour le communicateur (SSH, WinRM, etc.): 2229.
==> qemu: port trouvé pour le communicateur (SSH, WinRM, etc.): 2229.
2018/02/27 13:46:40 ui: ==> qemu: Recherche du port disponible entre 5900 et 6000 sur 127.0.0.1
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Recherche du port disponible entre 5900 et 6000 sur 127.0.0.1
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Essai de port: 5965
==> qemu: Recherche du port disponible entre 5900 et 6000 sur 127.0.0.1
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Port VNC disponible trouvé: 5965 sur IP: 127.0.0.1
2018/02/27 13:46:40 ui: ==> qemu: Démarrage de la VM, démarrage à partir du CD-ROM
==> qemu: démarrage de la VM, démarrage à partir du CD-ROM
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Qemu --version sortie: émulateur QEMU version 2.11.0
2018/02/27 13:46:40 packer: Copyright (c) 2003-2017 Fabrice Bellard et les développeurs du projet QEMU
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Version Qemu: 2.11.0
2018/02/27 13:46:40 ui: qemu: La VM sera exécutée sans tête, sans interface graphique. Si tu veux
qemu: affichez l'écran de la VM, connectez-vous via VNC sans mot de passe pour
qemu: vnc: //127.0.0.1: 5965
qemu: La VM sera exécutée sans tête, sans interface graphique. Si tu veux
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Qemu Builder n'a pas de fichiers de disquette, pas de connexion de disquette.
qemu: affichez l'écran de la VM, connectez-vous via VNC sans mot de passe pour
qemu: vnc: //127.0.0.1: 5965
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Exécution de / opt / local / bin / qemu-system-x86_64: [] string {"- m", "512M", " -name "," openbsd62.qcow2 "," -machine "," type = pc, accel = tcg "," -netdev "," user, id = user.0, hostfwd = tcp :: 2229-: 22 ", "-device", "e1000, netdev = user.0", "-cdrom", "/Users/REDACTED/repos/packer-configs/packer_cache/d56b4f393beacc5c8d3707a93a0226d79854f3380a0352dae1de", une fois "d79854f3380a0352dae1de7" "-vnc", "127.0.0.1:65", "-drive", "file = openbsd62 / openbsd62.qcow2, if = virtio, cache = writeback, discard = ignorer, format = qcow2"}
2018/02/27 13:46:40 packer: 2018/02/27 13:46:40 Démarré Qemu. Pid: 68847
2018/02/27 13:46:42 ui: ==> qemu: En attente de 30 secondes pour le démarrage ...
==> qemu: Attente de 30 s pour le démarrage ...
2018/02/27 13:47:12 ui: ==> qemu: Connexion à VM via VNC
==> qemu: connexion à la VM via VNC
2018/02/27 13:47:12 packer: 2018/02/27 13:47:12 Connecté au bureau VNC: QEMU (openbsd62.qcow2)
2018/02/27 13:47:12 ui: ==> qemu: Taper la commande de démarrage sur VNC ...
==> qemu: Taper la commande de démarrage sur VNC ...
2018/02/27 13:47:12 packer: 2018/02/27 13:47:12 Envoi du caractère 'S', code 83, shift true
2018/02/27 13:47:12 emballeur: 2018/02/27 13:47:12 Code spécial ''trouvé, remplacé par: 65293
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Envoi du caractère 'c', code 99, shift false
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Envoi du caractère 'a', code 97, shift false
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Envoi du caractère 't', code 116, shift false
2018/02/27 13:47:13 packer: 2018/02/27 13:47:13 Sending char '', code 32, shift false
2018/02/27 13:47:14 packer: 2018/02/27 13:47:14 Envoi du caractère '<', code 60, shift true
2018/02/27 13:47:14 packer: 2018/02/27 13:47:14 Envoi du caractère '<', code 60, shift true
2018/02/27 13:47:14 packer: 2018/02/27 13:47:14 Envoi du caractère 'E', code 69, shift true
2018/02/27 13:47:15 packer: 2018/02/27 13:47:15 Envoi du caractère 'O', code 79, shift true
2018/02/27 13:47:15 packer: 2018/02/27 13:47:15 Envoi du caractère 'F', code 70, shift true
2018/02/27 13:47:15 packer: 2018/02/27 13:47:15 Sending char '', code 32, shift false
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Envoi de char '>', code 62, shift true
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Envoi de char '>', code 62, shift true
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Envoi du caractère 'i', code 105, shift false
2018/02/27 13:47:16 packer: 2018/02/27 13:47:16 Envoi de char 'n', code 110, shift false
2018/02/27 13:47:17 packer: 2018/02/27 13:47:17 Envoi de caractères, code 115, shift false
2018/02/27 13:47:17 packer: 2018/02/27 13:47:17 Envoi du caractère 't', code 116, shift false
2018/02/27 13:47:17 packer: 2018/02/27 13:47:17 Envoi du caractère 'a', code 97, shift false
2018/02/27 13:47:18 packer: 2018/02/27 13:47:18 Envoi du caractère 'l', code 108, shift false
2018/02/27 13:47:18 packer: 2018/02/27 13:47:18 Envoi du caractère 'l', code 108, shift false
2018/02/27 13:47:18 packer: 2018/02/27 13:47:18 Envoi du caractère '.', Code 46, shift false
2018/02/27 13:47:19 packer: 2018/02/27 13:47:19 Envoi du caractère 'c', code 99, shift false
2018/02/27 13:47:19 packer: 2018/02/27 13:47:19 Envoi du caractère 'o', code 111, shift false
2018/02/27 13:47:19 packer: 2018/02/27 13:47:19 Envoi de char 'n', code 110, shift false
2018/02/27 13:47:20 packer: 2018/02/27 13:47:20 Envoi du caractère 'f', code 102, shift false
2018/02/27 13:47:20 emballeur: 2018/02/27 13:47:20 Code spécial ''trouvé, remplacé par: 65293
2018/02/27 13:47:20 packer: 2018/02/27 13:47:20 Envoi du caractère 'C', code 67, shift true

@aikchar comme je le vois dans votre cas, non << et ni >> passé à vnc

@shibumi vous devez revérifier votre URL iso

2018/02/11 02:42:14 [INFO] (telemetry) found error: No byte serving support. The HTTP server must support Accept-Ranges=bytes
2018/02/11 02:42:14 ui error: Build 'qemu' errored: No byte serving support. The HTTP server must support Accept-Ranges=bytes
2018/02/11 02:42:14 Builds completed. Waiting on interrupt barrier...

signifie que le serveur Web de l'autre côté renvoie sans Accept-Range = octets ou non le code d'état 200

@vtolstov Maintenant, j'obtiens l'erreur suivante:

2018/02/28 15:17:16 packer: 2018/02/28 15:17:16 Qemu stderr: Could not access KVM kernel module: No such file or directory
2018/02/28 15:17:16 packer: 2018/02/28 15:17:16 Qemu stderr: qemu-system-x86_64: failed to initialize KVM: No such file or directory
2018/02/28 15:17:16 ui error: ==> qemu: Error launching VM: Qemu failed to start. Please run with PACKER_LOG=1 to get more info.
==> qemu: Error launching VM: Qemu failed to start. Please run with PACKER_LOG=1 to get more info.
2018/02/28 15:17:16 ui: ==> qemu: Deleting output directory...
==> qemu: Deleting output directory...
2018/02/28 15:17:16 [INFO] (telemetry) ending qemu
2018/02/28 15:17:16 [INFO] (telemetry) found error: Build was halted.
2018/02/28 15:17:16 ui error: Build 'qemu' errored: Build was halted.
2018/02/28 15:17:16 Builds completed. Waiting on interrupt barrier...
2018/02/28 15:17:16 machine readable: error-count []string{"1"}
2018/02/28 15:17:16 ui error: 
==> Some builds didn't complete successfully and had errors:
2018/02/28 15:17:16 machine readable: qemu,error []string{"Build was halted."}
2018/02/28 15:17:16 ui error: --> qemu: Build was halted.
2018/02/28 15:17:16 ui: 
==> Builds finished but no artifacts were created.
2018/02/28 15:17:16 [INFO] (telemetry) Finalizing.
Build 'qemu' errored: Build was halted.

Désolé, je ne suis vraiment pas un docker: S. Je suppose que je dois exécuter le conteneur avec tous les privilèges pour obtenir le support du noyau KVM_Intel .. bien que lsmod dise qu'il est chargé.

Cela semble être causé par https://github.com/qemu/qemu/commit/a7815faffb2bd594b92aa3542d7b799cc89c5414 et donc reproductible uniquement avec QEMU 2.11.

Alors que l'ancien keymap en-us contiendrait (entre autres):

comma 0x33
less 0x33 shift
period 0x34
greater 0x34 shift

Le nouveau contient:

period 0x34
greater 0x34 shift
...
less 0x56
greater 0x56 shift
bar 0x56 altgr
brokenbar 0x56 shift altgr

Ces lignes less 0x56 et greater 0x56 shift semblent incorrectes. Ils ne sont pas non plus inclus dans le keymap en-gb .

J'ai déposé un bug contre QEMU; j'espère qu'ils pourront comprendre ce qui n'a pas fonctionné lors des mises à jour du keymap:

https://bugs.launchpad.net/qemu/+bug/1754295

Merci @foutrelis mais c'est toujours bizarre parce que @vtolstov a dit qu'il l'avait testé sur fedora avec Qemu 2.11

On dirait que mon bug QEMU est un double et Fedora patchs les en-nous KEYMAP pour cette question.

Donc pas un problème de packer, et nous pouvons voler le patch de Fedora et l'ajouter à Arch!

Edit: qemu 2.11.1-2 sur Arch inclut le patch Fedora et semble se comporter correctement (plus de > s).

@foutrelis merci beaucoup pour le débogage!

@foutrelis merci encore! :) J'aurais dû chercher plus tôt ce bogue.

Merci pour le travail à tous. Je vais fermer cela et ajouter une note aux documents qemu

Je vais verrouiller ce problème car il est fermé depuis _30 jours_ ⏳. Cela aide nos responsables à trouver et à se concentrer sur les problèmes actifs.

Si vous avez trouvé un problème similaire à celui-ci, veuillez ouvrir un nouveau problème et compléter le modèle de problème afin que nous puissions capturer tous les détails nécessaires pour approfondir l'enquête.

Cette page vous a été utile?
0 / 5 - 0 notes