-
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
![IBM System X3250 M3 Server 8GB RAM Intel Xeon x3440 2.53ghz (NO HDD) picture](/store/img/g/M~sAAOSwFVlkVr-r/s-l225/IBM-System-X3250-M3-Server-8GB-RAM-Intel-Xeon-x344.jpg)
IBM System X3250 M3 Server 8GB RAM Intel Xeon x3440 2.53ghz (NO HDD)
$41.99
![IBM Server Rack Cabinet 9308-RC4 picture](/store/img/g/tSIAAOSwSUpmAe1K/s-l225/IBM-Server-Rack-Cabinet-9308-RC4.jpg)
IBM Server Rack Cabinet 9308-RC4
$209.00
![IBM System p5 9131-52A 3.5](/store/img/g/iZ4AAOSwcBxmYJo7/s-l225/IBM-System-p5-9131-52A-3-5-4-Bay-Server-80P6787-1-.jpg)
IBM System p5 9131-52A 3.5" 4-Bay Server 80P6787 1 CPU 2GB 6 HD CADDIES TAPE BU
$250.00
![IBM Power S822 8284-22A 12SFF Power8 3.89GHz 6Core 64GB RAM No HDD Server System picture](/store/img/g/xiEAAOSwwGtmRmN6/s-l225/IBM-Power-S822-8284-22A-12SFF-Power8-3-89GHz-6Core.jpg)
IBM Power S822 8284-22A 12SFF Power8 3.89GHz 6Core 64GB RAM No HDD Server System
$359.99
![IBM Power S822 8284-22A 12SFF Power8 3.89GHz 6-Core 64GB RAM No Bezel/HDD Server picture](/store/img/g/5xQAAOSwMXNmRmOG/s-l225/IBM-Power-S822-8284-22A-12SFF-Power8-3-89GHz-6-Cor.jpg)
IBM Power S822 8284-22A 12SFF Power8 3.89GHz 6-Core 64GB RAM No Bezel/HDD Server
$279.99
![IBM Model M Clicky Vintage Server Mechanical Keyboard 1989 *Tested* picture](/store/img/g/DiMAAOSw8Chmguhc/s-l225/IBM-Model-M-Clicky-Vintage-Server-Mechanical-Keybo.jpg)
IBM Model M Clicky Vintage Server Mechanical Keyboard 1989 *Tested*
$149.98
![IBM SYSTEM x3200 M3 Tower- Intel i3 540 @ 3.07GHz, 4GB, 500GB HHD picture](/store/img/g/TDIAAOSwEsNlaJMN/s-l225/IBM-SYSTEM-x3200-M3-Tower-Intel-i3-540-3-07GHz-4GB.jpg)
IBM SYSTEM x3200 M3 Tower- Intel i3 540 @ 3.07GHz, 4GB, 500GB HHD
$125.00
![IBM x3650 M4 Server Intel Xeon E5-2640 (x2) 144GB RAM No HDDs (#4XN7N) picture](/store/img/g/~~AAAOSwFFZmeyKv/s-l225/IBM-x3650-M4-Server-Intel-Xeon-E5-2640-x2-144GB-RA.jpg)
IBM x3650 M4 Server Intel Xeon E5-2640 (x2) 144GB RAM No HDDs (#4XN7N)
$169.99
![IBM QRadar xx29 Server 4412Q2A picture](/store/img/g/7GAAAOSwmK1lqTUO/s-l225/IBM-QRadar-xx29-Server-4412Q2A.jpg)
IBM QRadar xx29 Server 4412Q2A
$209.99
![IBM Netezza 3567 picture](/store/img/g/-uEAAOSw4ixmWekl/s-l225/IBM-Netezza-3567.jpg)
IBM Netezza 3567
$5000.00