[libvirt-users] Guest-networking: Two subnets = Guests cannot connect to the other subnet
by mailinglists@florian-kaiser.net
Hello list,
We have KVM setup using libvirt (0.9.0) as configuration device on a Debian
Squeeze Host. Networking is done in routed bridge mode and we have two
different subnets, as well as one main ip. Subnets get routed to the main ip
(this is done by our provider).
Network on hosts are done like this:
<network>
<name>subnet_1</name>
<uuid>7c60990d-ab31-c4a5-cd2b-5ce4c7c61d38</uuid>
<forward dev='eth0' mode='route'/>
<bridge name='virtbridge1' stp='off' delay='0' />
<mac address='52:54:00:4D:83:2A'/>
<ip address='xx.xx.240.121' netmask='255.255.255.248'>
</ip>
</network>
<network>
<name>subnet_2</name>
<uuid>7c60990d-ab31-c4a5-cd2b-5ce4c7c61d38</uuid>
<forward dev='eth0' mode='route'/>
<bridge name='virtbridge1' stp='off' delay='0' />
<mac address='52:54:00:4D:83:2A'/>
<ip address='xx.xx.240.200' netmask='255.255.255.248'>
</ip>
</network>
Routing on host
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
xx.xx.122.33 0.0.0.0 255.255.255.255 UH 0 0 0
eth0
xx.xx.240.120 0.0.0.0 255.255.255.248 U 0 0 0
virtbridge1
xx.xx.239.200 0.0.0.0 255.255.255.248 U 0 0 0
virtbridge2
0.0.0.0 xx.xx.122.33 0.0.0.0 UG 0 0 0
eth0
Guests get this:
<interface type='network'>
<mac address='de:ad:b6:83:85:5b'/>
<source network='subnet_1'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
Guests put this into interfaces:
iface eth0 inet static
address xx.xx.239.202
netmask 255.255.255.248
gateway xx.xx.239.201
Guest routing
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
xx.xx.239.200 0.0.0.0 255.255.255.248 U 0 0 0 eth0
0.0.0.0 xx.xx.239.201 0.0.0.0 UG 0 0 0 eth0
Everything seemed to work just fine, that is: Guests could connect
- to host,
- to internet
- to other virtual maschines in the same subnet - all vice-versa.
Internet can connect to any guest and our host can connect to any guest,
too.
Then, we needed one guest to connect to a guest from the other subnet. And
this does not work, what I get follows:
PING xx.xx.240.122 (xx.xx.240.122) 56(84) bytes of data.
>From xx.xx.239.201 icmp_seq=1 Destination Port Unreachable
>From xx.xx.239.201 icmp_seq=2 Destination Port Unreachable
Note, that I can ping the other subnets gateway just fine! But I cannot
connect to any of the other subnet IPs.
I believe this is just a routing problem, but I cannot figure out what route
to add where. Please ask if you need any more information.
13 years, 6 months
[libvirt-users] (no subject)
by Abhishek Gupta
Hello
I am having a libvirt installation on kvm, ubuntu 10.04. A few months ago, I
setup a cloud on the hypervisors which was functioning really cool. But from
last two-three days I am getting following error on using function
snapshotListNames in python.
>>> snapshots=dom.snapshotListNames(0)
libvir: Remote error : unknown procedure: 187
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 890, in
snapshotListNames
if ret is None: raise libvirtError ('virDomainSnapshotListNames()
failed', dom=self)
libvirt.libvirtError: unknown procedure: 187
Any ideas so as what could be causing the error?
--
Abhishek
Webpage <http://abhishekgupta92.info/> !!! Blog<http://thelazy.info/abhishek>
13 years, 6 months
[libvirt-users] Associating a statefile with an image
by sethuraman subbiah
Hi ,
I am trying to perform offline migration (i.e) Create an incremental image using the qcow format, transfer the vm memory state to a state fie.Use the image and statefile together as a template. Now create a new vm using the template. I can successfully do it using the following commands :
Save phase :
stop
migrate "exec:gzip -c > STATEFILE.gz"
qemu-img
qemu-img create -b BASE_img -f qcow2 INCRE_img
Restore phase :
qemu-kvm -m 1024 -hda INCRE_img -incoming "exec: gzip -c -d STATEFILE.gz"
And it works fine. But I am not able to find the vm with virt-manager or other libvirt based tools.
If I use :
virsh save <dom_id> STATEFILE
I can restore using "virsh restore STATEFILE" but I want to associate this with the incremental image that I created, but I dont know how. I think it saves the existing vm's xml file along with the STATEFILE, thus I am not able to change the disk image to the incremental image.
Thus ,
1. Either I should find a way to make vms created using qemu-kvm appear in libvirt-based tools.
OR
2. Find a way to associate the virsh save STATEFILE with a incremental image.
Any help or hint with respect to these will be very helpful. I am try to do cloning with minimal cost. This takes only 25 seconds ( to create STATEFILE) and creating incremental image is instantatenous . But I want to use the vm monitoring code based on libvirt. And it makes life difficult.
Thanks for your help.
-
Regards,
Sethuraman Subbiah
Graduate Student - NC state University
M.S in Computer Science
13 years, 6 months
[libvirt-users] Xm driver only supports modifying persistent config.
by zhuxuegang
Dear all.
I use libvirt to attach a volume to xen's guest VM,but l got the following message:
Attached device: /dev/sdb
[Mon Jul 4 09:18:58 2011][006640][EUCAERROR ] libvirt: Requested operation is not valid: Xm driver only supports modifying persistent config (code=55)
[Mon Jul 4 09:18:58 2011][006640][EUCAERROR ] AttachVolume() failed (err=-1) XML=<disk type='block'><driver name='phy'/><source dev='/dev/sdb'/><target dev='sdae'/></d
isk>
[Mon Jul 4 09:18:58 2011][006640][EUCAERROR ] ERROR: doAttachVolume() failed error=1
[Mon Jul 4 09:19:02 2011][006640][EUCADEBUG ] doDescribeResource() invoked
[Mon Jul 4 09:19:02 2011][006640][EUCADEBUG ] doDescribeInstances() invoked
any help will be greatly appreciated.
Thank you in advance...
2011-07-05
zhuxuegang
13 years, 6 months
[libvirt-users] Helping on libvirt
by negar behinaeen
*Writting myVirt*
------------------------------
Dear all,
I'm new in libvirt. I would be glad if you help me.
I want to write a program for controlling all libvirt servers named
"MYVIRT".
The libvirtd works as fallow:
{ CLIENT } ---------------------> { SERVER A }
|
|
------------------------------> { SERVER B }
Now, I want to place MYVIRT between client and libvirtd servers. By calling
a command, MYVIRT should execute the command for all servers.
{ CLIENT }
|
|
{ MYVIRT } ---------------------> { SERVER A }
|
|
------------------------------> { SERVER B }
The client softwares for libvirtd are virsh and virt-manager. Now I want
them to connect to MYVIRT and look it as a libvirtd server.
Would you please guide me for connecting to MYVIRT through virsh and execute
a command on all servers?
13 years, 6 months
[libvirt-users] Unable to boot from a vdi image
by yeswanth swami
Hi,
I am not able to boot a vdi image on virtualbox using libvirt .It keeps
showing me "Bootable medium not found". I have tried booting it manually
with virtualbox GUI and it boots without any problem. May there is some
problem with my libvirt domain XML . I also realized on some investigation
that it is not detecting the vdi image file as a hard disk (when i am
booting from a live cd)
A part of my libvirt domain XML is here:
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
------------------------------
<devices>
<disk type='file' device='disk'>
<source file='disk.vdi'/>
<target dev='hdd' bus='ide'/>
</disk>
</devices>
Thanks for replying
--
Cheers,
Yeswanth
13 years, 6 months
[libvirt-users] [PATCH] Use correct param names in Product getters
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
---
osinfo/osinfo_product.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/osinfo/osinfo_product.c b/osinfo/osinfo_product.c
index 89e01bd..bbbcf67 100644
--- a/osinfo/osinfo_product.c
+++ b/osinfo/osinfo_product.c
@@ -158,15 +158,15 @@ void osinfo_product_add_related(OsinfoProduct *product, OsinfoProductRelationshi
const gchar *osinfo_product_get_vendor(OsinfoProduct *prod)
{
- return osinfo_entity_get_param_value(OSINFO_ENTITY(prod), OSINFO_PRODUCT_PROP_NAME);
+ return osinfo_entity_get_param_value(OSINFO_ENTITY(prod), OSINFO_PRODUCT_PROP_VENDOR);
}
const gchar *osinfo_product_get_version(OsinfoProduct *prod)
{
- return osinfo_entity_get_param_value(OSINFO_ENTITY(prod), OSINFO_PRODUCT_PROP_NAME);
+ return osinfo_entity_get_param_value(OSINFO_ENTITY(prod), OSINFO_PRODUCT_PROP_VERSION);
}
const gchar *osinfo_product_get_short_id(OsinfoProduct *prod)
{
- return osinfo_entity_get_param_value(OSINFO_ENTITY(prod), OSINFO_PRODUCT_PROP_NAME);
+ return osinfo_entity_get_param_value(OSINFO_ENTITY(prod), OSINFO_PRODUCT_PROP_SHORT_ID);
}
const gchar *osinfo_product_get_name(OsinfoProduct *prod)
{
--
1.7.5.4
13 years, 6 months