-
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
Genuine 45W Power Adapter Charger for Dell DA45NM140 0KXTTW 4.5*3.0mm OEM
$16.99
OEM 130W USB-C Type-C Charger for Dell XPS 15 9500 9570 9575 17 9700 DA130PM170
$35.88
NEW OEM Dell Inspiron 14 5406 P126G Laptop Battery 11.25V 40Wh JK6Y6 CF5RH
$37.00
New OEM Dell Latitude 13 3379 7350 L221x 65W Adapter AC Charger W/ Power Cord
$30.60
OEM Dell Inspiron 11 13 14 15 17 3000 5000 7000 AC Adapter Charger 65W 4.5mm Tip
$10.99
Dell Original OEM 45W 19.5V AC Adapter Charger 070VTC 0KXTTW 00285K 0YTFJC 4.5mm
$10.94
OEM DELL 65W AC Adapter Charger 7.4mm Latitude 7490 7480 E7440 E7450 E7470 E7270
$11.88
OEM Dell Latitude Laptop 65W AC Adapter Power Charger E7470 E7440 E7270 E6430
$8.99
New OEM 90W AC Adapter Charger For Dell RT74M 0RT74M 0VRJN1 VRJN1 LA90PM111
$20.55
Genuine OEM 42wh YRDD6 Battery For Dell Inspiron 3493 3582 3583 3584 7586 3793
$32.89