Find the answer to your Linux question:
Results 1 to 2 of 2
Hi folks, Ubuntu 8.04 server amd64 - host Ubuntu 6.06 server amd64 - guest KVM I referred; The Kernel Virtual Machine https://help.ubuntu.com/community/KVM and couldn't figure out how to set guest ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778

    How to set static IP for guest OS


    Hi folks,


    Ubuntu 8.04 server amd64 - host
    Ubuntu 6.06 server amd64 - guest
    KVM


    I referred;
    The Kernel Virtual Machine
    https://help.ubuntu.com/community/KVM

    and couldn't figure out how to set guest static IP address


    Host;

    /etc/network/interfaces
    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
    
    
    auto eth0
    iface eth0 inet manual
    
    
    # The primary network interface
    auto br0
    iface br0 inet static
            address 192.168.0.110
            netmask 255.255.255.0
            network 192.168.0.0
            broadcast 192.168.0.255
            gateway 192.168.0.1
            bridge_ports eth0
            bridge_fd 9
            bridge_hello 2
            bridge_maxage 12
            bridge_stp off

    Guest;
    /etc/network/interfaces
    Code:
    auto lo
    iface lo inet loopbak
    
    # The primary network interface
    auto eth0
    iface eth0 inet dhcp
    $ ifconfig
    Code:
    ...
    inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
    ....

    Host;

    /etc/libvirt/qemn/networks/default.xml
    Code:
    <network>
      <name>default</name>
      <uuid></uuid>
      <bridge name="virbr%d" />
      <forward/>
      <ip address="192.168.122.1" netmask="255.255.255.0">
        <dhcp>
          <range start="192.168.122.2" end="192.168.122.254" />
        </dhcp>
      </ip>
    </network>

    Please shed me some light. TIA


    B.R.
    satimis

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    This is for KVM on Debian, but I'd think the same procedure would apply.
    Linux Mint + IceWM Registered: #371367 New Members: click here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •