-
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
![RARE 1984 Macintosh 128K MacTilt TILT SWIVEL Stand Mac 512K Plus Metal Very NICE picture](/store/img/g/SE0AAOSwrqZmdhBf/s-l225/RARE-1984-Macintosh-128K-MacTilt-TILT-SWIVEL-Stand.jpg)
RARE 1984 Macintosh 128K MacTilt TILT SWIVEL Stand Mac 512K Plus Metal Very NICE
$119.99
![Macintosh Platinum Mouse - Apple 128K 512K 512Ke Mac Plus Lisa IIe M0100 - NEW picture](/store/img/g/~R8AAOSw5opkqjoc/s-l225/Macintosh-Platinum-Mouse-Apple-128K-512K-512Ke-Mac.jpg)
Macintosh Platinum Mouse - Apple 128K 512K 512Ke Mac Plus Lisa IIe M0100 - NEW
$44.99
![Apple IIe 128K Computer Only A2S2064 SOLD AS IS picture](/store/img/g/1uAAAOSwu7NmaxFX/s-l225/Apple-IIe-128K-Computer-Only-A2S2064-SOLD-AS-IS.jpg)
Apple IIe 128K Computer Only A2S2064 SOLD AS IS
$99.99
![Apple Macintosh 128k 512k Plus Analog Board Capacitor Re-Cap Kit - US Shipping picture](/store/img/g/8mwAAOSw2I1mIvLI/s-l225/Apple-Macintosh-128k-512k-Plus-Analog-Board-Capaci.jpg)
Apple Macintosh 128k 512k Plus Analog Board Capacitor Re-Cap Kit - US Shipping
$23.95
![Macintosh Platinum Mouse - Apple II, IIe, 128K 512K 512Ke Mac Plus M0100 - New picture](/store/img/g/DLsAAOSwQdRmBbYc/s-l225/Macintosh-Platinum-Mouse-Apple-II-IIe-128K-512K-51.jpg)
Macintosh Platinum Mouse - Apple II, IIe, 128K 512K 512Ke Mac Plus M0100 - New
$37.75
![Vintage Apple Macintosh Classic 128K Application On New 400K Double Density Disk picture](/store/img/g/GVIAAOSwrPpl~3Sd/s-l225/Vintage-Apple-Macintosh-Classic-128K-Application-O.jpg)
Vintage Apple Macintosh Classic 128K Application On New 400K Double Density Disk
$26.99
![Apple Keyboard and Cable for Macintosh 128k 512k Mac Plus RARE Vintage M0110 picture](/store/img/g/aLwAAOSwohZmG3Eo/s-l225/Apple-Keyboard-and-Cable-for-Macintosh-128k-512k-M.jpg)
Apple Keyboard and Cable for Macintosh 128k 512k Mac Plus RARE Vintage M0110
$179.99
![1984 APPLE MACINTOSH Model M0001 1st MAC 128K 40th Anniversary PICASSO KIT NICE picture](/store/img/g/9FYAAOSwen9mCtep/s-l225/1984-APPLE-MACINTOSH-Model-M0001-1st-MAC-128K-40th.jpg)
1984 APPLE MACINTOSH Model M0001 1st MAC 128K 40th Anniversary PICASSO KIT NICE
$4999.99
![Apple Macintosh 128K M0001 Computer with Mouse, no keyboard. Case included. 1984 picture](/store/img/g/PKUAAOSwQ2Vk0TIr/s-l225/Apple-Macintosh-128K-M0001-Computer-with-Mouse-no-.jpg)
Apple Macintosh 128K M0001 Computer with Mouse, no keyboard. Case included. 1984
$510.86
![Apple Macintosh M0001 Computer 1984 picture](/store/img/g/MvoAAOSw1ZZkmI~A/s-l225/Apple-Macintosh-M0001-Computer-1984.jpg)
Apple Macintosh M0001 Computer 1984
$1036.00