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

Posted on 2014-08-26
Last Modified: 2014-08-27
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 -x "ks= text console=tty0 utf8 console=ttyS0,115200"

# ifconfig
br100     Link encap:Ethernet  HWaddr 00:22:64:9b:38:46
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::5886:91ff:fed5:df3f/64 Scope:Link
          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
          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:  Mask:
          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:  Bcast:  Mask:
          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         UG        0 0          0 br100   U         0 0          0 br100   U         0 0          0 br100   U         0 0          0 virbr0
Question by:mickt
    LVL 16

    Accepted Solution


    Author Comment

    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 │            │
            │            └────┘                      └────────┘            │
            │                                                              │
            │                                                              │

    Author Comment

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

    Author Closing Comment

    had to use virbr0

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    When upgrading from 5.5(in this case) to 6.0 and if you have an invalid vfat system(most of the times a coredump partition) upgrade will fail.
    VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now