vagrant -v
Vagrant 2.2.6
(latest possible 2.2.6.2)
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=18.1.5
[pwegrzynek@wegrzynet opsworksqon]$ uname -v
#1 SMP PREEMPT Tue Dec 24 15:55:20 UTC 2019
[pwegrzynek@wegrzynet opsworksqon]$ uname -r
5.4.6-2-MANJARO
peru/ubuntu-18.04-server-amd64
# encoding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = "./Berksfile"
config.ssh.forward_agent = true
config.vm.box = "peru/ubuntu-18.04-server-amd64"
config.vm.hostname = "#{`hostname`[0..-2]}-vagrant"
config.vm.network "private_network", ip: "192.168.13.37"
config.vm.provider "virtualbox" do |v, override|
v.name = "Chef 12 Ubuntu 18.04"
v.customize ["modifyvm", :id, "--rtcuseutc", "on"]
v.customize ["modifyvm", :id, "--cpuexecutioncap", "90"]
v.customize ["modifyvm", :id, "--memory", "2048"]
v.customize ["modifyvm", :id, "--cpus", "2"]
end
end
https://gist.github.com/KerbenII/d4061aae74d24245ee934e7d3ed2c1d95ee934e7d3ed2c1d9
Vagrant can start machine in virtualbox
What actually happened?
`==> default: Running 'pre-boot' VM customizations...
A customization command failed:
["modifyvm", :id, "--clipboard", "bidirectional"]
The following error was experienced:
#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "8beaeeb5-a981-4b16-9ca2-3072fad5978b", "--clipboard", "bidirectional"]
Stderr: Oracle VM VirtualBox Command Line Management Interface Version 6.1.0
(C) 2005-2019 Oracle Corporation
All rights reserved.
Usage:
This pre-boot customization IS NOT inside my Vagrantfile, so probably vagrant runs in on its own.
Looks like clipboard parameter was removed fom VBoxManage (6.1.0r135406)
1.Run vagrant up
It seems like the flag --clipboard got renamed to --clipboard-mode in 6.1 🤔
It seems like the flag
--clipboardgot renamed to--clipboard-modein 6.1
Yes, and what's more the arguments have been renamed as well:
--clipboard-mode disabled|hosttoguest|guesttohost
I have no idea what line of Vagrant code is enforcing this setting, so in order to restore my dev environment I have commented out lines 28 to 36 in vagrant/embedded/gems/gems/vagrant-2.2.6/plugins/providers/virtualbox/action/customize.rb
Hey all - This is an issue with the Vagrant box you are using. Please contact the box maintainer for a fix, Vagrant does not use the --clipboard option any where in its codebase. As you can see from the box you mentioned:
brian@localghost:vagrant-sandbox % cat ~/.vagrant.d/boxes/peru-VAGRANTSLASH-ubuntu-18.04-server-amd64/20200104.02/virtualbox/Vagrantfile
# The contents below were provided by the Packer Vagrant post-processor
Vagrant.configure("2") do |config|
config.vm.base_mac = "080027212E05"
end
# The contents below (if any) are custom contents provided by the
# Packer template during image build.
Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |libvirt, override|
libvirt.driver = "kvm"
libvirt.disk_bus = "virtio"
libvirt.nic_model_type = "virtio"
libvirt.video_type = "qxl"
libvirt.sound_type = "ich6"
libvirt.graphics_type = "spice"
libvirt.channel :type => 'unix', :target_name => 'org.qemu.guest_agent.0', :target_type => 'virtio'
libvirt.channel :type => 'spicevmc', :target_name => 'com.redhat.spice.0', :target_type => 'virtio'
libvirt.random :model => 'random'
libvirt.memory = 2048
end
config.vm.provider :virtualbox do |virtualbox, override|
virtualbox.gui = true
virtualbox.customize ["modifyvm", :id, "--cpus", 2]
virtualbox.customize ["modifyvm", :id, "--audiocontroller", "hda"]
virtualbox.customize ["modifyvm", :id, "--memory", 2048]
virtualbox.customize ["modifyvm", :id, "--vram", 128]
virtualbox.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
end
# Disable NFS sharing (==> default: Mounting NFS shared folders...)
config.vm.synced_folder ".", "/vagrant", type: "nfs", disabled: true
end
This box specifies customize commands, and this is where the clipboard is coming from. Vagrant box maintainers often put these provider commands embedded inside a Vagrant box to smooth out the process for getting started using the box. Anyway, please bring this up with the box owner.
As a temprorary fix, you can always go directly into the Vagrantfile embedded inside the box and fix up the flag and its arguments. Mine was located at: ~/.vagrant.d/boxes/peru-VAGRANTSLASH-ubuntu-18.04-server-amd64/20200104.02/virtualbox/Vagrantfile
Thanks!
Thanks for help Brian!
Reported to the Ubuntu team: https://bugs.launchpad.net/cloud-images/+bug/1863115
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hey all - This is an issue with the Vagrant box you are using. Please contact the box maintainer for a fix, Vagrant does not use the
--clipboardoption any where in its codebase. As you can see from the box you mentioned:This box specifies customize commands, and this is where the clipboard is coming from. Vagrant box maintainers often put these provider commands embedded inside a Vagrant box to smooth out the process for getting started using the box. Anyway, please bring this up with the box owner.
As a temprorary fix, you can always go directly into the Vagrantfile embedded inside the box and fix up the flag and its arguments. Mine was located at:
~/.vagrant.d/boxes/peru-VAGRANTSLASH-ubuntu-18.04-server-amd64/20200104.02/virtualbox/VagrantfileThanks!