qemu-toolkit 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/README.7 +1 -1
- data/doc/qemu-toolkit-configuration.7 +36 -3
- data/doc/qemu-toolkit-configuration.7.ronn +18 -1
- data/lib/qemu-toolkit/dsl.rb +3 -0
- data/lib/qemu-toolkit/vm.rb +11 -1
- metadata +2 -2
data/doc/README.7
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "QEMU\-TOOLKIT" "7" "
|
4
|
+
.TH "QEMU\-TOOLKIT" "7" "December 2012" "" "qemu-toolkit"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBqemu\-toolkit\fR \- A toolkit for running qemu on Illumos / OmniOS
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "QEMU\-TOOLKIT\-CONFIGURATION" "7" "
|
4
|
+
.TH "QEMU\-TOOLKIT\-CONFIGURATION" "7" "December 2012" "" "qemu-toolkit"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBqemu\-toolkit\-configuration\fR \- configuration for qemu\-toolkit
|
@@ -97,6 +97,37 @@ drive if: \'floppy\', file: \'floppy\.dsk\'
|
|
97
97
|
.
|
98
98
|
.IP "" 0
|
99
99
|
|
100
|
+
.
|
101
|
+
.TP
|
102
|
+
keyboard_layout \fILAYOUT\fR
|
103
|
+
Configure keyboard layout of the VNC display\. The default is \'en\-us\'\.
|
104
|
+
.
|
105
|
+
.IP "" 4
|
106
|
+
.
|
107
|
+
.nf
|
108
|
+
|
109
|
+
# Set keyboard to \'de\-ch\'
|
110
|
+
keyboard_layout \'de\-ch\'
|
111
|
+
.
|
112
|
+
.fi
|
113
|
+
.
|
114
|
+
.IP "" 0
|
115
|
+
.
|
116
|
+
.IP
|
117
|
+
The available layouts are:
|
118
|
+
.
|
119
|
+
.IP "" 4
|
120
|
+
.
|
121
|
+
.nf
|
122
|
+
|
123
|
+
ar de\-ch es fo fr\-ca hu ja mk no pt\-br sv
|
124
|
+
da en\-gb et fr fr\-ch is lt nl pl ru th
|
125
|
+
de en\-us fi fr\-be hr it lv nl\-be pt sl tr
|
126
|
+
.
|
127
|
+
.fi
|
128
|
+
.
|
129
|
+
.IP "" 0
|
130
|
+
|
100
131
|
.
|
101
132
|
.TP
|
102
133
|
net \fITYPE\fR, \fIOPTIONS\fR
|
@@ -166,12 +197,14 @@ Enables VNC server on port \fIPORT\fR\. Caution: This will listen for connection
|
|
166
197
|
.nf
|
167
198
|
|
168
199
|
# Make vnc listen on a given port: (5900 + display = tcp/ip port)
|
169
|
-
vnc_display 0
|
200
|
+
vnc_display ":0"
|
170
201
|
.
|
171
202
|
.fi
|
172
203
|
.
|
173
204
|
.IP "" 0
|
174
|
-
|
205
|
+
.
|
206
|
+
.IP
|
207
|
+
This option is passed through to the \'\-vnc\' option on qemu\. All the values permitted there are permitted here as well\. Note that a vnc socket is created in \fB/var/run/qemu\-toolkit/VMNAME/vm\.vnc\fR even if this option is not given\.
|
175
208
|
.
|
176
209
|
.TP
|
177
210
|
extra_arg \fIARGUMENT\fR
|
@@ -60,6 +60,18 @@ Here's a list of configuration options within the virtual_machine declaration:
|
|
60
60
|
# Manual drive configuration:
|
61
61
|
drive if: 'floppy', file: 'floppy.dsk'
|
62
62
|
|
63
|
+
* keyboard_layout <LAYOUT>:
|
64
|
+
Configure keyboard layout of the VNC display. The default is 'en-us'.
|
65
|
+
|
66
|
+
# Set keyboard to 'de-ch'
|
67
|
+
keyboard_layout 'de-ch'
|
68
|
+
|
69
|
+
The available layouts are:
|
70
|
+
|
71
|
+
ar de-ch es fo fr-ca hu ja mk no pt-br sv
|
72
|
+
da en-gb et fr fr-ch is lt nl pl ru th
|
73
|
+
de en-us fi fr-be hr it lv nl-be pt sl tr
|
74
|
+
|
63
75
|
* net <TYPE>, <OPTIONS>:
|
64
76
|
Manual network configuration. This gives you full access to QEMU options,
|
65
77
|
with the disadvantage of a slightly more complicated set of options.
|
@@ -106,7 +118,12 @@ Here's a list of configuration options within the virtual_machine declaration:
|
|
106
118
|
console` or connect directly to the unix socket using socat.
|
107
119
|
|
108
120
|
# Make vnc listen on a given port: (5900 + display = tcp/ip port)
|
109
|
-
vnc_display 0
|
121
|
+
vnc_display ":0"
|
122
|
+
|
123
|
+
This option is passed through to the '-vnc' option on qemu. All the values
|
124
|
+
permitted there are permitted here as well. Note that a vnc socket is
|
125
|
+
created in `/var/run/qemu-toolkit/VMNAME/vm.vnc` even if this option is
|
126
|
+
not given.
|
110
127
|
|
111
128
|
* extra_arg <ARGUMENT>:
|
112
129
|
Extra argument for QEMU, appended to the QEMU command line on launch. If
|
data/lib/qemu-toolkit/dsl.rb
CHANGED
data/lib/qemu-toolkit/vm.rb
CHANGED
@@ -14,6 +14,11 @@ module QemuToolkit
|
|
14
14
|
#
|
15
15
|
def all(backend=nil)
|
16
16
|
Enumerator.new do |yielder|
|
17
|
+
libdir = Config.etc('lib')
|
18
|
+
if ::File.directory? libdir
|
19
|
+
$:.unshift libdir
|
20
|
+
end
|
21
|
+
|
17
22
|
Dir[Config.etc('*.rb')].each do |vm_file|
|
18
23
|
# Load all virtual machines from the given file
|
19
24
|
dsl = DSL::File.new
|
@@ -52,6 +57,8 @@ module QemuToolkit
|
|
52
57
|
attr_accessor :ram
|
53
58
|
# VNC display port
|
54
59
|
attr_accessor :vnc_display
|
60
|
+
# Keyboard layout
|
61
|
+
attr_accessor :keyboard_layout
|
55
62
|
|
56
63
|
def initialize(backend)
|
57
64
|
@disks = []
|
@@ -110,10 +117,13 @@ module QemuToolkit
|
|
110
117
|
cmd << "-no-hpet"
|
111
118
|
cmd << "-enable-kvm"
|
112
119
|
cmd << "-vga cirrus"
|
113
|
-
cmd << "-k de-ch"
|
114
120
|
cmd << "-parallel none"
|
115
121
|
cmd << "-usb"
|
116
122
|
cmd << '-usbdevice tablet'
|
123
|
+
|
124
|
+
if keyboard_layout
|
125
|
+
cmd << "-k #{keyboard_layout}"
|
126
|
+
end
|
117
127
|
|
118
128
|
# Add disks
|
119
129
|
cmd += disk_options
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qemu-toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: clamp
|