Parameter 'driver' expects a driver name

819 views
Skip to first unread message

Sean McGuigan

unread,
Dec 16, 2014, 6:11:01 PM12/16/14
to packe...@googlegroups.com
Hi

I'm running a fresh build of CentOS 6.6 running KVM with the latest version of Packer. Getting the following error but not sure if I should post to the KVM user group. Anyone seen this?

2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Qemu stderr: qemu-kvm: -device virtio,netdev=user.0: Parameter 'driver' expects a driver name
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Qemu stderr: Try with argument '?' for a list.
2014/12/16 21:04:29 ui error: ==> ubuntu-1404-server: Error launching VM: Qemu failed to start. Please run with logs to get more info.

------
Full output
-----

[root@cent6 ubuntu]# PACKER_LOG=10 packer --debug build ubuntu-14.04-server-amd64.json
2014/12/16 21:04:27 [INFO] Packer version: 0.7.5 9cd66feeacbd9cb318b72eb5ed59428c5b8c37ac+CHANGES
2014/12/16 21:04:27 Packer Target OS/Arch: linux amd64
2014/12/16 21:04:27 Built with Go Version: go1.3.3
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: amazon-chroot = /usr/local/packer/packer-builder-amazon-chroot
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: amazon-ebs = /usr/local/packer/packer-builder-amazon-ebs
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: amazon-instance = /usr/local/packer/packer-builder-amazon-instance
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: digitalocean = /usr/local/packer/packer-builder-digitalocean
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: docker = /usr/local/packer/packer-builder-docker
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: googlecompute = /usr/local/packer/packer-builder-googlecompute
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: null = /usr/local/packer/packer-builder-null
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: openstack = /usr/local/packer/packer-builder-openstack
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: parallels-iso = /usr/local/packer/packer-builder-parallels-iso
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: parallels-pvm = /usr/local/packer/packer-builder-parallels-pvm
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: qemu = /usr/local/packer/packer-builder-qemu
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: virtualbox-iso = /usr/local/packer/packer-builder-virtualbox-iso
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: virtualbox-ovf = /usr/local/packer/packer-builder-virtualbox-ovf
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: vmware-iso = /usr/local/packer/packer-builder-vmware-iso
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: vmware-vmx = /usr/local/packer/packer-builder-vmware-vmx
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: atlas = /usr/local/packer/packer-post-processor-atlas
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: compress = /usr/local/packer/packer-post-processor-compress
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: docker-import = /usr/local/packer/packer-post-processor-docker-import
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: docker-push = /usr/local/packer/packer-post-processor-docker-push
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: docker-save = /usr/local/packer/packer-post-processor-docker-save
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: docker-tag = /usr/local/packer/packer-post-processor-docker-tag
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: vagrant = /usr/local/packer/packer-post-processor-vagrant
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: vagrant-cloud = /usr/local/packer/packer-post-processor-vagrant-cloud
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: vsphere = /usr/local/packer/packer-post-processor-vsphere
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: ansible-local = /usr/local/packer/packer-provisioner-ansible-local
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: chef-client = /usr/local/packer/packer-provisioner-chef-client
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: chef-solo = /usr/local/packer/packer-provisioner-chef-solo
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: file = /usr/local/packer/packer-provisioner-file
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: puppet-masterless = /usr/local/packer/packer-provisioner-puppet-masterless
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: puppet-server = /usr/local/packer/packer-provisioner-puppet-server
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: salt-masterless = /usr/local/packer/packer-provisioner-salt-masterless
2014/12/16 21:04:27 [DEBUG] Discoverd plugin: shell = /usr/local/packer/packer-provisioner-shell
2014/12/16 21:04:27 Detected home directory from env var: /root
2014/12/16 21:04:27 Detected home directory from env var: /root
2014/12/16 21:04:27 Attempting to open config file: /root/.packerconfig
2014/12/16 21:04:27 File doesn't exist, but doesn't need to. Ignoring.
2014/12/16 21:04:27 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[virtualbox-iso:/usr/local/packer/packer-builder-virtualbox-iso openstack:/usr/local/packer/packer-builder-openstack vmware-iso:/usr/local/packer/packer-builder-vmware-iso amazon-ebs:/usr/local/packer/packer-builder-amazon-ebs amazon-instance:/usr/local/packer/packer-builder-amazon-instance digitalocean:/usr/local/packer/packer-builder-digitalocean qemu:/usr/local/packer/packer-builder-qemu vmware-vmx:/usr/local/packer/packer-builder-vmware-vmx docker:/usr/local/packer/packer-builder-docker parallels-iso:/usr/local/packer/packer-builder-parallels-iso parallels-pvm:/usr/local/packer/packer-builder-parallels-pvm virtualbox-ovf:/usr/local/packer/packer-builder-virtualbox-ovf amazon-chroot:/usr/local/packer/packer-builder-amazon-chroot googlecompute:/usr/local/packer/packer-builder-googlecompute null:/usr/local/packer/packer-builder-null] PostProcessors:map[compress:/usr/local/packer/packer-post-processor-compress docker-push:/usr/local/packer/packer-post-processor-docker-push docker-save:/usr/local/packer/packer-post-processor-docker-save vagrant:/usr/local/packer/packer-post-processor-vagrant vsphere:/usr/local/packer/packer-post-processor-vsphere atlas:/usr/local/packer/packer-post-processor-atlas docker-tag:/usr/local/packer/packer-post-processor-docker-tag vagrant-cloud:/usr/local/packer/packer-post-processor-vagrant-cloud docker-import:/usr/local/packer/packer-post-processor-docker-import] Provisioners:map[chef-solo:/usr/local/packer/packer-provisioner-chef-solo file:/usr/local/packer/packer-provisioner-file puppet-masterless:/usr/local/packer/packer-provisioner-puppet-masterless puppet-server:/usr/local/packer/packer-provisioner-puppet-server salt-masterless:/usr/local/packer/packer-provisioner-salt-masterless shell:/usr/local/packer/packer-provisioner-shell ansible-local:/usr/local/packer/packer-provisioner-ansible-local chef-client:/usr/local/packer/packer-provisioner-chef-client]}
2014/12/16 21:04:27 Setting cache directory: /root/packer/packer-qemu-templates/ubuntu/packer_cache
2014/12/16 21:04:27 Detected home directory from env var: /root
2014/12/16 21:04:27 Reading template: ubuntu-14.04-server-amd64.json
2014/12/16 21:04:27 Creating build: ubuntu-1404-server
2014/12/16 21:04:27 Loading builder: qemu
2014/12/16 21:04:27 Creating plugin client for path: /usr/local/packer/packer-builder-qemu
2014/12/16 21:04:27 Starting plugin: /usr/local/packer/packer-builder-qemu []string{"/usr/local/packer/packer-builder-qemu"}
2014/12/16 21:04:27 Waiting for RPC address for: /usr/local/packer/packer-builder-qemu
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Plugin minimum port: 10000
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Plugin maximum port: 25000
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Plugin address: unix /tmp/packer-plugin226049925
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Waiting for connection...
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Serving a plugin connection...
2014/12/16 21:04:27 Loading provisioner: shell
2014/12/16 21:04:27 Creating plugin client for path: /usr/local/packer/packer-provisioner-shell
2014/12/16 21:04:27 Starting plugin: /usr/local/packer/packer-provisioner-shell []string{"/usr/local/packer/packer-provisioner-shell"}
2014/12/16 21:04:27 Waiting for RPC address for: /usr/local/packer/packer-provisioner-shell
2014/12/16 21:04:27 packer-provisioner-shell: 2014/12/16 21:04:27 Plugin minimum port: 10000
2014/12/16 21:04:27 packer-provisioner-shell: 2014/12/16 21:04:27 Plugin maximum port: 25000
2014/12/16 21:04:27 packer-provisioner-shell: 2014/12/16 21:04:27 Plugin address: unix /tmp/packer-plugin845765198
2014/12/16 21:04:27 packer-provisioner-shell: 2014/12/16 21:04:27 Waiting for connection...
2014/12/16 21:04:27 packer-provisioner-shell: 2014/12/16 21:04:27 Serving a plugin connection...
2014/12/16 21:04:27 ui: ubuntu-1404-server output will be in this color.
2014/12/16 21:04:27 ui:
2014/12/16 21:04:27 Build debug mode: false
2014/12/16 21:04:27 Force build: false
2014/12/16 21:04:27 Preparing build: ubuntu-1404-server
ubuntu-1404-server output will be in this color.

