I run this 
<https://github.com/palfrey/guix-vm/blob/master/packer/guix-vm.json> script 
with packer (with some modification), it's a script that generate custom 
guix image. The running is Ok until first reboot that i display at the end 
of below code.

{
    "min_packer_version": "1.4.0",
    "builders": [{
        "type": "virtualbox-iso", 
        "vm_name": "guixsd1",
        "guest_os_type": "Linux_64",
        "memory": 3000,
        "headless": true,
        "iso_url": "./guix-system-install-1.0.1.x86_64-linux.iso",              
 
        "iso_checksum": 
"4ef645465464613513113ab17537bbead7fb41741e47fedab9451524a292a98de1",           
         
        "iso_checksum_type": "sha256",                                          
                               
        "ssh_username": "root",
        "ssh_password": "password",
        "boot_command": [
            
"<enter><wait30s><enter><wait1s><end><up><up><enter><wait1s><down><enter><enter><wait2s><enter>",
            "passwd root<enter>password<enter>password<enter>",
            "herd start ssh-daemon<enter>"
        ],
        "ssh_timeout": "5m",
        "shutdown_command": "shutdown"
    }],
    "provisioners": [
        {
            "type": "shell",
            "inline": [
                "parted -s --align=none /dev/sda mktable gpt mkpart primary 
ext2 0 100MB mkpart primary ext2 100MB 100% set 1 bios_grub on",
                "mkfs.ext4 -L my-root /dev/sda2",
                "mount LABEL=my-root /mnt",
                "herd start cow-store /mnt",
                "mkdir /mnt/etc"
            ]
        },
                {
            "type": "file",
            "source": "core-config.scm",
            "generated": true,
            "destination": "/mnt/etc/config.scm"
        },
        {
            "type": "shell",
            "inline": [
                "guix system init /mnt/etc/config.scm /mnt",
                "herd stop ssh-daemon"
            ]
        },
        {
            "type": "shell",
            "expect_disconnect": true,
            "skip_clean": true,
            "inline": ["reboot"]
        },
        {
            "type": "shell",
            "pause_before":"10s",
            "inline": ["herd start ssh-daemon"]
        },
.
.
.
[Other Commands]


After reboot. it's stuck and after 5 minutes (ssh timeout) i encounter with 
below error:

==> virtualbox-iso: copying to 
'/mnt'...                                                                   
                                       
  
    virtualbox-iso: populating '/mnt'...
    virtualbox-iso: bootloader successfully installed on '/dev/sda'
    virtualbox-iso: Service ssh-daemon has been stopped.
==> virtualbox-iso: Provisioning with shell script: /tmp/packer-
shell108761660
==> virtualbox-iso: Pausing 10s before the next provisioner...
==> virtualbox-iso: Provisioning with shell script: /tmp/packer-
shell812273279
==> virtualbox-iso: Provisioning step had errors: Running the cleanup 
provisioner, if present...
==>
 virtualbox-iso: Deregistering and deleting 
VM...                                                                       
                       
  
==> virtualbox-iso: Deleting output 
directory...                                                               
                                   
  
Build 'virtualbox-iso' errored: Error uploading script: ssh: 
handshake failed: ssh: unable to authenticate, attempted methods 
[publickey none password], no supported methods 
remain                                                                     
                                             
  
                                                                            
                                                                      
  
==> Some builds didn't complete successfully and had 
errors:                                                                     
                 
  
--> virtualbox-iso: Error uploading script: ssh: handshake 
failed: ssh: unable to authenticate, attempted methods [publickey none 
password], no supported methods 
remain                                                                     
                                                         
  
                                                                            
                                                                      
  
==> Builds finished but no artifacts were created.

it seems that a ssh problem but how i could solve this?

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/278007ea-bae3-4ee6-92c3-fb62c55a75a1%40googlegroups.com.

Reply via email to