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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ssh.rb +2 -1
  3. data/lib/version.rb +1 -1
  4. data/lib/vm.rb +3 -2
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0fad5758256c0e74da6f5b06cc494653f4dace51cdaf0c358b658d7255f539c
4
- data.tar.gz: 743619250706519bc7d4bd5d93953a8c2a08d1acaf9923d0100fc65c26e3630a
3
+ metadata.gz: bcd6b80ed80898c41c3ca6365ff62561c8dd6f6959e2bf0082ff2d30b30c0c49
4
+ data.tar.gz: 69b8b5eea4153430e9af7540fafd5a4b6a46ffb60bb2ec39e54aeae5a1bb5d19
5
5
  SHA512:
6
- metadata.gz: 23502b5662ca90b84c15e42456689f80cb9b216b8f1e6d507fd99c19957ba47296ab38d3e910d399559ecb5f3f2a9b9e5b34f8e8d864d4560b4f4ccb8f0422fb
7
- data.tar.gz: 719ca17aade8cc9bc3603041907aee96021030bea45401179b76f9e3f640041cd4bdba101b65fd98acf57a8ee67ffc4dd5b9723fbf1065beb8b2c78830cefacc
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 "setting up VM..."
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
@@ -1,3 +1,3 @@
1
1
  module Susi
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
data/lib/vm.rb CHANGED
@@ -133,12 +133,13 @@ module Susi
133
133
 
134
134
  cmd = []
135
135
 
136
- cmd << "qemu-system-x86_64"
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: susi-qemu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bovensiepen