[libvirt-users] How to assign IP via virt-install

Devis Reagan Ponraj -ERS, HCL Tech devisreagan-p at hcl.com
Mon Sep 17 08:29:53 UTC 2018


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 at 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.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20180917/46ff4622/attachment.htm>


More information about the libvirt-users mailing list