2014/12/16 21:04:27 Waiting on builds to complete...
2014/12/16 21:04:27 Starting build run: ubuntu-1404-server
2014/12/16 21:04:27 Running builder: qemu
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Qemu path: /usr/libexec/qemu-kvm, Qemu Image page: /usr/bin/qemu-img
2014/12/16 21:04:27 ui: ==> ubuntu-1404-server: Downloading or copying ISO
==> ubuntu-1404-server: Downloading or copying ISO
2014/12/16 21:04:27 ui: ubuntu-1404-server: Downloading or copying: http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Acquiring lock to download: http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso
2014/12/16 21:04:27 packer-builder-qemu: 2014/12/16 21:04:27 Verifying checksum of /root/packer/packer-qemu-templates/ubuntu/packer_cache/616e30c4df43460f8b93c3b5a9efb08868eb9b4778c5f5014607a37095b91524.iso
ubuntu-1404-server: Downloading or copying: http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Initial checksum matched, no download needed.
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 No floppy files specified. Floppy disk will not be made.
2014/12/16 21:04:28 ui: ==> ubuntu-1404-server: Creating hard drive...
==> ubuntu-1404-server: Creating hard drive...
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Executing qemu-img: []string{"create", "-f", "qcow2", "output-ubuntu-1404-server/packer-ubuntu-1404-server.qcow2", "100000M"}
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 stdout: Formatting 'output-ubuntu-1404-server/packer-ubuntu-1404-server.qcow2', fmt=qcow2 size=104857600000 encryption=off cluster_size=65536
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 stderr:
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Trying port: 8081
2014/12/16 21:04:28 ui: ==> ubuntu-1404-server: Starting HTTP server on port 8081
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Looking for available SSH port between 2222 and 4444
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Trying port: 3213
==> ubuntu-1404-server: Starting HTTP server on port 8081
2014/12/16 21:04:28 ui: ==> ubuntu-1404-server: Found port for SSH: 3213.
2014/12/16 21:04:28 ui: ==> ubuntu-1404-server: Looking for available port between 5900 and 6000
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Looking for available port between 5900 and 6000
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Trying port: 5947
==> ubuntu-1404-server: Found port for SSH: 3213.
==> ubuntu-1404-server: Looking for available port between 5900 and 6000
2014/12/16 21:04:28 ui: ==> ubuntu-1404-server: Found available VNC port: 5947
2014/12/16 21:04:28 ui: ==> ubuntu-1404-server: Starting VM, booting from CD-ROM
2014/12/16 21:04:28 ui: ubuntu-1404-server: WARNING: The VM will be started in headless mode, as configured.
ubuntu-1404-server: In headless mode, errors during the boot sequence or OS setup
ubuntu-1404-server: won't be easily visible. Use at your own discretion.
==> ubuntu-1404-server: Found available VNC port: 5947
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Qemu Builder has no floppy files, not attaching a floppy.
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Executing /usr/libexec/qemu-kvm: []string{"-m", "512M", "-vnc", "0.0.0.0:47", "-machine", "type=pc,accel=kvm", "-drive", "file=output-ubuntu-1404-server/packer-ubuntu-1404-server.qcow2,if=ide,cache=writeback", "-cdrom", "/root/packer/packer-qemu-templates/ubuntu/packer_cache/616e30c4df43460f8b93c3b5a9efb08868eb9b4778c5f5014607a37095b91524.iso", "-name", "packer-ubuntu-1404-server", "-netdev", "user,id=user.0,hostfwd=tcp::3213-:22", "-boot", "once=d", "-device", "virtio,netdev=user.0"}
==> ubuntu-1404-server: Starting VM, booting from CD-ROM
ubuntu-1404-server: WARNING: The VM will be started in headless mode, as configured.
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Started Qemu. Pid: 7353
ubuntu-1404-server: In headless mode, errors during the boot sequence or OS setup
ubuntu-1404-server: won't be easily visible. Use at your own discretion.
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Qemu stderr: qemu-kvm: -device virtio,netdev=user.0: Parameter 'driver' expects a driver name
2014/12/16 21:04:28 packer-builder-qemu: 2014/12/16 21:04:28 Qemu stderr: Try with argument '?' for a list.
2014/12/16 21:04:29 ui error: ==> ubuntu-1404-server: Error launching VM: Qemu failed to start. Please run with logs to get more info.
2014/12/16 21:04:29 ui: ==> ubuntu-1404-server: Deleting output directory...
==> ubuntu-1404-server: Error launching VM: Qemu failed to start. Please run with logs to get more info.
==> ubuntu-1404-server: Deleting output directory...
2014/12/16 21:04:29 ui error: Build 'ubuntu-1404-server' errored: Build was halted.
2014/12/16 21:04:29 Builds completed. Waiting on interrupt barrier...
2014/12/16 21:04:29 machine readable: error-count []string{"1"}
2014/12/16 21:04:29 ui error:
==> Some builds didn't complete successfully and had errors:
2014/12/16 21:04:29 machine readable: ubuntu-1404-server,error []string{"Build was halted."}
2014/12/16 21:04:29 ui error: --> ubuntu-1404-server: Build was halted.
2014/12/16 21:04:29 ui:
==> Builds finished but no artifacts were created.
2014/12/16 21:04:29 waiting for all plugin processes to complete...
Build 'ubuntu-1404-server' errored: Build was halted.

