~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
* investigate why --network=network-default fails for elopio's desktop

* weirdly enough, it looks like clout-init redo some setup at each boot, we
   may need to uninstall it ?

* 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 ?