2
2
# vi: set ft=ruby :
3
3
4
4
# https://app.vagrantup.com/boxes/search
5
- vmbox_image = ENV [ "VMBOX_IMAGE" ] || "generic/ubuntu2004"
5
+ # "generic/ubuntu2004"
6
+ # "peru/ubuntu-20.04-desktop-amd64"
7
+ vmbox_image = ENV [ "VMBOX_IMAGE" ] || "fasmat/ubuntu2004-desktop"
6
8
7
9
8
10
# Check required vagrant dependencies plugins and install them
9
- required_plugins = %w( vagrant-reload vagrant-disksize vagrant-reload )
11
+ required_plugins = %w( vagrant-reload vagrant-disksize vagrant-reload vagrant-vbguest )
10
12
plugins_to_install = required_plugins . select { |plugin | not Vagrant . has_plugin? plugin }
11
13
if not plugins_to_install . empty?
12
14
puts "Installing plugins: #{ plugins_to_install . join ( ' ' ) } "
@@ -33,11 +35,14 @@ Vagrant.configure("2") do |config|
33
35
# set defaults for VMs
34
36
config . vm . provider 'virtualbox' do |vb |
35
37
36
- vb . name = "zx-spectrum-instapack-vbox "
38
+ vb . name = "zxbox "
37
39
38
40
# enable native GUI window
39
41
vb . gui = true
40
42
43
+ # enable RDP GUI access
44
+ vb . customize [ "modifyvm" , :id , "--vrde" , "on" , "--vrdemulticon" , "on" , "--vrdeport" , "3389" ]
45
+
41
46
# hardware specs
42
47
vb . customize [ "modifyvm" , :id , "--cpus" , 2 ]
43
48
vb . customize [ "modifyvm" , :id , "--memory" , 3000 ]
@@ -47,10 +52,16 @@ Vagrant.configure("2") do |config|
47
52
vb . customize [ 'modifyvm' , :id , "--natdnshostresolver1" , "off" ]
48
53
49
54
# enable audio (none|dsound|oss|alsa|pulse|coreaudio: supported audio types depends on the host OS)
50
- vb . customize [ "modifyvm" , :id , "--audio" , "pulse" , "--audioout" , "on" , "--audiocontroller" , "ac97" ]
51
-
52
- # enable RDP GUI access
53
- vb . customize [ "modifyvm" , :id , "--vrde" , "on" , "--vrdemulticon" , "on" , "--vrdeport" , "3389" ]
55
+ vb . customize [ "modifyvm" , :id , "--audioout" , "on" ]
56
+ if RUBY_PLATFORM =~ /darwin/
57
+ vb . customize [ "modifyvm" , :id , '--audio' , 'coreaudio' ]
58
+ elsif RUBY_PLATFORM =~ /mingw|mswin|bccwin|cygwin|emx/
59
+ vb . customize [ "modifyvm" , :id , '--audio' , 'dsound' ]
60
+ elsif RUBY_PLATFORM =~ /linux/
61
+ vb . customize [ "modifyvm" , :id , '--audio' , 'alsa' ]
62
+ end
63
+
64
+ # virtualbox.customize ["modifyvm", :id, "--clipboard-mode", "bidirectional"]
54
65
55
66
# solve issue 'stuck connection timeout retrying' (kernel selection menu)
56
67
# https://stackoverflow.com/questions/22575261/vagrant-stuck-connection-timeout-retrying
0 commit comments