==> Some builds didn't complete successfully and had errors:
2014/12/16 21:04:29 /usr/local/packer/packer-builder-qemu: plugin process exited
2014/12/16 21:04:29 /usr/local/packer/packer-provisioner-shell: plugin process exited
--> ubuntu-1404-server: Build was halted.

==> Builds finished but no artifacts were created.

Alvaro Miranda Aguilera

unread,
Dec 16, 2014, 6:54:42 PM12/16/14
to packe...@googlegroups.com
Hello,

It seems for that I did test that Packer-KVM/Qemu is more related to ubuntu and just works there.

I tried couple of times, and seems it's hardcoded for some binaries that are not available on redhat centos. I tried one kvm from rpmforge/epel but no joy..



--
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 packer-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sean McGuigan

unread,
Dec 17, 2014, 4:49:26 AM12/17/14
to packe...@googlegroups.com
Thanks for the info Alvaro, so I guess packer doesn't work on RHEL systems. Not really keen on Ubuntu as our production env run CentOS :(

Alvaro Miranda Aguilera

unread,
Dec 17, 2014, 3:53:41 PM12/17/14
to packe...@googlegroups.com
I haven't tested packer+kvm+OEL7, maybe there is more luck..

Crazy idea 1:

Create a VM with ubuntu, use packer+kvm there.. can be LXC.. I haven't tested but I have seen some guys doing kvm inside docker ..

Workaround not that crazy:

packer + virtualbox, do not install vbox additions, leave the source artifact, and once it finish, you can convert the vmdk disk to raw with either VBoxManage or qemu

and you can just use/boot that raw format disk

then you can use virtualbox-ovf to just install vboxadditions if you need it, and you reduce the number of gold images to manage.

Alvaro.

Nathan Valentine

unread,
Dec 25, 2014, 6:21:10 PM12/25/14
to packe...@googlegroups.com
FYI: 

The version of qemu-kvm shipped with CentOS6 is quite old relative to that in the latest Ubuntu and building qcows2 images on Ubuntu results in images which cannot run on RDO. "image uses incompatible feature" or some such message when trying to instantiate on Icehouse + CentOS6.

Ben Hines

unread,
Mar 6, 2015, 8:26:36 PM3/6/15
to packe...@googlegroups.com
This driver error is fixed by using "net_device": "virtio_net_pci" with the latest packer from the git repository.

-Ben
Reply all
Reply to author
Forward
0 new messages