Link to home
Start Free TrialLog in
Avatar of mickt
micktFlag for Ireland

asked on

How can I make virt-install use an interface other than eth0?

I am creating VMs using virt-install.  I can do so on a VM but it is very slow so I'd like to do on another "real" server but it is unable to download the kickstart file because it uses eth0.  How can I make it use a different interface such as br100?


# virt-install -n mick-testVm --hvm -r 2048 --vcpus=1 --os-variant=rhel6 -v --disk path=/images/mick-testVm.img,size=20 -l http://10.10.12.254/CENTOS6.4-x86_64-ES -x "ks=http://10.10.12.254/client_files/openstack/image-templates/mick-testVm/mick-testVm.cfg text console=tty0 utf8 console=ttyS0,115200"

# ifconfig
br100     Link encap:Ethernet  HWaddr 00:22:64:9b:38:46
          inet addr:172.16.100.1  Bcast:172.16.100.255  Mask:255.255.255.0
          inet6 addr: fe80::5886:91ff:fed5:df3f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7811372 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1117332 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:22064958722 (22.0 GB)  TX bytes:75912638 (75.9 MB)

eth0      Link encap:Ethernet  HWaddr 00:22:64:9b:38:46
          inet6 addr: fe80::222:64ff:fe9b:3846/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15019041 errors:0 dropped:191 overruns:0 frame:0
          TX packets:1117675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22710274213 (22.7 GB)  TX bytes:80426511 (80.4 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:119356 errors:0 dropped:0 overruns:0 frame:0
          TX packets:119356 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:28950257 (28.9 MB)  TX bytes:28950257 (28.9 MB)

virbr0    Link encap:Ethernet  HWaddr 32:87:90:3a:36:d0
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.10.12.1      0.0.0.0         UG        0 0          0 br100
10.10.12.0      0.0.0.0         255.255.255.0   U         0 0          0 br100
172.16.100.0    0.0.0.0         255.255.255.0   U         0 0          0 br100
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr0
ASKER CERTIFIED SOLUTION
Avatar of Joseph Gan
Joseph Gan
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mickt

ASKER

I found and tried this earlier but it did not work.  Does it not configure the interface of the VM?  Need to force the host to use br100 to retrieve ks file.

Here is the issue and why it's failing.  I cannot route to ks server via eth0, only br100.

           ┌───────────────────────────────────────────────────────
           │                                                       │
           │ Waiting for NetworkManager to configure eth0.         │
           │                                                       │
           └───────────────────────────────────────────────────────

        ┌─────────────┤ Error downloading kickstart file ├─────────────┐
        │                                                              │
        │ Unable to download the kickstart file.  Please modify the    │
        │ kickstart parameter below or press Cancel to proceed as an   │
        │ interactive installation.                                    │
        │                                                              │
        │ files/openstack/image-templates/mick-testVm/mick-testVm.cfg_ │
        │                                                              │
        │            ┌────┐                      ┌────────┐            │
        │            │ OK │                      │ Cancel │            │
        │            └────┘                      └────────┘            │
        │                                                              │
        │                                                              │
        └──────────────────────────────────────────────────────────────┘
Avatar of mickt

ASKER

It worked using virbr0, which is set up when libvirt is installed.  I assumed it wouldn't as it has 192.168.122.1 address.  Anyway, good now so cheers.
Avatar of mickt

ASKER

had to use virbr0