Autor: Alex Coventry Data: A: Tails-dev Assumpte: [Tails-dev] Tails testing framework: how to start rpc in guest?
bitingbird on #tails said I should ask this here:
The tails testing framework sends commands to the test vm over an RPC
connection at 127.0.0.1:1337, but that port is not open in the guest if I
invoke it with this script. Can someone tell me what step my script is
missing?
Best,
Alex
1. $LOAD_PATH.unshift("/play/coventry/alien/tails/features/support")
2.
$LOAD_PATH.unshift("/play/coventry/alien/tails/features/support/helpers")
3.
4. # Do this via config.rb to avoid warning, for now.
5. ENV['TAILS_ISO'] =
"/play/coventry/alien/tails/tails-i386-build-test-1.3-20150317.iso"
6.
7. require 'debugger'
8. require 'config'
9. require 'display_helper'
10. require 'exec_helper'
11. require 'vm_helper'
12. require 'storage_helper'
13.
14. xmlpath = "/play/coventry/alien/tails/features/domains"
15.
16. virt = Libvirt::open("qemu:///system")
17. vmnet = VMNet.new(virt, xmlpath)
18. vmstorage = VMStorage.new(virt, xmlpath)
19.
20. vm = VM.new(virt, xmlpath, vmnet, vmstorage, ":0")
21. vm.set_ram_size(2, "GiB")
22. # Use vm.set_disk_boot to boot from another medium, I guess...
23. vm.set_cdrom_boot(TAILS_ISO)
24. vm.plug_network
25.
26. vm.start
27. print "Wait till it's started, then hit C-d..."
28. gets
29. print "OK, trying to execute now..."
30. debugger
31. print vm.execute("cat /etc/passwd")