-
Static IP for a VM in Usermode Networking under QEMU/libvirt
I have a Windows XP VM running in the virtual network hosted in a system based on KNOPPIX-6.7.1 DVD, and would like to assign a static IP to the VM instead of one from DHCP. The virtual network is NAT forwarding installed 'out-of-box' in libvirt/qemu. According to the documentation at wiki.libvirt.org/page/Networking and libvirt.org/formatnetwork.html, this could be achieved by adding a <host> element inside the <dhcp> element of the network xml used by the VM, which is the virtual network named 'default' in my case. Using 'virsh net-edit' I seem to be able to add the <host> element
<host mac='{mac obtained from the guest xml, in /etc/libvirt/qemu/win-xp.xml}' name='xp-ip99.mycompany.local' ip='192.168.122.1' />
but the change doesn't seem to "stick" - when I queried the virtual network after the edit the host element never showed up. I am wondering if this might be due to the (mis-)configuration of my VM and the virtual network (what to look for, and how they should they be?), or perhaps the <host> element should be added in a different way? -- any help and pointers would be appreciated.
Systems info:
KNOPPIX_V6.7.1DVD - boot: knoppix64 fromhd=/dev/sda1
dpkg's installed: ibvirt0_0.8.3-5+squeeze2_i386.deb
libxenstore3.0_4.0.1-2_i386.deb
libvirt-bin_0.8.3-5+squeez2_i386.deb
python-libvirt_0.8.3-5+squeeze2_i386.deb
python-urlgrabber_3.9.1-4_all.deb
python-gtk-vnc_0.4.1-4_i386.deb
virtinst_0.500.3-2_all.deb
virt-manager_0.8.4-8_all.deb
'virt-manager' is used to manage the VM.
Thank you in advance.
Boryeu Mao
-
Instead of solutions for a static IP, my network need for the Win XP VM under KVM is satisfied by an alternative (and ultimately better) alternative of a public bridged network. This was aided by the more up-to-date information on bridged KVM network contained in the following articles (for two different but KVM-compatible installations):
http://www.sgenomics.org/~jtang/blog...entific_Linux/
http://wiki.centos.org/HowTos/KVM
Under the bridged network, the VM is given a DHCP address but is accessible by its machine name.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![Seagate Exos X22 ST22000NM001E 22TB 512E SATA 6Gb/s 3.5](/store/img/g/LfgAAOSw9~1l-F1x/s-l225/Seagate-Exos-X22-ST22000NM001E-22TB-512E-SATA-6Gb-.jpg)
Seagate Exos X22 ST22000NM001E 22TB 512E SATA 6Gb/s 3.5" Enterprise Hard Drive
$311.99
![881507-001 HPE 2.4TB SAS 12G 10K SC 512E DS G8-G10 Hard Drive 881457-B21 F/S picture](/store/img/g/ghkAAOSwlaFlOC86/s-l225/881507-001-HPE-2-4TB-SAS-12G-10K-SC-512E-DS-G8-G10.jpg)
881507-001 HPE 2.4TB SAS 12G 10K SC 512E DS G8-G10 Hard Drive 881457-B21 F/S
$274.95
![HITACHI HUS724040ALA640 4TB 7200RPM 64MB SATA 6.0Gb/s 3.5](/store/img/g/TIMAAOSw969gDuvf/s-l225/HITACHI-HUS724040ALA640-4TB-7200RPM-64MB-SATA-6-0G.jpg)
HITACHI HUS724040ALA640 4TB 7200RPM 64MB SATA 6.0Gb/s 3.5" HARD DRIVE ZERO HOURS
$52.00
![HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5](/store/img/g/buwAAOSwDghlwalj/s-l225/HGST-Ultrastar-DC-HC520-12TB-SATA-6Gb-256MB-3-5-En.jpg)
HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5" Enterprise HDD- HUH721212ALE601
$82.99
![HGST Ultrastar HE10 10TB SATA 6.0Gb/s 7200 3.5](/store/img/g/2NYAAOSwj9hkeS1e/s-l225/HGST-Ultrastar-HE10-10TB-SATA-6-0Gb-s-7200-3-5-Dat.jpg)
HGST Ultrastar HE10 10TB SATA 6.0Gb/s 7200 3.5" Datacenter HDD - HUH721010ALE601
$79.99
![Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5](/store/img/g/ZyMAAOSw4ullEigP/s-l225/Seagate-ST12000NM0127-12TB-256MB-7200RPM-3-5-SATA-.jpg)
Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$87.99
![WD Ultrastar DC HC530 14TB SATA 6G 3.5](/store/img/g/gggAAOSwwB5mL~fg/s-l225/WD-Ultrastar-DC-HC530-14TB-SATA-6G-3-5-7200RPM-Ent.jpg)
WD Ultrastar DC HC530 14TB SATA 6G 3.5" 7200RPM Enterprise HDD - WUH721414ALE604
$110.00
![HGST HDD HUH721010AL5200 10TB 3.5](/store/img/g/2CkAAOSw4NBmIZ6g/s-l225/HGST-HDD-HUH721010AL5200-10TB-3-5-SAS-12Gb-s-Serve.jpg)
HGST HDD HUH721010AL5200 10TB 3.5" SAS 12Gb/s Server Hard Disk Drive *READ
$50.89
![HUH721010AL4200/42C0 HGST Ultrastar He10 10TB 7200RPM SAS 12Gbps 256MB 2017 picture](/store/img/g/7LcAAOSwmOhl6rSM/s-l225/HUH721010AL4200-42C0-HGST-Ultrastar-He10-10TB-7200.jpg)
HUH721010AL4200/42C0 HGST Ultrastar He10 10TB 7200RPM SAS 12Gbps 256MB 2017
$69.99
![WD 5TB Certified Refurbished Elements, External Hard Drive - RWDBU6Y0050BBK-WESN picture](/store/img/g/Z6wAAOSwGGllvNab/s-l225/WD-5TB-Certified-Refurbished-Elements-External-Har.jpg)
WD 5TB Certified Refurbished Elements, External Hard Drive - RWDBU6Y0050BBK-WESN
$89.99