~davmor2/+junk/test-smart-scopes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
* allows config options to mention paths and have their value be the content
   of the path. This would allow ssh keys to be referred to by path making
   the config file more readable. The vms ssh server keys could be managed
   under ~/.ssh/vms for example.

* investigate libguestfs to allow image access without running any vm.

* investigate why --network=network-default fails for elopio's desktop

  => DONE, apparently a reboot was needed after installing virt-install or
     something to align the network configuration.

* weirdly enough, it looks like clout-init redo some setup at each boot, we
   may need to uninstall it ?
  => that's the expected behavior, whether or not we need to uninstall is
   still an open question.

* look at how to set ssh server keys or they'll get regenerated by
   cloud-init, making it harder to record the them in ~/.ssh/known_hosts.

* after an install from a cloud image, the resulting vm can't boot until
   'virsh console <vm_name>.local' is issued (and pressing return once the
   prompt is displayed). Tweaking grub may still be required :-/

* installing from the cloud image currently relies on a separate process
   connecting to the console (virsh console selftest) and waiting for the
   final message from cloud-init. If this fails at some point, the following
   are notes about making the guest connect to the host allowing the later
   to send commands via a socket.

import socket
                                    self.socket_type)
 
sock = socket.socket(ssocket.AF_INET, socket.SOCK_STREAM)
sock.bind(('localhost', 0))
server_address = sock.getsockname()
 
# on the guest:
rm -f fifo
mkfifo fifo
cat fifo | /bin/sh -i 2>&1 | nc localhost 1234 (server_address) > fifo
 
# on the host
nc -l localhost 1234
$
....
$ rm fifo
$ sudo shutdown -P now
$ exit # Is it really reached ? Always ?


* look at PXE, interesting read may include:

  http://ubuntuforums.org/archive/index.php/t-1713845.html