Re: How to force em1 during virt-install?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/05/2017 05:34 PM, William D. Colburn wrote:
> I want to use virt-install on a raw hard disk to kickstart a machine.
> It all works fine, but the intitial install has an eth0, and when I move
> the disk to physical hardware the ethernet is em1 instead.  Admittedly,
> I already have to delete the HWADDR line out of the ifcg-em1, so I could
> just rename the file too, but it would be nice if I could install with
> the right ethernet name from the start.
> 
> I'm on RHEL6.9, libvirt-0.10.2-62.el6.x86_64.  My install command is:
> 
> virt-install \
>   --network bridge:br0,mac=${MACADDR} \
>   --name ${HOSTNAME} \
>   --ram=${RAM} \
>   --vcpus=${CPUS} \
>   --graphics vnc \
>   --disk path=/dev/sdh,driver_type=raw \
>   --location=/home/os/redhat/isos/rhel6/rhel6.9/rhel-workstation-6.9-x86_64-boot.iso \
>   --extra-args="ks text"
> 
> I can't find anything I can do to set the ethernet device seen inside
> the VM.
> 

The em1 naming is set by biosdevname software inside the VM. I think it
determines the name based on some smbios data, so there might be a way to
inject that info into the VM, but another option is to disable biosdevname at
install time so the physical machine sticks with eth0. Google 'biosdevname'
and you'll find steps for disabling it

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux