wiki:mobile_entropy_testing

mobile entropy testing, startup & shutdown

plan of action 2015.05.06

  1. play with simple startup / shutdown below to get comfortable and connect to the vm site
    • everything in the quick reference should be correct as of now
  2. after that, i will change the ip of the vm and document everything i have to change to make it work

quick reference

command description when
qemu-ifup brings up bridge after boot or while testing network configuration
qemu-ifdown brings down bridge testing network configuration
. /etc/IPCONFIG show bridge settings testing network configuration
qemu-start starts vm after boot & after bridge is up (qemu-ifup)
qemu-status checks vm whenever
qemu-stop stops vm before shutdown
vncviewer localhost:7 view vm console vm is running
vm site purpose
sassie-webmobile/sassie2 main page
sassie-webmobile/sassie2test test page
sassie-webmobile/genapptest eb's test page
slackgenappsassie/genapptest demo test page
name ip (2015.06.06)
mobileentropy 10.0.1.35
sassie-webmobile 10.0.1.250
slackgenappsassie 10.0.1.251
netmask 255.255.255.0

ILL setup

if ip
eth0 172.17.52.214
gateway 172.17.52.254
eth1 192.168.99.1
sassie-webmobile 192.168.99.2
netmask 255.255.255.0

simple startup / shutdown

  1. after boot, as root
    /etc/qemu-ifup
    /etc/qemu-start
    
  2. to check vm
    /etc/qemu-status
    

  1. for vm console
    • useful to expedite boots, i.e. the vm waits 2.5m for user input before timing out (splash screen 2m [press Return] and screen type 30s [press SPACE])
    • I believe it is about and extra 30s or so to actually boot, so a total of 3m. Safely say 5m if you want to leave it alone.
      vncviewer mobileentropy:7
      
  2. before shutdown, as root
    /etc/qemu-stop
    

startup with network config

  1. network
    • if you are going to use one, get this working first
  2. edit /etc/IPCONFIG
    • this should be your network before any bridging is turned on
    • VERIFY these lines are correct based on your working network (could be eth0, wlan0 etc)
      GATEWAY=10.0.1.1
      IP=10.0.1.27
      NETMASK=255.255.255.0
      BROADCAST=10.0.1.255
      DEVICE=eth0
      
  3. once the IPCONFIG is correct, bring up the bridge
    • # /etc/qemu-ifup
    • it can take up to 30 seconds or so to bring down and up the network, now on the bridge (br0)
    • the br0 device will have the ip address instead of your specified network device
    • if you are using a network
      • VERIFY network is still working before proceeding
      • if you made a mistake in /etc/IPCONFIG, you should bring down the bridge and go back to step 1 network
        • to bring down the bridge
          • # /etc/qemu-ifdown
    • if you make it this far, you can probably setup a reverse ssh to entropy so I can access
  4. assign an ip to the vm
    • make sure the vm is down /etc/qemu-status, /etc/qemu-stop
      • in a worst case, if the vm won't stop
        • you can kill the qemu process found via # ps -f | grep qemu
          • killing like this is like "pulling the power cord" on the vm
    • on mobileentropy, with the new vm ip in hand
      • edit /etc/hosts
        • change the sassie-webmobile line to the correct ip
      • edit /etc/exports
        • here is an example where the vm ip is 10.0.1.50
          /share 10.0.1.50(rw,async,no_root_squash)
          
        • then run # exportfs -r
    • bring up the vm with /etc/qemu-start
    • go to the console vnc mobileentropy:7
      • it may take awhile to boot since the nfs mount isn't there & it has to time out
        • if mobileentropy's ip hasn't changed, it usually gets a connection refused quickly
      • on the sassie-webmobile console:
        • login as yourself, sudo root
        • edit /etc/ip.json
          • here's an example where the sassie-webmobile vm ip is 10.0.1.250
            {
                "vm" : {
                    "name"       : "sassie-webmobile"
                    ,"ip"        : "10.0.1.250"
                    ,"broadcast" : "10.0.1.255"
                    ,"netmask"   : "255.255.255.0"
                    ,"gateway"   : "10.0.1.1"
                }
            
                ,"host" : {
                    "name"     : "mobileentropy"
                    ,"ip"       : "10.0.1.35"
                }
            
                ,"dns"     : [
            # a.resolvers.level3.net
                    "4.2.2.1"
            # resolver{1,2,3,4}.opendns.com
                    ,"208.67.222.222"
                    ,"208.67.220.220"
                    ,"208.67.220.222"
                    ,"208.67.222.220"
                ]
            }
            
        • the dns section is fyi only ... it is not currently being populated into /etc/resolv.conf, you still need to do this manually.
      • once your are certain of the changes
        • run # /etc/ip.change.pl
          • if this takes a long time at the end, it maybe the nfs mount is not working
        • now restart the vm from the sassie-webmobile vnc console with # init 6
        • hopefully everything is configured correctly
          • test the website sassie2
            • make sure you close your browser tab as it may have previous session information stored on the server related to your session id
          • if not, go back and verify your ip settings
            • if still not, contact me

DNS FYI

  • last time i was in Grenoble, DNS had some states addresses blocked
    • here is a list of open dns servers that seem active, see which pings best and make that primary
      # a.resolvers.level3.net
      4.2.2.1
      # resolver{1,2,3,4}.opendns.com
      208.67.222.222
      208.67.220.220
      208.67.220.222
      208.67.222.220
      

network scenario testing

  • I'm hoping scenario 1, 2 & maybe 3 are sufficient
    • scenario 4 seems problematic due to ip address changes

wan:none

scenario 1: wan:none + lan:eth0 attached router

  • config for 10.0.1.x
  • keep "base" addresses, e.g. 10.0.1.27 (me) 10.0.1.50 (s-wm)
  • maybe we should move to the top of the range 10.0.1.250, 251 ?
  • or we could make the network 10.0.x.x to put wireless on 10.0.2.x and wired on 10.0.1.x ?
    • if so, change netmask and broadcast

scenario 2: wan:wlan0 + lan:eth0 attached router

  • this will provide a route to the internet for users attached via your router routing with mobileentropy acting as a gateway

scenario 3: wan:eth1 + lan:eth0 attached router

  • need a 2nd wired port
    • there are usb ethernet ports
  • this will provide a route to the internet for users attached via your router routing with mobileentropy acting as a gateway

scenario 4: wan:wlan0

  • this is if we are totally relying on the wireless network
  • we will have to get two ip addresses
    • if ip changes, it will take some work to get mobileentropy & sassie-webmobile reconfigured
Last modified 3 years ago Last modified on Jun 6, 2015, 12:02:11 PM