-
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
![Fortinet FortiGate 60F | 10 Gbps Firewall Network Security EXPIRED (FG-60F)- New picture](/store/img/g/raUAAOSwJYhjzwg-/s-l225/Fortinet-FortiGate-60F-10-Gbps-Firewall-Network-Se.jpg)
Fortinet FortiGate 60F | 10 Gbps Firewall Network Security EXPIRED (FG-60F)- New
$226.79
![Fortinet Fortigate FG-61E Firewall Network Security Appliance ATP Bundle 1 years picture](/store/img/g/nH4AAOSwvpJlnbt9/s-l225/Fortinet-Fortigate-FG-61E-Firewall-Network-Securit.jpg)
Fortinet Fortigate FG-61E Firewall Network Security Appliance ATP Bundle 1 years
$263.99
![Palo Alto PA-220 Next Generation Firewall Appliance w/ Power Adapter and Cord picture](/store/img/g/n8AAAOSwlM5ma1bc/s-l225/Palo-Alto-PA-220-Next-Generation-Firewall-Applianc.jpg)
Palo Alto PA-220 Next Generation Firewall Appliance w/ Power Adapter and Cord
$62.99
![Cisco Meraki Z3 VPN Firewall - Black picture](/store/img/g/7HcAAOSwrA1mctRx/s-l225/Cisco-Meraki-Z3-VPN-Firewall-Black.jpg)
Cisco Meraki Z3 VPN Firewall - Black
$15.00
![Cisco ASA 5506-x Firewall Security Appliance ASA5506 V06 With Power Adapter picture](/store/img/g/NoMAAOSw5XFmTQry/s-l225/Cisco-ASA-5506-x-Firewall-Security-Appliance-ASA55.jpg)
Cisco ASA 5506-x Firewall Security Appliance ASA5506 V06 With Power Adapter
$39.00
![Cisco Meraki MX84 Cloud Managed Security Firewall Appliance UNCLAIMED MX84-HW picture](/store/img/g/KSUAAOSw~-hmULkX/s-l225/Cisco-Meraki-MX84-Cloud-Managed-Security-Firewall-.jpg)
Cisco Meraki MX84 Cloud Managed Security Firewall Appliance UNCLAIMED MX84-HW
$39.99
![Cisco ASA5506-K9 ASA 5506-X Network Security Firewall picture](/store/img/g/N60AAOSwDr1mYvWj/s-l225/Cisco-ASA5506-K9-ASA-5506-X-Network-Security-Firew.jpg)
Cisco ASA5506-K9 ASA 5506-X Network Security Firewall
$40.00
![Palo Alto Networks PA-220 Firewall 750-000128-00C picture](/store/img/g/dFAAAOSwy4tmcbBF/s-l225/Palo-Alto-Networks-PA-220-Firewall-750-000128-00C.jpg)
Palo Alto Networks PA-220 Firewall 750-000128-00C
$40.00
![1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports picture](/store/img/g/fxsAAOSwZD5l6PSG/s-l225/1U-BareMetal-pfsense-opnsense-Router-Firewall-DNS-.jpg)
1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports
$149.00
![SonicWALL TZ300 Network Security Appl FirewallRouter5pt 01-SSC-0215TransferReady picture](/store/img/g/E70AAOSw~X5mDKN-/s-l225/SonicWALL-TZ300-Network-Security-Appl-FirewallRout.jpg)
SonicWALL TZ300 Network Security Appl FirewallRouter5pt 01-SSC-0215TransferReady
$45.00