Results 1 to 2 of 2

Thread: Static IP for a VM in Usermode Networking under QEMU/libvirt

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    18

    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

  2. #2
    Junior Member
    Join Date
    Oct 2011
    Posts
    18
    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
  •  


Cisco Meraki MS120-48LP 48 Port Blade Ethernet Switch UNCLAIMED picture

Cisco Meraki MS120-48LP 48 Port Blade Ethernet Switch UNCLAIMED

$799.00



NEW Cisco Meraki MR44 802.11ax Wi-fi 6 Wireless Access Point MR44-HW UNCLAIMED picture

NEW Cisco Meraki MR44 802.11ax Wi-fi 6 Wireless Access Point MR44-HW UNCLAIMED

$399.98



Cisco RV160 VPN Router 4 Gigabit Ethernet Ports RV160-K9-AR picture

Cisco RV160 VPN Router 4 Gigabit Ethernet Ports RV160-K9-AR

$80.00



Cisco IP Phone 6841 – CP-6841-3PW-NA-K9= picture

Cisco IP Phone 6841 – CP-6841-3PW-NA-K9=

$75.00



Cisco WS-C3850-48P-L 48-Port Gigabit 3850 PoE Switch w/ 715W+ C3850-NM-4-1G Mod picture

Cisco WS-C3850-48P-L 48-Port Gigabit 3850 PoE Switch w/ 715W+ C3850-NM-4-1G Mod

$83.00



Cisco QSFP-40G-SR-BD BiDi Short-reach Transceiver, 1 Year Warranty picture

Cisco QSFP-40G-SR-BD BiDi Short-reach Transceiver, 1 Year Warranty

$17.25



Cisco C3850-NM-2-10G 2 Port Network Exp.Module for 3850 picture

Cisco C3850-NM-2-10G 2 Port Network Exp.Module for 3850

$44.99



Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module 10-2415-03  picture

Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module 10-2415-03

$8.00



Cisco WS-C3850-48F-S Catalyst 3850 48x 1GB PoE+ RJ-45 1x Module Switch picture

Cisco WS-C3850-48F-S Catalyst 3850 48x 1GB PoE+ RJ-45 1x Module Switch

$185.00



Cisco C9300-48 48 Port Switch Dual PSU W/C9300-NM-8X P/N: C9300-48U-A Tested picture

Cisco C9300-48 48 Port Switch Dual PSU W/C9300-NM-8X P/N: C9300-48U-A Tested

$799.99