-
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
![Grandstream GS-HT802 2 Port Analog Telephone Adapter VoIP Phone & Device, Black picture](/store/img/g/cEQAAOSwKIlgze4p/s-l225/Grandstream-GS-HT802-2-Port-Analog-Telephone-Adapt.jpg)
Grandstream GS-HT802 2 Port Analog Telephone Adapter VoIP Phone & Device, Black
$32.00
![Polycom VVX 411 IP VOIP POE Gigabit Telephone [L/N] BUSINESS OFFICE RECEPTION picture](/store/img/g/PZoAAOSwM3xmZJQs/s-l225/Polycom-VVX-411-IP-VOIP-POE-Gigabit-Telephone-L-N-.jpg)
Polycom VVX 411 IP VOIP POE Gigabit Telephone [L/N] BUSINESS OFFICE RECEPTION
$24.00
![Grandstream GXP1620 Small to Medium Business HD IP Phone VoIP Phone and Device picture](/store/img/g/abcAAOSwRdNmXhjA/s-l225/Grandstream-GXP1620-Small-to-Medium-Business-HD-IP.jpg)
Grandstream GXP1620 Small to Medium Business HD IP Phone VoIP Phone and Device
$21.68
![Cisco CP-7965G IP VOIP POE Gigabit Telephone [L/N] BUSINESS OFFICE RECEPTION picture](/store/img/g/s4QAAOSw8YJmd5rr/s-l225/Cisco-CP-7965G-IP-VOIP-POE-Gigabit-Telephone-L-N-B.jpg)
Cisco CP-7965G IP VOIP POE Gigabit Telephone [L/N] BUSINESS OFFICE RECEPTION
$19.99
![Cisco CP-7945G VOIP Phone With Stand & Handset Business IP Phone 7945 picture](/store/img/g/NjUAAOSwEmNmEw4x/s-l225/Cisco-CP-7945G-VOIP-Phone-With-Stand-Handset-Busin.jpg)
Cisco CP-7945G VOIP Phone With Stand & Handset Business IP Phone 7945
$3.00
![Polycom VVX 501 VoIP IP Phone & Stand Blem Warranty VVX501 2201-48500-001 picture](/store/img/g/2nEAAOSw5fxmcyXh/s-l225/Polycom-VVX-501-VoIP-IP-Phone-Stand-Blem-Warranty-.jpg)
Polycom VVX 501 VoIP IP Phone & Stand Blem Warranty VVX501 2201-48500-001
$14.98
![Cisco CP-8845-K9 5 Line IP Video Phone - Charcoal picture](/store/img/g/bNQAAOSwf61mDt9i/s-l225/Cisco-CP-8845-K9-5-Line-IP-Video-Phone-Charcoal.jpg)
Cisco CP-8845-K9 5 Line IP Video Phone - Charcoal
$25.00
![Obihai OBI202 2-Port VoIP Phone Adapter - picture](/store/img/g/UckAAOSwEftmajOq/s-l225/Obihai-OBI202-2-Port-VoIP-Phone-Adapter-.jpg)
Obihai OBI202 2-Port VoIP Phone Adapter -
$44.99
![Cisco CP-7965G 7900 Series VOIP IP Phone ZOOM MEETING SIP SKYPE RECEIPTION IVR picture](/store/img/g/GFsAAOSwSttmcmGQ/s-l225/Cisco-CP-7965G-7900-Series-VOIP-IP-Phone-ZOOM-MEET.jpg)
Cisco CP-7965G 7900 Series VOIP IP Phone ZOOM MEETING SIP SKYPE RECEIPTION IVR
$20.00
![Polycom VVX 250 Business IP Phone with 2.8 in. Color Display & Ethernet, Black picture](/store/img/g/AWgAAOSwFuZmTXtC/s-l225/Polycom-VVX-250-Business-IP-Phone-with-2-8-in-Colo.jpg)
Polycom VVX 250 Business IP Phone with 2.8 in. Color Display & Ethernet, Black
$32.89