Packer build of "guest_os_type": "other" box failed

Pristavkin

Bit poster
Hi there,

I've trying to build mikrotik vagrant box using packer and build fails when "guest_os_type" set to "other". If gust_os_type set, for example, to centos all builds fine.
Is there a way to correctly build boxes with "other" os_type?
-------------------------------------------------------------------
± % cat mikrotik-6.42.5-iso.json
{
"builders": [
{
"type": "parallels-iso",
"vm_name": "RouterOS-6.42.5",
"guest_os_type": "other",
"disk_size": "256",
"disk_type": "expand",
"prlctl": [
["set", "{{.Name}}", "--cpus", "1"],
["set", "{{.Name}}", "--memsize", "128"]
],
"iso_url": "https://download.mikrotik.com/routeros/6.42.5/mikrotik-6.42.5.iso",
"iso_checksum": "4de780934da1429f8575cde20b8c6924",
"iso_checksum_type": "md5",
"boot_command": [
"<down><spacebar><down><spacebar><down><spacebar><right><up><up><up><spacebar><down><spacebar><down><down><down><spacebar><down><down><spacebar>",
"<up><up><right><up><up><up><spacebar><up><spacebar>iny",
"<wait5><enter><wait10><wait5>",
"admin<enter><wait>",
"<enter><wait>",
"y<enter>q<wait>",
"<enter><wait>",
"/ip dhcp-client add disabled=no interface=ether1<enter><wait>",
"/user add name=vagrant password=vagrant group=full<enter>"
],
"parallels_tools_flavor": "other",
"parallels_tools_mode": "disable",
"ssh_username": "admin",
"ssh_password": "",
"ssh_wait_timeout": "80s",
"shutdown_command": "execute \"/system shutdown\""
}
]
}


-------------------------------------------------------------------
builduser@Vision ~/Projects/vagrant-mikrotik/packer [master *]
± % prlctl --version
prlctl version 13.3.2 (43368)

builduser@Vision ~/Projects/vagrant-mikrotik/packer [master *]
± % vagrant -v
Vagrant 2.1.2

builduser@Vision ~/Projects/vagrant-mikrotik/packer [master *]
± % packer -v
1.2.4

builduser@Vision ~/Projects/vagrant-mikrotik/packer [master *]
± % packer build mikrotik-6.42.5-iso.json
parallels-iso output will be in this color.

==> parallels-iso: Downloading or copying ISO
parallels-iso: Found already downloaded, initial checksum matched, no download needed: https://download.mikrotik.com/routeros/6.42.5/mikrotik-6.42.5.iso
==> parallels-iso: Creating virtual machine...
==> parallels-iso: Applying default settings...
==> parallels-iso: Creating hard drive...
==> parallels-iso: Error creating hard drive: prlctl error: Failed to configure the virtual machine.
==> parallels-iso: Unregistering virtual machine...
==> parallels-iso: Deleting output directory...
Build 'parallels-iso' errored: Error creating hard drive: prlctl error: Failed to configure the virtual machine.

==> Some builds didn't complete successfully and had errors:
--> parallels-iso: Error creating hard drive: prlctl error: Failed to configure the virtual machine.

==> Builds finished but no artifacts were created.

builduser@Vision ~/Projects/vagrant-mikrotik/packer [master *]
± % sed -i .tmp 's/"guest_os_type": "other"/"guest_os_type": "centos"/' mikrotik-6.42.5-iso.json

builduser@Vision ~/Projects/vagrant-mikrotik/packer [master *]
± % packer build mikrotik-6.42.5-iso.json
parallels-iso output will be in this color.

==> parallels-iso: Downloading or copying ISO
parallels-iso: Found already downloaded, initial checksum matched, no download needed: https://download.mikrotik.com/routeros/6.42.5/mikrotik-6.42.5.iso
==> parallels-iso: Creating virtual machine...
==> parallels-iso: Applying default settings...
==> parallels-iso: Creating hard drive...
==> parallels-iso: Setting the boot order...
==> parallels-iso: Attaching ISO to the default CD/DVD ROM device...
==> parallels-iso: Executing custom prlctl commands...
parallels-iso: Executing: prlctl set RouterOS-6.42.5 --cpus 1
parallels-iso: Executing: prlctl set RouterOS-6.42.5 --memsize 128
==> parallels-iso: Starting the virtual machine...
==> parallels-iso: Waiting 10s for boot...
==> parallels-iso: Host IP for the Parallels machine: 192.168.10.229
==> parallels-iso: Typing the boot command...
==> parallels-iso: Waiting for SSH to become available...
==> parallels-iso: Connected to SSH!
==> parallels-iso: Uploading Parallels version info (13.3.2)
==> parallels-iso: Gracefully halting virtual machine...
==> parallels-iso: Compacting the disk image
==> parallels-iso: Unregistering virtual machine...
Build 'parallels-iso' finished.

==> Builds finished. The artifacts of successful builds are:
--> parallels-iso: VM files in directory: /Users/builduser/Projects/vagrant-mikrotik/packer/output-parallels-iso

builduser@Vision ~/Projects/vagrant-mikrotik/packer [master *]
± %
 
Back
Top