Virtualization With KVM On Ubuntu 12.04 LTS - can't bring up guest network interface

Discussion in 'HOWTO-Related Questions' started by nzimas, Aug 11, 2012.

  1. nzimas

    nzimas New Member

    I'm trying to set up a private network for the guests using NAT.
    My intention is to shield them from any direct interaction with the outside world.
    The host I am working on has only one physical NIC with a public IP assigned to it.
    For some reason I haven't managed to sort, the guest interface is not getting an ip from the default DHCP provided by libvirt (ideally I would actually use static IP addresses anyway).

    The interface block in the guest's config file currently looks as follows:
    Code:
    <interface type='network'>
          <mac address='00:16:3e:1a:b3:4a'/>
          <source network='default'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
        </interface>
    
    ifconfig returns:
    /etc/network/interfaces is configured as shown:
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth2
    iface eth2 inet static
    	address 178.33.xxx.xxx
    	netmask 255.255.255.0
    	network 178.33.xxx.xxx
    	broadcast 178.33.xxx.xxx
    	gateway 178.33.xxx.xxx
    
    Lastly, ifup doesn't seem to find vnet0, although ifconfig lists it.
    Thanks!

    [EDIT]
    Although the vnetX interfaces still display empty, I manage to access the VMs if a static IP is supplied to vmbuilder. As such:
    Code:
    vmbuilder kvm ubuntu --suite=precise --flavour=virtual --arch=amd64 --mirror=http://de.archive.ubuntu.com/ubuntu -o --libvirt=qemu:///system --ip=192.168.122.2 --gw=192.168.122.1 --part=vmbuilder.partition --templates=mytemplates --user=administrator --name=Administrator --pass=howtoforge  --addpkg=unattended-upgrades --addpkg=acpid --firstboot=/var/lib/libvirt/images/vm2/boot.sh --mem=4096 --hostname=vm2
     
    Last edited: Aug 12, 2012

Share This Page