[libvirt-users] libvirt and Bridging
by Face
Hello all,
Basically my problem is how can i access a virtual machine from local
network. I am able to do so from the host PC put not from other PC's
on the same network.
here is my what i did so far
(http://wiki.libvirt.org/page/Networking#NAT_forwarding_.28aka_.22virtual_...)
cat '/etc/libvirt/qemu/networks/default.xml'
<network>
<name>default</name>
<uuid>1bad08f7-0bc3-bfde-f87d-f323ab1c95eb</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0' />
<ip address='10.0.2.1' netmask='255.255.255.240'>
<dhcp>
<range start='10.0.2.2' end='10.0.2.14' />
</dhcp>
</ip>
</network>
cat '/etc/sysctl.conf'
# Disable packet forwarding
#net.ipv4.ip_forward=0
net.ipv4.ip_forward=1
# disable netfilter on the bridge:
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
ifconfig -a
br0 Link encap:Ethernet HWaddr 00:1C:C0:38:AF:BA
inet addr:10.0.1.5 Bcast:10.0.1.15 Mask:255.255.255.240
inet6 addr: fe80::21c:c0ff:fe38:afba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:580 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:29435 (28.7 Kb) TX bytes:468 (468.0 b)
eth0 Link encap:Ethernet HWaddr 00:C0:DF:13:AF:87
inet addr:10.0.1.4 Bcast:10.0.1.15 Mask:255.255.255.240
inet6 addr: fe80::2c0:dfff:fe13:af87/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:476362 errors:0 dropped:0 overruns:0 frame:0
TX packets:684752 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:57147388 (54.4 Mb) TX bytes:707797829 (675.0 Mb)
Interrupt:22 Base address:0x800
eth1 Link encap:Ethernet HWaddr 00:1C:C0:38:AF:BA
inet6 addr: fe80::21c:c0ff:fe38:afba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1142 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:90530 (88.4 Kb) TX bytes:2632 (2.5 Kb)
Memory:e3200000-e3220000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:118356 errors:0 dropped:0 overruns:0 frame:0
TX packets:118356 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14239239 (13.5 Mb) TX bytes:14239239 (13.5 Mb)
virbr0 Link encap:Ethernet HWaddr FE:54:00:45:A7:31
inet addr:10.0.2.1 Bcast:10.0.2.15 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:180 errors:0 dropped:0 overruns:0 frame:0
TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16657 (16.2 Kb) TX bytes:50599 (49.4 Kb)
vnet0 Link encap:Ethernet HWaddr FE:54:00:45:A7:31
inet6 addr: fe80::fc54:ff:fe45:a731/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:357 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1404 (1.3 Kb) TX bytes:19248 (18.7 Kb)
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.001cc038afba no eth1
virbr0 8000.fe540045a731 yes vnet0
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.1.0 0.0.0.0 255.255.255.240 U 0 0 0 eth0
10.0.1.0 0.0.0.0 255.255.255.240 U 0 0 0 br0
10.0.2.0 0.0.0.0 255.255.255.240 U 0 0 0 virbr0
0.0.0.0 10.0.1.1 0.0.0.0 UG 0 0 0 eth0
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere 10.0.2.0/28 state
RELATED,ESTABLISHED
ACCEPT all -- 10.0.2.0/28 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere
reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere
reject-with icmp-port-unreachable
ACCEPT all -- anywhere anywhere PHYSDEV
match --physdev-is-bridged
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere 10.0.2.5 tcp dpt:smakynet
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere 10.0.2.5 tcp dpt:smakynet
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere 10.0.2.5 tcp dpt:smakynet
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
the IP Address for the virtual machine i am trying to access is
10.0.2.5 (vnet0). I am able only to access it from the host PC only,
therefore, how i can i access it from other PC's on the network ?
Any help would be much appreciated.
--
Sincerely,
14 years, 2 months
[libvirt-users] how to load different bios into qemu
by Martin Kraus
Hello. I'm using debian squeeze with libvirt and kvm and I need to load a
newer version of seabios into qemu. I'd like to do it without overwriting
seabios in the debian package because that might be overwritten on the next
update. I hopend that the <loader> directive in the config would work but it
doesn't.
thanks for any ideas.
mk
14 years, 2 months
[libvirt-users] building libvirt-0.8.3 for windows ( with dlls )
by Gal Gafni
Hi,
I'm trying to compile the latest libvirt (0.8.3 ) on windows and the
configure fails to find XDR lib.
I installed the xdr-4.0-mingw2 and configure complains the XDR library
doesn't exist.
Should I get another XDR lib?
The command I run:
$ ./configure --with-esx --without-sasl --without-avahi
--without-polkit
--without-python --without-xen --without-qemu --without-lxc
--without-o
penvz --without-libvirtd
the last 10 lines of configure:
checking for mntent.h... no
checking net/ethernet.h usability... no
checking net/ethernet.h presence... no
checking for net/ethernet.h... no
checking linux/magic.h usability... no
checking linux/magic.h presence... no
checking for linux/magic.h... no
checking for xdrmem_create in -lportablexdr... no
checking for library containing xdrmem_create... no
configure: error: Cannot find a XDR library
is there a a guide somewhere in the list for compiling the windows
version on mingw?
Thanks,
Gal Gafni Chen
CSL-WAVE Developer
14 years, 2 months
[libvirt-users] F13-x86_64 - New version of qemu in raw virt repo breaks virsh and virt-manager?
by Mike Hinz
Without actually thoroughly thinking about it, I updated my system
yesterday with the latest qemu-kvm. rpm -qa shows
qemu-kvm-0.13.0-0.5.20100809git25fdf4a.fc13.x86_64
See also:
virsh # version
Compiled against library: libvir 0.8.2
Using library: libvir 0.8.2
Using API: QEMU 0.8.2
Running hypervisor: QEMU 0.13.50
Now when I attempt to start a domain that was working perfectly well
prior to this update, I get the following:
virsh # start winxp1
error: Failed to start domain winxp1
error: internal error Process exited while reading console log output:
Supported machines are:
pc Standard PC (alias of pc-0.13)
pc-0.13 Standard PC (default)
pc-0.12 Standard PC
pc-0.11 Standard PC, qemu 0.11
pc-0.10 Standard PC, qemu 0.10
isapc ISA-only PC
Virt-Manager throws the same error when attempt to start an existing
domain.
I'm assuming that there's now some sort of compatibility issue between
the current versions of libvirt/virt-manager and qemu-kvm?
Is there a way to get around this and somehow use my existing domains
with this updated version of qemu-kvm?
Interestingly, just out of curiosity, I've started a new installation of
a WinXP vm. This seems to be going perfectly well so far, so I assume
that the issue is only with domains previously created with the older
version of qemu??
Any assistance in being able to run my existing domains would be greatly
appreciated!
--
Regards,
Mike Hinz
President
YR20
1718 Fry Road
Suite 440
Houston, TX 77084
mike.hinz(a)yr20.com
832-225-1293 (o)
713-594-3095 (m)
832-550-2657 (f)
14 years, 2 months
[libvirt-users] virtio and encryption
by Mike Ponomarenko
Greetings,
I am trying to use virtio and encryption.
My setup is:
host and guest: ubuntu 10.04 server (libvirt 0.7.5-5ubuntu27, qemu-kvm
0.12.3+noroms-0ubuntu9.2)
I have secret defined and disk in domain xml referencing that secret.
When I start using "<target dev='hda' bus='ide'/>" in HDD config, it works.
When I start using "<target dev='vda' bus='virtio'/>" I get following in syslog:
qemuMonitorCommandWithHandler:240 : cannot send monitor command
'cont': Unknown error 8446744073709551594
running with "<target dev='vda' bus='virtio'/>" works fine if format
is raw and there is no encryption.
Is storing raw images on encrypted loop device the only way to have
both virtio and ecryption?
14 years, 2 months
[libvirt-users] how to make consisten backups of guests without stopping them?
by Martin Kraus
Hello. I'd like to backup kvm guests running from lvm partitions on the host
without as little downtime as possible, preferably without stopping them. Could
libvirt help me with this? Could anybody point me to some documentation? The
question is what happens to the filesystem if I snapshot it from the host. LVM
is supposed to tell the filesystem to make itself consistent but I don't know
how that works if the filesystem is mounted inside the guest.
thanks
mk
14 years, 2 months
[libvirt-users] RHEL 6 does not support bonded and vlan tagged interfaces for KVM guests?
by David Knierim
I just wrote a bugzilla report against RHEL 6 beta2
(https://bugzilla.redhat.com/show_bug.cgi?id=623199).
In it I documented that I cannot get my guests to be able to use our
standard network configuration, which is active-standby bonded
interface with tagged vlans.
The response I got was this:
RHEL Product and Program Management 2010-08-11 11:39:02 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.
** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
While I am working with Red Hat to get this included in the official
release of RHEL 6, I was hoping that I could get this working somehow.
It appears to me that the problem is in the libvert-controlled
network connection to the guest. Can someone give me a clue on how to
get this working?
Thanks,
David
14 years, 2 months
[libvirt-users] libvirt 0.8.3 cannot connect to remote libvirtd 0.6.3
by Haidong Zhu
It seems virsh 0.8.3 cannot connect to libvirtd 0.6.3.
Machine 1: iibvirtd is 0.6.3
Machine 2: virsh 0.6.1
virsh -c xen+ssh://root@192.168.1.78 list
Connecting to uri: qemu:///session
Id Name State
----------------------------------
0 Domain-0 running
1 shanxi idle
Machine 3: virsh 0.8.3
virsh -c xen+ssh://root@192.168.1.78 list
error: server closed connection:
error: failed to connect to the hypervisor
14 years, 2 months
[libvirt-users] TCP reset (RST) networking issue (maybe was 'Sporadic network issues")
by Brian Fallik
Hi,
I'm seeing a very similar problem to the thread "Sporadic networking
issues" [1]. In our setup, some TCP operations receive unexpected RST
packets when executed on the guest. I can see these RST packets via
wireshark but can't explain their source.
We originally uncovered this when some 'git clone' operations failed
with "Broken Pipe" in the guests. I've been able to reproduce the
same failures using scp and 'svn checkout'. The failure occurs 80-90%
of the time and 'svn checkout' seems to be the quickest to fail. The
same operations on the host are always successful.
My setup is a Lucid amd64 host with two guests (Lucid and Hardy, both
i386, using kvm). Networking is configured as described in "Routed
network config". One anomoly I notice is that our configuration is
missing the 'mode' and 'dev' attributes of the 'forward' node. Not
sure if that makes a difference, especially since networking seems to
mostly work.
I've tried this with both virtio and e1000 drivers with no difference.
I tried Jeremy's suggestion to limit the host to start a single guest
but that did not seem to have an impact. One thing I wonder is if I'm
resetting the libvirt correctly to make this change. I did not reboot
the host, but I did shutdown the guests, shutdown the default network,
verified that no kvm was running and no tap/bridge devices existed,
undefined the Hardy domain, then restarted the default network and
started the Lucid kvm. Does that sound correct?
Anyone have suggestions for further debugging or pointer(s) to
existing related bugs? My search didn't turn up anything obvious.
I'm very eager to resolve this issue since it's blocking our ability
to use the VMs.
Thanks,
brian
1 - https://www.redhat.com/archives/libvirt-users/2010-August/msg00012.html
14 years, 2 months