Re: [CentOS-virt] MS-Win7 kvm guest gets dhcp from host bridge

2014-06-23 Thread James B. Byrne

On Mon, June 23, 2014 00:29, Arun Khan wrote:
 On Thu, Feb 20, 2014 at 3:36 AM, Dusty Mabe dustym...@gmail.com wrote:

 On 02/19/2014 04:01 PM, James B. Byrne wrote:

The root cause of the original problem was a change in the behaviour of
libvirt (and the GUI of virt-manager) when creating new vms.  The host system
was already bridged and had other vms previously created and attached to the
bridge without exhibiting this behaviour.  I infer that at some point an
update to libvirt altered the default configuration to always prefer NAT. A
change that I failed to notice and was not conscious of given I had previous
created vms without encountering this problem.  Changing the configuration of
the affected vms nic Source Device to 'Specify shared device name' and then
specifying the Bridge Name fixed the problem.

I have already commented elsewhere on the needlessly obtuse wording used for
the Source Device when bridging is required.  Why it does not say 'Specify
bridge name' or 'Use named bridge' instead has not been plausibly explained by
the maintainers.  It is particularly vexatious given that when one selects
'Specify shared device name' the GUI immediately alters to display a text box
labelled 'Bridge name:'  Duhhh.


-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte  Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] MS-Win7 kvm guest gets dhcp from host bridge

2014-06-22 Thread Arun Khan
On Thu, Feb 20, 2014 at 3:36 AM, Dusty Mabe dustym...@gmail.com wrote:

 On 02/19/2014 04:01 PM, James B. Byrne wrote:
 I realize that there is a DHCP service running on virbr0 for the purpose of
 provisioning guests with system control traffic but I do not know how to 
 limit
 that to its intended purpose and allow another DHCP server to provide the IP
 address to the windows guests.  I hope that problem description is not too
 confusing.

 Can anyone provide me with some guidance on the matter?  Are kvm guests
 required to have either static ip addresses or dhcp addresses provided by the
 host system?

 It sounds like what you need to do is create a bridge and then connect
 your virtual machine to the bridge so that it can receive DHCP from the
 external network.  I assume you are using libvirt. If so, check out the
 page below. It may help you get started in the right direction.

 http://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29

+1 to Dusty's solution.

@OP please post the output of 'brctl show'  see below for example.

$ /usr/sbin/brctl show
bridge name bridge id   STP enabled interfaces
br0 8000.002590d3f56e   no eth0

   vnet0

In the VM definition, you need to define the VM's NIC bonding to the
bridge interface (in my case VM's NIC is vnet0 and it is bridged to
br0 which interfaces to the LAN via eth0).

Also, when you define the bridge, the host IP is assigned to the
bridge device (br0) and not to the physical device eth0.

HTH,
-- Arun Khan
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


[CentOS-virt] MS-Win7 kvm guest gets dhcp from host bridge

2014-02-19 Thread James B. Byrne
CentOS-6.5
i86_64
qemu-kvm-0.12.1.2-2.415.el6_5.4
MS-Windows v7proSP1

We have installed a MicroSoft Win7 system as a guest and have joined it to our
MS AD domain. The system runs and has internet access.  However, the IPv4
address it obtains and the gateway it is assigned are both sourced from the
virtual machine host system and not from our AD DC DHCP server.

To clarify, the virbr0 IP address is 192.168.122.1 and the Windows guest has
that address as its gateway and an IP address in the 192.168.122.0/24
netblock.  This is not as we desire as the internal addresses we regularly
assign to MS workstations via DHCP are supposed to belong to a different
netblock entirely.  This permit filtering on incoming and outgoing traffic at
the gateway.

I realize that there is a DHCP service running on virbr0 for the purpose of
provisioning guests with system control traffic but I do not know how to limit
that to its intended purpose and allow another DHCP server to provide the IP
address to the windows guests.  I hope that problem description is not too
confusing.

Can anyone provide me with some guidance on the matter?  Are kvm guests
required to have either static ip addresses or dhcp addresses provided by the
host system?

Thanks in advance.

-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte  Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3

___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] MS-Win7 kvm guest gets dhcp from host bridge

2014-02-19 Thread Ashish Yadav
On Thu, Feb 20, 2014 at 3:36 AM, Dusty Mabe dustym...@gmail.com wrote:


 On 02/19/2014 04:01 PM, James B. Byrne wrote:
  CentOS-6.5
  i86_64
  qemu-kvm-0.12.1.2-2.415.el6_5.4
  MS-Windows v7proSP1
 
  We have installed a MicroSoft Win7 system as a guest and have joined it
 to our
  MS AD domain. The system runs and has internet access.  However, the IPv4
  address it obtains and the gateway it is assigned are both sourced from
 the
  virtual machine host system and not from our AD DC DHCP server.
 
  To clarify, the virbr0 IP address is 192.168.122.1 and the Windows guest
 has
  that address as its gateway and an IP address in the 192.168.122.0/24
  netblock.  This is not as we desire as the internal addresses we
 regularly
  assign to MS workstations via DHCP are supposed to belong to a different
  netblock entirely.  This permit filtering on incoming and outgoing
 traffic at
  the gateway.
 


1. If I understand you correctly then you want to assign MS-Windows a IP
which should not be from
192.168.122.0/24?

2. If that is yes then you have to configure your DHCP server so that
machine which
is a guest machine should get IP based on their MAC address. In VirtualBox
MAC address is in this range
08:00:27:XX:XX:XX:XX, first three value will be constant for all guests.



  I realize that there is a DHCP service running on virbr0 for the purpose
 of
  provisioning guests with system control traffic but I do not know how to
 limit
  that to its intended purpose and allow another DHCP server to provide
 the IP
  address to the windows guests.  I hope that problem description is not
 too
  confusing.
 
  Can anyone provide me with some guidance on the matter?  Are kvm guests
  required to have either static ip addresses or dhcp addresses provided
 by the
  host system?

 It sounds like what you need to do is create a bridge and then connect
 your virtual machine to the bridge so that it can receive DHCP from the
 external network.  I assume you are using libvirt. If so, check out the
 page below. It may help you get started in the right direction.


 http://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29

 Dusty
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt




-- 
Regards
Ashishkumar S. Yadav
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt