Peter Crowther
2018-Sep-17 12:26 UTC
Re: [libvirt-users] How to assign IP via virt-install
You've not given libvirt anything to install; therefore, it has nothing it can tell about the IP address. Are you intending, for example, to add a mapping between MAC and IP address to a DHCP server for later use? - Peter On Mon, 17 Sep 2018 at 13:23, Devis Reagan Ponraj -ERS, HCL Tech < devisreagan-p@hcl.com> wrote:> Hi Team , > > I am new to virt-install , need your help pls . > > With below command I able to create a VM & I can see the mac address as > well . > > virt-install --virt-type=kvm --name newclicentos --ram 6144 --vcpus=2 > --import --network=bridge=br0,model=virtio --graphics vnc --disk > path=centos7.0.qcow2,size=60,bus=virtio,format=qcow2 --os-variant centos7.0 > --mac=00:00:00:00:01:01 > > > With below command I am trying to assign an IP address , however it > throws error . > I dont want to give --location as I already have the vm build in > centos7.0.qcow2 > Is there a was I can assign static IP to my VM ? > > [root@localhost tmp]# virt-install --virt-type=kvm --name newclicentos > --ram 6144 --vcpus=2 --import --network=bridge=br0,model=virtio > --extra-args "ip=10.254.173.99::10.254.172.1::255.255.254.0::newclicentos:eth0:none" > --mac=00:00:00:00:01:01 --graphics vnc --disk > path=centos7.0.qcow2,size=60,bus=virtio,format=qcow2 > ERROR --extra-args only work if specified with --location. > > > Let me know if you need any info from me > > Thanks, > Devis Reagan > > > > > Regards, > > Devis Reagan > > *HCL Technologies Ltd.* > > *www.hcl.com <http://www.hcl.com/>* > ::DISCLAIMER:: > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. E-mail transmission is not > guaranteed to be secure or error-free as information could be intercepted, > corrupted, lost, destroyed, arrive late or incomplete, or may contain > viruses in transmission. The e mail and its contents (with or without > referred errors) shall therefore not attach any liability on the originator > or HCL or its affiliates. Views or opinions, if any, presented in this > email are solely those of the author and may not necessarily reflect the > views or opinions of HCL or its affiliates. Any form of reproduction, > dissemination, copying, disclosure, modification, distribution and / or > publication of this message without the prior written consent of authorized > representative of HCL is strictly prohibited. If you have received this > email in error please delete it and notify the sender immediately. Before > opening any email and/or attachments, please check them for viruses and > other defects. > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users