susi-qemu 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssh.rb +2 -1
- data/lib/version.rb +1 -1
- data/lib/vm.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcd6b80ed80898c41c3ca6365ff62561c8dd6f6959e2bf0082ff2d30b30c0c49
|
4
|
+
data.tar.gz: 69b8b5eea4153430e9af7540fafd5a4b6a46ffb60bb2ec39e54aeae5a1bb5d19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcc80bdf535557fbc66257725635857521084b4574f2a58938c647bdfd3cdd79966235ce98373e163424b70120ba5c812651b007dabfbf94351b27bdb4fee9a4
|
7
|
+
data.tar.gz: e63022c2205e0405749e9c5339098d2818c270a0d783de626f076a57e4ab1e47f286cef7519c91b1e10240b016e3b307544b83b40bec21b2d88b968c09914fcf
|
data/lib/ssh.rb
CHANGED
@@ -13,8 +13,9 @@ module Susi
|
|
13
13
|
def self.set_hostname(name)
|
14
14
|
vm = VM.new(name)
|
15
15
|
Net::SSH.start(vm.ip, 'dabo', port: vm.ssh_port, keys: [File.expand_path('~/.ssh/id_ed25519')]) do |ssh|
|
16
|
-
Susi::debug "
|
16
|
+
Susi::debug "Setting up VM..."
|
17
17
|
ssh.exec!("sudo hostnamectl set-hostname #{name}")
|
18
|
+
ssh.exec!("sudo sed -i 's/susi/#{name}/' /etc/hosts")
|
18
19
|
end
|
19
20
|
end
|
20
21
|
end
|
data/lib/version.rb
CHANGED
data/lib/vm.rb
CHANGED
@@ -133,12 +133,13 @@ module Susi
|
|
133
133
|
|
134
134
|
cmd = []
|
135
135
|
|
136
|
-
cmd << "
|
136
|
+
cmd << "sudo"
|
137
|
+
cmd << `which qemu-system-x86_64`.strip
|
137
138
|
|
138
139
|
# general setup
|
139
140
|
cmd << "-name #{name}"
|
140
141
|
cmd << "-m 2048"
|
141
|
-
cmd << "-hda #{disk}.qcow2"
|
142
|
+
cmd << "-hda #{File.expand_path(disk)}.qcow2"
|
142
143
|
cmd << "-daemonize"
|
143
144
|
cmd << "-enable-kvm"
|
144
145
|
|