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:
    <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'/>
    ifconfig returns:
    /etc/network/interfaces is configured as shown:
    auto lo
    iface lo inet loopback
    auto eth2
    iface eth2 inet static
    Lastly, ifup doesn't seem to find vnet0, although ifconfig lists it.

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

Share This Page