~smoser/maas/maas-ephemeral-sniff

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
This helps to set up and test iscsi root.  It registers a maas ephemeral
image into tgtd, and then boots the image using overlayfs and iscsi
read-only root.

To use it:
  $ ./get-maas-eph trusty.d trusty
That creates 
   trusty.d/root-image
   trusty.d/root-image.gz
   trusty.d/hwe-t/boot-kernel
   trusty.d/hwe-t/boot-initrd

There are some configurable variables at the top of tgt-boot-test,
but defaults may well work for you.

get xkvm from 
 http://bazaar.launchpad.net/~curtin-dev/curtin/trunk/files/head:/tools/
and put it into your path.

To then boot a iscsi root with those components:
 $ ./tgt-boot-test trusty.d/root-image \
     trusty.d/hwe-t/boot-kernel trusty.d/hwe-t/boot-initrd

That boots a qemu-system curses UI.
  alt-1 is the vga console
  alt-2 is the qemu monitor

The system should boot successfully to login prompt and user should
be able to login with 'ubuntu' and 'passw0rd'

Also if you have ssh keys in ~/.ssh/id_rsa.pub or 'ssh-add -L', then
you should be able to ssh into the system

You could modify the user-data in tgt-boot-test to do something
and shut the system down to verify all working.

It will log console to file name 'serial'.
If you want to not log, set environment NO_LOG=1.