debian_etch_xen_from_debian_repository

Discussion in 'HOWTO-Related Questions' started by hotchilli, Mar 31, 2008.

  1. hotchilli

    hotchilli New Member

    Falko:

    when i follow this howto ,before I create the image which xen-vserver should i be booting
    into i think its 2.6.18-6-xen-vserver-686?


    below is the first boot:

    a)networking seems strange

    b)when i created the image i used
    debian:~# xen-create-image --debootstrap --hostname
    debian --ip=192.168.198.100 --gateway=192.168.198.1 --dist=etch

    c) what will the user name and password be?




    -----------------------------------------------------------------------------------------------
    debian:~# xm list
    Name ID Mem(MiB) VCPUs State Time(s)
    Domain-0 0 295 1 r----- 470.4
    debian 1 128 1 ------ 36.4
    debian:~# xm console debian



    Linux version 2.6.18-4-xen-vserver-686 (Debian 2.6.18.dfsg.1-12etch2) ([email protected]) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Thu May 10 04:02:17 UTC 2007
    BIOS-provided physical RAM map:
    Xen: 0000000000000000 - 0000000008800000 (usable)
    0MB HIGHMEM available.
    136MB LOWMEM available.
    ACPI in unprivileged domain disabled
    Built 1 zonelists. Total pages: 34816
    Kernel command line: root=/dev/sda1 ro
    Enabling fast FPU save and restore... done.
    Enabling unmasked SIMD FPU exception support... done.
    Initializing CPU#0
    PID hash table entries: 1024 (order: 10, 4096 bytes)
    Xen reported: 2666.758 MHz processor.
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Software IO TLB disabled
    vmalloc area: c9000000-f51fe000, maxmem 2d7fe000
    Memory: 114956k/139264k available (1625k kernel code, 15956k reserved, 591k data, 148k init, 0k highmem)
    Checking if this processor honours the WP bit even in supervisor mode... Ok.
    Calibrating delay using timer specific routine.. 6789.96 BogoMIPS (lpj=13579925)Security Framework v1.0.0 initialized
    SELinux: Disabled at boot.
    Capability LSM initialized
    Mount-cache hash table entries: 512
    CPU: Trace cache: 12K uops, L1 D cache: 16K
    CPU: L2 cache: 256K
    Checking 'hlt' instruction... OK.
    SMP alternatives: switching to UP code
    Freeing SMP alternatives: 16k freed
    Brought up 1 CPUs
    migration_cost=0
    checking if image is initramfs... it is
    Freeing initrd memory: 11430k freed
    Grant table initialized
    NET: Registered protocol family 16
    Brought up 1 CPUs
    PCI: setting up Xen PCI frontend stub
    ACPI: Interpreter disabled.
    Linux Plug and Play Support v0.97 (c) Adam Belay
    pnp: PnP ACPI: disabled
    xen_mem: Initialising balloon driver.
    PCI: System does not support PCI
    PCI: System does not support PCI
    NET: Registered protocol family 2
    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    TCP: Hash tables configured (established 8192 bind 4096)
    TCP reno registered
    audit: initializing netlink socket (disabled)
    audit(1207052482.114:1): initialized
    VFS: Disk quotas dquot_6.5.1
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    Initializing Cryptographic API
    io scheduler noop registered
    io scheduler anticipatory registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
    Xen virtual console successfully installed as tty1
    Event-channel device installed.
    netfront: Initialising virtual ethernet driver.
    PNP: No PS/2 controller found. Probing ports directly.
    i8042.c: No controller found.
    mice: PS/2 mouse device common for all mice
    TCP bic registered
    NET: Registered protocol family 1
    NET: Registered protocol family 17
    NET: Registered protocol family 8
    NET: Registered protocol family 20
    Using IPI No-Shortcut mode
    netfront: device eth0 has flipping receive path.
    Registering block device major 8
    Freeing unused kernel memory: 148k freed
    Loading, please wait...
    Begin: Loading essential drivers... ...
    Done.
    Begin: Running /scripts/init-premount ...
    FATAL: Error inserting fan (/lib/modules/2.6.18-4-xen-vserver-686/kernel/drivers/acpi/fan.ko): No such device
    FATAL: Error inserting thermal (/lib/modules/2.6.18-4-xen-vserver-686/kernel/drivers/acpi/thermal.ko): No such device
    Done.
    Begin: Mounting root file system... ...
    Begin: Running /scripts/local-top ...
    Done.
    Begin: Running /scripts/local-premount ...
    Done.
    kjournald starting. Commit interval 5 seconds
    EXT3-fs: mounted filesystem with ordered data mode.
    Begin: Running /scripts/local-bottom ...
    Done.
    Done.
    Begin: Running /scripts/init-bottom ...
    Done.
    Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
    INIT: version 2.86 booting
    Activating swap.
    Adding 131064k swap on /dev/sda2. Priority:-1 extents:1 across:131064k
    Checking root file system...
    fsck 1.37 (21-Mar-2005)
    /dev/sda1: clean, 19710/524288 files, 119588/1048576 blocks
    EXT3 FS on sda1, internal journal
    System time was Tue Apr 1 12:23:48 UTC 2008.
    Setting the System Clock using the Hardware Clock as reference...
    System Clock set. System local time is now Tue Apr 1 12:28:19 UTC 2008.
    Cleaning up ifupdown...done.
    Calculating module dependencies... done.
    Loading modules...
    All modules loaded.
    Checking all file systems...
    fsck 1.37 (21-Mar-2005)
    Setting kernel variables ...
    ... done.
    Mounting local filesystems...
    Cleaning /tmp /var/run /var/lock.
    Running 0dns-down to make sure resolv.conf is ok...done.
    Setting up networking...done.
    Setting up IP spoofing protection: rp_filter.
    Configuring network interfaces.../etc/network/interfaces:13: option with empty value
    ifup: couldn't read interfaces file "/etc/network/interfaces"
    done.

    Setting the System Clock using the Hardware Clock as reference...
    System Clock set. Local time: Tue Apr 1 12:30:40 UTC 2008

    Initializing random number generator...done.
    Recovering nvi editor sessions... done.
    INIT: Entering runlevel: 2
    Starting system log daemon: syslogd.
    Starting kernel log daemon: klogd.
    Starting MTA: exim4.
    Starting internet superserver: inetd.
    Starting OpenBSD Secure Shell server: sshd.
    Starting deferred execution scheduler: atdNET: Registered protocol family 10
    lo: Disabled Privacy Extensions
    IPv6 over IPv4 tunneling driver
    .
    Starting periodic command scheduler: cron.

    Debian GNU/Linux 3.1 debian tty1

    debian login:


    thanks for any feedback

    hotchilli






    hotchilli:)
     
    Last edited: Apr 1, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/network/interfaces?

    Did you set
    passwd = 1
    in /etc/xen-tools/xen-tools.conf? Then you should have been asked for a root password.
     
  3. hotchilli

    hotchilli New Member

    debian imade domain

    this is the interface file

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet dhcp

    i have amended the password = 1 now but when i start with the command

    debian:/home/andy# xm console debian

    i get only these two lines with the curser flashing below the 2nd line

    netfront: device eth0 has flipping receive path.
    netfront: device eth0 has flipping receive path.

    hotchilli
     
    Last edited: Apr 2, 2008
  4. falko

    falko Super Moderator Howtoforge Staff

    Is this from the host or the guest system? I think you should use a static IP on the host.

    You must create a vm after you've modifed the setting. The modification has no effect on existing vms.
     
  5. hotchilli

    hotchilli New Member

    you wrote:
    >Is this from the host or the guest system?


    2.6.18-6-xen-vserver-686 which i think is the host

    i think the guest is xen-linux-system-2.6.18-4-xen-vserver-686 debian please look at the howto this is what i followed


    you wrote:
    >I think you should use a static IP >on the host.


    how to set a static ip for the host?

    i checked the actice connection information on
    2.6.18-6-xen-vserver-686

    interface wired ethernet (eth0)


    IP address: 192.168.198.128
    broadcast address: 192.168.198.255
    subnet mask: 255.255.255.0
    default route: 192.168.198.2
    primary DNS: 192.168.198.2
    sec DNS 0.0.0.0
    hardware address 00.0C.29.87.E0.79

    you wrote:
    >You must create a vm after you've modifed the setting. The modification has no effect on existing >vms.

    ok so how to delete the image i created?

    so now i must do again this command;
    xen-create-image --debootstrap --hostname
    debian --ip=192.168.198.100 --gateway=192.168.198.1 --dist=etch



    hotchilli
     
    Last edited: Apr 3, 2008
  6. falko

    falko Super Moderator Howtoforge Staff

    The host and the vms are running the same kernel.


    http://www.howtoforge.com/perfect_setup_debian_etch_p3

    xen-delete-image
    http://www.howtoforge.com/xen_tools_xen_shell_argo
     
  7. hotchilli

    hotchilli New Member

    static ip on host

    i am not sure if this will work but can i take your use your example also ?
    ie

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    #allow-hotplug eth0
    #iface eth0 inet dhcp





    auto eth0
    iface eth0 inet static
    address 192.168.0.100
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1



    this is the output of netstat -nr


    andy@debian:~$ netstat -nr
    Kernel IP routing table
    Destination-------------Gateway Genmask Flags MSS Window irtt Iface
    192.168.198.0 ------- 0.0.0.0 -- 255.255.255.0 U 0 0 0 eth0
    0.0.0.0 ----------- -- 192.168.198.2 0.0.0.0 UG 0 0 0 eth0
    andy@debian:~$


    this the result of nmap

    debian:/home/andy# nmap -sP 192.168.198.0/24

    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-04-03 21:37 BST
    Host 192.168.198.1 appears to be up.
    MAC Address: 00:50:56:C0:00:08
    Host 192.168.198.2 appears to be up.
    MAC Address: 00:50:56:E3:7D:40
    Host 192.168.198.128 appears to be up.
    Host 192.168.198.254 appears to be up.
    MAC Address: 00:50:56:FA:C1:06
    Nmap finished: 256 IP addresses (4 hosts up) scanned in 9.636 seconds
     
    Last edited: Apr 5, 2008
  8. falko

    falko Super Moderator Howtoforge Staff

    Yes, but please use an IP address that is in your subnet and unused.
     
  9. hotchilli

    hotchilli New Member

    will it work

    I am about to follow the static ip howto

    i have two questions in this thread

    first i will use this in /etc/network/interfaces:

    auto eth0
    iface eth0 inet static
    address 192.168.0.100
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1

    question 1
    if i restart networking at this point it may not work as /etc/resolv
    has not been amended?

    here is /etc/resolv.conf

    #generated by networkmanager, do not edit

    search localdomain
    nameservers 192.168.198.2 *

    *(this looks like the same ip as per my post before (no7)with the netstat -nr command as the gateway)


    this is my /etc/hosts file:

    127.0.0.1 localhost
    127.0.0.1 debian. localdomains debian

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

    question2
    looking at the files above (/etc/resolv.conf and /etc/hosts)
    is it ok to place the place the same nameservers as in the howto and the same example as in the howto for /etc/hosts?




    hotchilli
     
    Last edited: Apr 7, 2008
  10. falko

    falko Super Moderator Howtoforge Staff

    As I said before, you must use an IP address from your subnet. If you're using 192.168.198.* in your subnet, then you must use an IP from that subnet, not 192.168.0.100.

    Yes.

    Depends on the system's IP address and the hostname you want to use.
     
  11. hotchilli

    hotchilli New Member

    example to use

    thanks for your post

    so i could use something like this

    ip address 192.168.198.100
    netmask 255.255.255.0
    network to be determined by system
    broadcast to be determined by system
    gateway 192.168.198.2 (netstat -nr in thread 7 gives this gateway)



    ihotchilli
     
    Last edited: Apr 7, 2008
  12. falko

    falko Super Moderator Howtoforge Staff

    Try this:

    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    #allow-hotplug eth0
    #iface eth0 inet dhcp
    auto eth0
    iface eth0 inet static
            address 192.168.198.100
            netmask 255.255.255.0
            network 192.168.198.0
            broadcast 192.168.198.255
            gateway 192.168.0.2
     
  13. hotchilli

    hotchilli New Member

    static ip

    I tried as you suggested and:

    debian:/home/andy# nano /etc/network/interfaces
    debian:/home/andy# /etc/init.d/networking restart
    Reconfiguring network interfaces...SIOCDELRT: No such process
    SIOCADDRT: Network is unreachable
    Failed to bring up eth0.
    done.



    so I did a rough workaround


    address 192.168.198.100
    netmask 255.255.255.0
    gateway 192.168.198.2

    but when did /etc/init.d/networking restart

    it restarted but back to the orginal ip
    so I killed dhclient,
    but when did /etc/init.d/networking restart again dhclient pid returned.

    so as a last resort i killed dhclient, dhcdbd, and network manager then

    /etc/init.d/networking restart that did it so now i have a static ip
    after reboot its still in place.

    have not amended the /etc/resolv.conf file, is this neccessary?

    have not amended the /etc/hosts file

    for example if i added the this line to /etc/hosts(see post no 9 at the bottom)
    192.168.198.100 server1.example.com server1

    then run echo server1.example.com > /etc/hostname
    /bin/hostname -F /etc/hostname --would this be ok?

    hotchili





    hotchilli
     
    Last edited: Apr 9, 2008
  14. falko

    falko Super Moderator Howtoforge Staff

    Not if name resolution is working ok on your box.

    Yes, if you want to use server1.example.com as your hostname.
     
  15. hotchilli

    hotchilli New Member

    Falko thanks for your suggestions in this thread.

    So to go back to the fist post in this thread:


    I wil now use a command line similar to this one:

    debian:~# xen-create-image --debootstrap --hostname
    debian --ip=192.168.198.100 --gateway=192.168.198.1 --dist=etch --passwd

    a) since 192.168.198.100 has been used as my static ip
    must i choose a diffrent ip address or must i create a 2nd static ip address?

    b) can the gateway of 192.168.198.1--- can this be used? or should the same gateway as used for the static ip address be used ie 192.168.198.2?

    c) I will set this
    passwd = 1
    in /etc/xen-tools/xen-tools.conf and add --passwd in the command line.?

    d) If i set a hostname (as suggested in thread no 14) then can i give this hostname in the comand line or is a 2nd hostname required?


    hotchilii
     
    Last edited: Apr 10, 2008
  16. falko

    falko Super Moderator Howtoforge Staff

    You must use an unused IP address for the VM, so if you use 192.168.198.100 on the host, you must use a different IP address (e.g. 192.168.198.101).

    Use the same gateway that you use for the host.

    Then you don't need --passwd on the command line.

    You should assign a different hostname to your VM.
     

Share This Page