Re: [kvm-devel] [PATCH] KVM_SET_MEMORY_REGION hang in linux 2.6.23.y
On Nov 21, 2007 8:56 AM, Avi Kivity [EMAIL PROTECTED] wrote: Marko Kohtala wrote: Wait for right amount of tlb flushes. Completed can be larger than needed and therefore the loop waiting them to match never ends. Signed-off-by: Marko Kohtala [EMAIL PROTECTED] --- This solves kernel lockup in KVM_SET_MEMORY_REGION ioctl with Linux 2.6.23.8 and before at kvm-52 start. Not needed in 2.6.24. diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index cd05579..b148aff 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -279,7 +279,8 @@ void kvm_flush_remote_tlbs(struct kvm *kvm) * to complete. */ for (cpu = first_cpu(cpus); cpu != NR_CPUS; cpu = next_cpu(cpu, cpus)) - smp_call_function_single(cpu, ack_flush, completed, 1, 0); + if (cpu_isset(cpu, cpus)) + smp_call_function_single(cpu, ack_flush, completed, 1, 0); Can you explain how this makes a difference? Aren't first_cpu() and next_cpu() designed to iterate over all cpus which have cpu_isset(cpus)? Look in linux/cpumask.h: 215 #ifdef CONFIG_SMP 216 int __first_cpu(const cpumask_t *srcp); 217 #define first_cpu(src) __first_cpu((src)) 218 int __next_cpu(int n, const cpumask_t *srcp); 219 #define next_cpu(n, src) __next_cpu((n), (src)) 220 #else 221 #define first_cpu(src) 0 222 #define next_cpu(n, src)1 223 #endif I have uniprocessor kernel, so first_cpu always gives 0, never NR_CPUS. I quickly looked through all uses of first_cpu, and in all other places there is at least one CPU to iterate over. So cpumask.h is not really wrong. It is just confusing. But being confusing is wrong, so there may be some room for discussion. Another fix to this issue could be to not enter the loop at all if cpus_empty(cpus). - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH] KVM_SET_MEMORY_REGION hang in linux 2.6.23.y
Marko Kohtala wrote: On Nov 21, 2007 8:56 AM, Avi Kivity [EMAIL PROTECTED] wrote: Marko Kohtala wrote: Wait for right amount of tlb flushes. Completed can be larger than needed and therefore the loop waiting them to match never ends. Signed-off-by: Marko Kohtala [EMAIL PROTECTED] --- This solves kernel lockup in KVM_SET_MEMORY_REGION ioctl with Linux 2.6.23.8 and before at kvm-52 start. Not needed in 2.6.24. diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index cd05579..b148aff 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -279,7 +279,8 @@ void kvm_flush_remote_tlbs(struct kvm *kvm) * to complete. */ for (cpu = first_cpu(cpus); cpu != NR_CPUS; cpu = next_cpu(cpu, cpus)) - smp_call_function_single(cpu, ack_flush, completed, 1, 0); + if (cpu_isset(cpu, cpus)) + smp_call_function_single(cpu, ack_flush, completed, 1, 0); Can you explain how this makes a difference? Aren't first_cpu() and next_cpu() designed to iterate over all cpus which have cpu_isset(cpus)? Look in linux/cpumask.h: 215 #ifdef CONFIG_SMP 216 int __first_cpu(const cpumask_t *srcp); 217 #define first_cpu(src) __first_cpu((src)) 218 int __next_cpu(int n, const cpumask_t *srcp); 219 #define next_cpu(n, src) __next_cpu((n), (src)) 220 #else 221 #define first_cpu(src) 0 222 #define next_cpu(n, src)1 223 #endif I have uniprocessor kernel, so first_cpu always gives 0, never NR_CPUS. I quickly looked through all uses of first_cpu, and in all other places there is at least one CPU to iterate over. So cpumask.h is not really wrong. It is just confusing. But being confusing is wrong, so there may be some room for discussion. Another fix to this issue could be to not enter the loop at all if cpus_empty(cpus). Or maybe, change first_cpu() to return !!cpus_empty() on uniprocessor. Though that's not for 2.6.23. I think terminating early on cpus_empty() in kvm_flush_remote_tlb() is fine. -- Any sufficiently difficult bug is indistinguishable from a feature. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 0 of 3] create kvm_x86
Hollis Blanchard wrote: These patches are based on Xiantao's work to create struct kvm_x86. Patch 1 replaces his KVM Portability split: Splitting kvm structure (V2), and patches 2 and 3 build on it. Looks like a clean approach with to to_kvm_x86 macro. Whole series: Acked-by: Carsten Otte [EMAIL PROTECTED] - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 0 of 3] create kvm_x86
* Avi Kivity wrote: Carsten Otte wrote: Hollis Blanchard wrote: These patches are based on Xiantao's work to create struct kvm_x86. Patch 1 replaces his KVM Portability split: Splitting kvm structure (V2), and patches 2 and 3 build on it. Looks like a clean approach with to to_kvm_x86 macro. Whole series: Acked-by: Carsten Otte [EMAIL PROTECTED] Well, I hate to say it, but the resulting code doesn't look too well (all the kvm_x86 variables), and it's entirely my fault as I recommended this approach. Not like it was difficult to predict. I'm thinking again of struct kvm { struct kvm_arch a; ... } Where each arch defines its own kvm_arch. Now the changes look like a bunch of kvm-blah to kvm-a.blah conversions. I was thinking the exact same thing. Having an arch-specific kvm as the super-structure decouples 'struct kvm' from everything and it's extremely clumsy to look at and program with. container_of() for getting struct kvm might be better than getting the arch-specific thing. IIRC a downside was mentioned that it is easier to cause a build failure for another arch now. How? I think it would work the same way in either case. Any arch-specific stuff happen in kvm_arch and generic stuff in kvm. Opinions? In theory correctness should win over style every time, no? But are those two conflicting here? And if you don't like what you're looking at, it's going to be tougher to make it correct without making it look better - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 0 of 3] create kvm_x86
Avi Kivity wrote: Carsten Otte wrote: Hollis Blanchard wrote: These patches are based on Xiantao's work to create struct kvm_x86. Patch 1 replaces his KVM Portability split: Splitting kvm structure (V2), and patches 2 and 3 build on it. Looks like a clean approach with to to_kvm_x86 macro. Whole series: Acked-by: Carsten Otte [EMAIL PROTECTED] Well, I hate to say it, but the resulting code doesn't look too well (all the kvm_x86 variables), and it's entirely my fault as I recommended this approach. Not like it was difficult to predict. I'm thinking again of struct kvm { struct kvm_arch a; ... } Agree. The kvm_arch approach is natural, and easy to understand. I prefer it here. Where each arch defines its own kvm_arch. Now the changes look like a bunch of kvm-blah to kvm-a.blah conversions. container_of approach has similar trobles, and has to use to_kvm_x86 to translate kvm to kvm_x86 for every arch-specific field access. IIRC a downside was mentioned that it is easier to cause a build failure for another arch now. I can't figure out why it can cause more build failure. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [RFC] Expose host cpuid to guest
These patches expose host CPU features (that are known to work under KVM) to guests. It makes a couple of benchmarks run faster, and generally gives kvm's user better info on its host. The kernel-space patch adds KVM_GET_SUPPORTED_CPUID ioctl to obtain the table of cpuid functions supported by the host. The user-space patch allows fine-tuning this table from the command-line. I had to define struct kvm_cpuid2, KVM_SET_CPUID2 etc., because cpuid functions are a little more complex than just function-value pairs. Dan. commit e9775d0a16097cfb71779cb2fb985fb3e5040dc8 Author: Dan Kenigsberg [EMAIL PROTECTED] Date: Sun Nov 18 13:55:26 2007 +0200 Support -cpu host option. Negotiate cpuid table with userspace. Signed-off-by: Dan Kenigsberg [EMAIL PROTECTED] diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index b42c9d4..5240e5f 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -626,6 +626,7 @@ int kvm_dev_ioctl_check_extension(long ext) case KVM_CAP_MMU_SHADOW_CACHE_CONTROL: case KVM_CAP_USER_MEMORY: case KVM_CAP_SET_TSS_ADDR: + case KVM_CAP_EXT_CPUID: r = 1; break; default: @@ -688,13 +689,17 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) kvm_put_guest_fpu(vcpu); } +static int is_efer_nx(void) { + u64 efer; + rdmsrl(MSR_EFER, efer); + return efer EFER_NX; +} + static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu) { - u64 efer; int i; - struct kvm_cpuid_entry *e, *entry; + struct kvm_cpuid_entry2 *e, *entry; - rdmsrl(MSR_EFER, efer); entry = NULL; for (i = 0; i vcpu-cpuid_nent; ++i) { e = vcpu-cpuid_entries[i]; @@ -703,16 +708,56 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu) break; } } - if (entry (entry-edx (1 20)) !(efer EFER_NX)) { + if (entry (entry-edx (1 20)) !is_efer_nx()) { entry-edx = ~(1 20); printk(KERN_INFO kvm: guest NX capability removed\n); } } +/* when an old userspace process fills a new kernel module */ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid *cpuid, struct kvm_cpuid_entry __user *entries) { + int r, i; + struct kvm_cpuid_entry *cpuid_entries; + + r = -E2BIG; + if (cpuid-nent KVM_MAX_CPUID_ENTRIES) + goto out; + r = -ENOMEM; + cpuid_entries = vmalloc(sizeof(struct kvm_cpuid_entry) * cpuid-nent); + if (!cpuid_entries) + goto out; + r = -EFAULT; + if (copy_from_user(cpuid_entries, entries, + cpuid-nent * sizeof(struct kvm_cpuid_entry))) + goto out_free; + for (i = 0; i cpuid-nent; i++) { + vcpu-cpuid_entries[i].function = cpuid_entries[i].function; + vcpu-cpuid_entries[i].eax = cpuid_entries[i].eax; + vcpu-cpuid_entries[i].ebx = cpuid_entries[i].ebx; + vcpu-cpuid_entries[i].ecx = cpuid_entries[i].ecx; + vcpu-cpuid_entries[i].edx = cpuid_entries[i].edx; + vcpu-cpuid_entries[i].index = 0; + vcpu-cpuid_entries[i].flags = 0; + vcpu-cpuid_entries[i].padding[0] = 0; + vcpu-cpuid_entries[i].padding[1] = 0; + vcpu-cpuid_entries[i].padding[2] = 0; + } + vcpu-cpuid_nent = cpuid-nent; + r = 0; + +out_free: + vfree(cpuid_entries); +out: + return r; +} + +static int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, + struct kvm_cpuid2 *cpuid, + struct kvm_cpuid_entry2 __user *entries) +{ int r; r = -E2BIG; @@ -720,7 +765,7 @@ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu, goto out; r = -EFAULT; if (copy_from_user(vcpu-cpuid_entries, entries, - cpuid-nent * sizeof(struct kvm_cpuid_entry))) + cpuid-nent * sizeof(struct kvm_cpuid_entry2))) goto out; vcpu-cpuid_nent = cpuid-nent; cpuid_fix_nx_cap(vcpu); @@ -730,6 +775,192 @@ out: return r; } +static int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu, + struct kvm_cpuid2 *cpuid, + struct kvm_cpuid_entry2 __user *entries) +{ + int r; + + r = -E2BIG; + if (cpuid-nent vcpu-cpuid_nent) + goto out; + r = -EFAULT; + if (copy_to_user(entries, vcpu-cpuid_entries, + vcpu-cpuid_nent * sizeof(struct kvm_cpuid_entry2))) + goto out; + return 0; + +out: +cpuid-nent = vcpu-cpuid_nent; + return r; +} + +static inline u32 bit(int bitno) +{ + return 1 (bitno 31); +} +
Re: [kvm-devel] [RFC] Expose host cpuid to guest
* Dan Kenigsberg wrote: These patches expose host CPU features (that are known to work under KVM) to guests. It makes a couple of benchmarks run faster, and generally gives kvm's user better info on its host. The kernel-space patch adds KVM_GET_SUPPORTED_CPUID ioctl to obtain the table of cpuid functions supported by the host. The user-space patch allows fine-tuning this table from the command-line. I had to define struct kvm_cpuid2, KVM_SET_CPUID2 etc., because cpuid functions are a little more complex than just function-value pairs. Dan. Hey Dan, were those amd-specific things sorted out? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] kvm-53
hi, we made a quick try of kvm-53. in short there is no progress for us (since we need the mandrake-9 i586 guest too) so switch back to kvm-36. in detail: - guest-1 smp guest are hang at starting udev - guest-1 sinlge cpu boot. - guest-2 both smp and single cpu guest boot. - guest-3 neither smp nor single cpu guest boot (it's hang before loading kernel, kvm-36 boot it with single cpu) this means i can't boot this guest in kvm-53. - host: - Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz - Intel S3000AHV - 8GB RAM - CentOS-5 - kernel-2.6.18-8.1.15.el5 x86_64 64bit - guest-1: - CentOS-5 - kernel-2.6.18-8.1.15.el5 i386 32bit - guest-2: - CentOS-5 - kernel-2.6.18-8.1.15.el5 x86_64 64bit - guest-3: - Mandrake-9 - kernel-2.4.19.16mdk-1-1mdk 32bit - guest-4: - Windows XP Professional 32bit -- Levente Si vis pacem para bellum! - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
Farkas Levente wrote: hi, we made a quick try of kvm-53. in short there is no progress for us (since we need the mandrake-9 i586 guest too) so switch back to kvm-36. in detail: - guest-1 smp guest are hang at starting udev i am in search for this bug it worked for you in kvm-36? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] Expose host cpuid to guest
Dan Kenigsberg wrote: These patches expose host CPU features (that are known to work under KVM) to guests. It makes a couple of benchmarks run faster, and generally gives kvm's user better info on its host. The kernel-space patch adds KVM_GET_SUPPORTED_CPUID ioctl to obtain the table of cpuid functions supported by the host. The user-space patch allows fine-tuning this table from the command-line. I had to define struct kvm_cpuid2, KVM_SET_CPUID2 etc., because cpuid functions are a little more complex than just function-value pairs. commit e9775d0a16097cfb71779cb2fb985fb3e5040dc8 Author: Dan Kenigsberg [EMAIL PROTECTED] Date: Sun Nov 18 13:55:26 2007 +0200 Support -cpu host option. Negotiate cpuid table with userspace. The kernel doesn't have a -cpu option. The description needs to be more descriptive (motivation, special cases in cpuid). +static int is_efer_nx(void) { + u64 efer; blank line + rdmsrl(MSR_EFER, efer); + return efer EFER_NX; +} + +static int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu, + struct kvm_cpuid2 *cpuid, + struct kvm_cpuid_entry2 __user *entries) +{ + int r; + + r = -E2BIG; + if (cpuid-nent vcpu-cpuid_nent) + goto out; + r = -EFAULT; + if (copy_to_user(entries, vcpu-cpuid_entries, +vcpu-cpuid_nent * sizeof(struct kvm_cpuid_entry2))) + goto out; + return 0; + +out: +cpuid-nent = vcpu-cpuid_nent; whitespace damage here + return r; + +static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, + u32 index, int *nent, int maxnent) +{ + const __u32 kvm_supported_word0_x86_features = bit(X86_FEATURE_FPU) | + bit(X86_FEATURE_VME) | bit(X86_FEATURE_DE) | + bit(X86_FEATURE_PSE) | bit(X86_FEATURE_TSC) | + bit(X86_FEATURE_MSR) | bit(X86_FEATURE_PAE) | + bit(X86_FEATURE_CX8) | bit(X86_FEATURE_APIC) | + bit(X86_FEATURE_SEP) | bit(X86_FEATURE_PGE) | + bit(X86_FEATURE_CMOV) | bit(X86_FEATURE_PSE36) | + bit(X86_FEATURE_CLFLSH) | bit(X86_FEATURE_MMX) | + bit(X86_FEATURE_FXSR) | bit(X86_FEATURE_XMM) | + bit(X86_FEATURE_XMM2) | bit(X86_FEATURE_SELFSNOOP); u32, not __u32. + const __u32 kvm_supported_word1_x86_features = bit(X86_FEATURE_FPU) | + bit(X86_FEATURE_VME) | bit(X86_FEATURE_DE) | + bit(X86_FEATURE_PSE) | bit(X86_FEATURE_TSC) | + bit(X86_FEATURE_MSR) | bit(X86_FEATURE_PAE) | + bit(X86_FEATURE_CX8) | bit(X86_FEATURE_APIC) | + bit(X86_FEATURE_PGE) | + bit(X86_FEATURE_CMOV) | bit(X86_FEATURE_PSE36) | + bit(X86_FEATURE_MMX) | bit(X86_FEATURE_FXSR) | + bit(X86_FEATURE_SYSCALL) | + (bit(X86_FEATURE_NX) is_efer_nx()) | +#ifdef CONFIG_X86_64 + bit(X86_FEATURE_LM) | +#endif + /* TODO: make sure the following features are + * safe for SVM guests */ + bit(X86_FEATURE_MMXEXT) | + bit(X86_FEATURE_RDTSCP) | bit(X86_FEATURE_3DNOWEXT) | + bit(X86_FEATURE_3DNOW); rdtscp isn't, I believe. + const __u32 kvm_supported_word3_x86_features = + bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16); + const __u32 kvm_supported_word6_x86_features = + bit(X86_FEATURE_LAHF_LM) | bit(X86_FEATURE_CMP_LEGACY); + + /* all func 2 cpuid_count() should be called on the same cpu */ + if (function==2) + get_cpu(); Avoid the special case, just to it unconditionally. + do_cpuid_1_ent(entry, function, index); + ++*nent; + + switch (function) { + case 0: + entry-eax = min(entry-eax, (u32)0xb); + break; + case 1: + entry-edx = kvm_supported_word0_x86_features; + entry-ecx = kvm_supported_word3_x86_features; + break; + /* function 2 entries are STATEFUL. That is, repeated cpuid commands + * may return different values. This forces us to get_cpu() before + * issuing the first command, and also to emulate this annoying behavior + * in kvm_emulate_cpuid() using KVM_CPUID_FLAG_STATE_READ_NEXT */ + case 2: { + int t, times = entry-eax 0xff; Indent this normally relative to other entries. + + entry-flags |= KVM_CPUID_FLAG_STATEFUL_FUNC; + for (t = 1; t times *nent maxnent; ++t) { + do_cpuid_1_ent(entry[t], function, 0); + entry[t].flags |= KVM_CPUID_FLAG_STATEFUL_FUNC; + ++*nent; + } + break; + } + /* function 4 and 0xb have additional
Re: [kvm-devel] kvm-53
Izik Eidus wrote: Farkas Levente wrote: hi, we made a quick try of kvm-53. in short there is no progress for us (since we need the mandrake-9 i586 guest too) so switch back to kvm-36. in detail: - guest-1 smp guest are hang at starting udev i am in search for this bug it worked for you in kvm-36? no kvm-36 was not able to use smp guest (neither 32 nor 64 bit), but able to boot mandrake-9 with single cpu and as we need mandrake too this is the only version we can use (we rather use all guest as single cpu). -- Levente Si vis pacem para bellum! - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
Hi Levente! Do you have a link where I can download Mandrake 9.0 ? Because I don't have this version, and don't know where to get it. -Alexey - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] physical migration of older machines
I have an AMD 4800+ machine with 2 GIG RAM. I have OLD machines that I want to virtualize and then TURN OFF. The old machines are redhat 7.3, redhat 9, centos 4 i386. I am using centos 5 x86_64. I need to have the OLD machines migrated to the virtual image. What is the BEST way to do that??? Thats my big question. Below is what I have tried and not been successful. I did not find a FAQ on this... Thanks, Jerry I have the old disk and I created a 10GIG image and installed the 7.3, 9 and centos 4. Now I want to make sure the new image matches the physical image. I mounted the image as: mount -t ext3 -o loop,offset=32256 Image.redhat7.3.img /mnt/image then I executed tar --exclude ./boot --exclude --exclude ./proc --exclude ./dev -cvf - . | ssh [EMAIL PROTECTED] ( cd /mnt/image ; tar xvpf -) on the physical machine to copy to my host. This seemed to work but on booting the file system is corrupt. I did umount /mnt/image before booting the VM. I have not tried Ghost as the physical disk on these machines is minimum of 100GIG and I dont want VM images of this size. 10GIG is all I really need. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
Alexey Eremenko wrote: Hi Levente! Do you have a link where I can download Mandrake 9.0 ? Because I don't have this version, and don't know where to get it. ok. just to describe why we need it. our production servers run on mandrake-9 and mandrake-10. it's about 6-700 server running in 6 different countries. we're in progress to switch them to centos-5, but since all of the servers are in different country's different city we've to do it remotely and it require big care and it's happened very slowly. our central development server has all kind of different system distro/kernel/cpu 32 and 64bit/memory/ etc. we runs test on these guests and compile new versions on them. so these are not mission critical production server but our developer use it and that's why we have all guest running. we're in a process to make a second server which use xen and run guests on that hosts. currently it seems that xen is much more stable and usable alternative. as i'm on the kvm list since about half year it seems xen will be better choice in the next 6-12 mounts too. and xen has more support from et.redhat.com too libvirt, virt-manager, etc too. anyway imho someone from qumranet may have to be involved in these tools development too (to be at the same level as xen) since it's very important from the user point of view. unfortunately i choose kvm over xen at the first place that's way i made rpms for kvm and other tools for centos and test all new version a little bit. -- Levente Si vis pacem para bellum! - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] Expose host cpuid to guest
On Wed, Nov 21, 2007 at 01:52:15PM +0200, Avi Kivity wrote: Dan Kenigsberg wrote: These patches expose host CPU features (that are known to work under KVM) to guests. It makes a couple of benchmarks run faster, and generally gives kvm's user better info on its host. The kernel-space patch adds KVM_GET_SUPPORTED_CPUID ioctl to obtain the table of cpuid functions supported by the host. The user-space patch allows fine-tuning this table from the command-line. I had to define struct kvm_cpuid2, KVM_SET_CPUID2 etc., because cpuid functions are a little more complex than just function-value pairs. commit e9775d0a16097cfb71779cb2fb985fb3e5040dc8 Author: Dan Kenigsberg [EMAIL PROTECTED] Date: Sun Nov 18 13:55:26 2007 +0200 Support -cpu host option. Negotiate cpuid table with userspace. I believe the attached two patches apply all your comments. Dan. commit 53c12a2602642ed01488ae382d23d350e5464a71 Author: Dan Kenigsberg [EMAIL PROTECTED] Date: Wed Nov 21 16:03:55 2007 +0200 Expose host CPU features to guests. a new KVM_GET_SUPPORTED_CPUID ioctl is used to obtain the table of cpuid functions supported by the host kvm. The user-space may fine-tune this table and use the KVM_SET_CPUID2 ioctl to set the table seen by guests. This patch exposes CPU features that are hitherto hidden (e.g. SSE, cache structure) and makes a couple of benchmarks faster. The table of cpuid entries and kvm_emulate_cpuid() had to be changed because for a couple of cpuid functions, edx - and not only eax - is significant. Worse, function 2 is stateful; its value may change between consequtive calls. Signed-off-by: Dan Kenigsberg [EMAIL PROTECTED] diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index b42c9d4..c14967a 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -626,6 +626,7 @@ int kvm_dev_ioctl_check_extension(long ext) case KVM_CAP_MMU_SHADOW_CACHE_CONTROL: case KVM_CAP_USER_MEMORY: case KVM_CAP_SET_TSS_ADDR: + case KVM_CAP_EXT_CPUID: r = 1; break; default: @@ -688,13 +689,18 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) kvm_put_guest_fpu(vcpu); } +static int is_efer_nx(void) { + u64 efer; + + rdmsrl(MSR_EFER, efer); + return efer EFER_NX; +} + static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu) { - u64 efer; int i; - struct kvm_cpuid_entry *e, *entry; + struct kvm_cpuid_entry2 *e, *entry; - rdmsrl(MSR_EFER, efer); entry = NULL; for (i = 0; i vcpu-cpuid_nent; ++i) { e = vcpu-cpuid_entries[i]; @@ -703,16 +709,56 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu) break; } } - if (entry (entry-edx (1 20)) !(efer EFER_NX)) { + if (entry (entry-edx (1 20)) !is_efer_nx()) { entry-edx = ~(1 20); printk(KERN_INFO kvm: guest NX capability removed\n); } } +/* when an old userspace process fills a new kernel module */ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid *cpuid, struct kvm_cpuid_entry __user *entries) { + int r, i; + struct kvm_cpuid_entry *cpuid_entries; + + r = -E2BIG; + if (cpuid-nent KVM_MAX_CPUID_ENTRIES) + goto out; + r = -ENOMEM; + cpuid_entries = vmalloc(sizeof(struct kvm_cpuid_entry) * cpuid-nent); + if (!cpuid_entries) + goto out; + r = -EFAULT; + if (copy_from_user(cpuid_entries, entries, + cpuid-nent * sizeof(struct kvm_cpuid_entry))) + goto out_free; + for (i = 0; i cpuid-nent; i++) { + vcpu-cpuid_entries[i].function = cpuid_entries[i].function; + vcpu-cpuid_entries[i].eax = cpuid_entries[i].eax; + vcpu-cpuid_entries[i].ebx = cpuid_entries[i].ebx; + vcpu-cpuid_entries[i].ecx = cpuid_entries[i].ecx; + vcpu-cpuid_entries[i].edx = cpuid_entries[i].edx; + vcpu-cpuid_entries[i].index = 0; + vcpu-cpuid_entries[i].flags = 0; + vcpu-cpuid_entries[i].padding[0] = 0; + vcpu-cpuid_entries[i].padding[1] = 0; + vcpu-cpuid_entries[i].padding[2] = 0; + } + vcpu-cpuid_nent = cpuid-nent; + r = 0; + +out_free: + vfree(cpuid_entries); +out: + return r; +} + +static int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, + struct kvm_cpuid2 *cpuid, + struct kvm_cpuid_entry2 __user *entries) +{ int r; r = -E2BIG; @@ -720,7 +766,7 @@ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu, goto out; r = -EFAULT; if (copy_from_user(vcpu-cpuid_entries,
Re: [kvm-devel] physical migration of older machines
[EMAIL PROTECTED] wrote: I have an AMD 4800+ machine with 2 GIG RAM. I have OLD machines that I want to virtualize and then TURN OFF. The old machines are redhat 7.3, redhat 9, centos 4 i386. I am using centos 5 x86_64. Migrating a physical machine to a virtual environment needs additional and probably complicated guest OS specific tools. Vmware has statement they can, for KVM Xen, I guess it still needs many community effort. Eddie - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] physical migration of older machines
Jerry Geis wrote: I have the old disk and I created a 10GIG image and installed the 7.3, 9 and centos 4. Now I want to make sure the new image matches the physical image. I mounted the image as: mount -t ext3 -o loop,offset=32256 Image.redhat7.3.img /mnt/image then I executed tar --exclude ./boot --exclude --exclude ./proc --exclude ./dev -cvf - . | ssh [EMAIL PROTECTED] ( cd /mnt/image ; tar xvpf -) on the physical machine to copy to my host. This seemed to work but on booting the file system is corrupt. I did umount /mnt/image before booting the VM. I have not tried Ghost as the physical disk on these machines is minimum of 100GIG and I dont want VM images of this size. 10GIG is all I really need. What's happening probably is that the boot loader configuration is no longer valid. If you have some temporary free space, the following untested hack may help: - boot from a livecd on the image, and dd the entire disk to a file: dd if=/dev/hda bs=1M | ssh -C [EMAIL PROTECTED] 'cat disk.img' - start kvm with this image qemu-system-x86_64 -hda disk.img ... - create a file full of zeros which occupies all free space (inside the VM) dd bs=1M if=/dev/zero of=/zeros; sync - shut down the VM - create a sparse image (that does not include the zeros), using *one* of the following: cp --sparse=always disk.img disk-new.img or qemu-img convert disk.img -O qcow2 disk-new.img In the first case, the file will still appear large, but will actually occupy less space. In the second case, the file size will reflect the amount of disk space it occupies. - boot the new image, and delete the zeros file: rm /zeros; sync - remove the temporary 100GB image: rm disk.img -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
Well, Mandrake 9.0 works on Intel/x64 KVM-51, but without SMP. It stucks with SMP. (on init stage, when entering init 5) -Alexey - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
OK, I have found that Mandrake Linux 9.0 works on Intel/x86-64 on KVM-51. Does this help you for now ? I will try to look further. -Alexey - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] [ kvm-Bugs-1835911 ] Mandrake 9.0 stucks on KVM (or even crashes KVM)
Bugs item #1835911, was opened at 2007-11-21 19:20 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1835911group_id=180599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Technologov (technologov) Assigned to: Nobody/Anonymous (nobody) Summary: Mandrake 9.0 stucks on KVM (or even crashes KVM) Initial Comment: Host: Intel CPU, Fedora7/x64. On KVM-53, KVM crashes immediately. On KVM-51, Mandrake 9.0 (32-bit) setups works with single CPU. Running with -smp 2 makes guest stuck on init (when entering init 5). -no-kvm-irqchip and -no-acpi didn't help. -Alexey. 21.11.2007. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1835911group_id=180599 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
opened a bug report about Mandrake 9.0: http://sourceforge.net/tracker/index.php?func=detailaid=1835911group_id=180599atid=893831 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [PATCH 3/3] virtio PCI device
On Wed, 2007-11-21 at 09:13 +0200, Avi Kivity wrote: Where the device is implemented is an implementation detail that should be hidden from the guest, isn't that one of the strengths of virtualization? Two examples: a file-based block device implemented in qemu gives you fancy file formats with encryption and compression, while the same device implemented in the kernel gives you a low-overhead path directly to a zillion-disk SAN volume. Or a user-level network device capable of running with the slirp stack and no permissions vs. the kernel device running copyless most of the time and using a dma engine for the rest but requiring you to be good friends with the admin. The user should expect zero reconfigurations moving a VM from one model to the other. I think that is pretty insightful, and indeed, is probably the only reason we would ever consider using a virtio based driver. But is this really a virtualization problem, and is virtio the right place to solve it? Doesn't I/O hotplug with multipathing or NIC teaming provide the same infrastructure in a way that is useful in more than just a virtualization context? Zach - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] widescreen resolutions: 1680x1050
On Nov 21, 2007 11:41 AM, Avi Kivity [EMAIL PROTECTED] wrote: Francesc Romà i Frigolé wrote: Hello, Sorry if the post is off-topic, but the qemu users forum has been down for several days. Is it possible to use a wide screen resolution of 1680x1050 with kvm? the guest OS is windows XP. I'm using the qemu parameter -std-vga, and I can use resolutions up to 1600x1200, but the 1680x1050 is missing. Please respond to me directly as I'm not subscribed to the mailing list. The vmware VGA display supports multiple resolutions, and is supported in qemu, but I haven't tested it under kvm. Thanks avi. I couldn't manage to get it working, but I got a bit further disabling kvm support in qemu. These are the steps I followed, just in case somebody else wants to try: kvm53 makes windows XP crash with the -vmwarevga parameter. I get a black screen followed by a blue screen with an error. Something about an infinite loop in the framebuf driver. However, windows runs normally when using the kvn53 version of qemu without kvm support and the -vmwarevga parameter. Windows XP didn't recognize the vmware VGA driver and it's using it as a standard vga device (which doesn't support wide screen resolutions). I then tried to install the windows drivers for the vmware SVGA II device. VMware provides this driver free of charge as discussed here: http://ubuntuforums.org/archive/index.php/t-84275.html So, I downloaded the windows.iso file from here: http://www.vmware.com/support/esx2/doc/esx2-16515update.html The setup program won't run since it doesn't detect vmware, but the driver can be installed like this: From the windows xp guest OS, go to the control panel, system, hardware, device manager, select the vga driver and click the install new driver button. Then windows finds the drivers for the VMWare SVGA II device, and hungs, with the generic message: a problem has been detected and windows has been shut down to prevent damage to your computer regards, Francesc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
Alexey Eremenko wrote: OK, I have found that Mandrake Linux 9.0 works on Intel/x86-64 on KVM-51. Does this help you for now ? I will try to look further. try with kvm-53! it do not even start to boot for me (actually i don't remember for the kvm-51 result but it may be worked with kvm-51). -- Levente Si vis pacem para bellum! - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
try with kvm-53! it do not even start to boot for me (actually i don't remember for the kvm-51 result but it may be worked with kvm-51). Tried, and you're right. It crashes right from start. Opened a bug report. We will look into this issue. http://sourceforge.net/tracker/index.php?func=detailaid=1835911group_id=180599atid=893831 -- -Alexey Eremenko Technologov - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
[kvm-devel] VM networking stops working
Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] VM networking stops working
Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] VM networking stops working
Izik Eidus schrieb: Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? Thank you for your reply. I can't connect to the vm if it has died, even with vnc. I tried this already, no reply from the host. I don't have physical access to the server because its located in a dc. Only ssh to the host. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] VM networking stops working
Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? Thank you for your reply. I can't connect to the vm if it has died, even with vnc. I tried this already, no reply from the host. I don't have physical access to the server because its located in a dc. Only ssh to the host. ok this mean there is bug in kvm for amd and it not realted to the network what is the guest that you use? is it 64/32? I'm using Debian Etch 32 Bit for all guests with Kernel Linux apache 2.6.18-5-486 #1 Tue Oct 2 23:38:54 UTC 2007 i686 GNU/Linux - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] VM networking stops working
Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? Thank you for your reply. I can't connect to the vm if it has died, even with vnc. I tried this already, no reply from the host. I don't have physical access to the server because its located in a dc. Only ssh to the host. ok this mean there is bug in kvm for amd and it not realted to the network what is the guest that you use? is it 64/32? I'm using Debian Etch 32 Bit for all guests with Kernel Linux apache 2.6.18-5-486 #1 Tue Oct 2 23:38:54 UTC 2007 i686 GNU/Linux - ok but what more interesting me is: if you run just one vm is it work? Yes. If I run only 1 vm, it runs days without problems. I have sometimes have peaks in reply time from the guest. e.g. bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=119ms TTL=57 bytes=32 time=400ms TTL=57 bytes=32 time=540ms TTL=57 bytes=32 time=947ms TTL=57 bytes=32 time=754ms TTL=57 bytes=32 time=850ms TTL=57 bytes=32 time=925ms TTL=57 bytes=32 time=2032ms TTL=57 bytes=32 time=897ms TTL=57 bytes=32 time=197ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 but if I ping the host server the same time, the reply time is normal, around 34ms - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] VM networking stops working
Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? Thank you for your reply. I can't connect to the vm if it has died, even with vnc. I tried this already, no reply from the host. I don't have physical access to the server because its located in a dc. Only ssh to the host. ok this mean there is bug in kvm for amd and it not realted to the network what is the guest that you use? is it 64/32? I'm using Debian Etch 32 Bit for all guests with Kernel Linux apache 2.6.18-5-486 #1 Tue Oct 2 23:38:54 UTC 2007 i686 GNU/Linux - ok but what more interesting me is: if you run just one vm is it work? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] VM networking stops working
Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? Thank you for your reply. I can't connect to the vm if it has died, even with vnc. I tried this already, no reply from the host. I don't have physical access to the server because its located in a dc. Only ssh to the host. ok this mean there is bug in kvm for amd and it not realted to the network what is the guest that you use? is it 64/32? I'm using Debian Etch 32 Bit for all guests with Kernel Linux apache 2.6.18-5-486 #1 Tue Oct 2 23:38:54 UTC 2007 i686 GNU/Linux - ok but what more interesting me is: if you run just one vm is it work? Yes. If I run only 1 vm, it runs days without problems. I have sometimes have peaks in reply time from the guest. e.g. bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=119ms TTL=57 bytes=32 time=400ms TTL=57 bytes=32 time=540ms TTL=57 bytes=32 time=947ms TTL=57 bytes=32 time=754ms TTL=57 bytes=32 time=850ms TTL=57 bytes=32 time=925ms TTL=57 bytes=32 time=2032ms TTL=57 bytes=32 time=897ms TTL=57 bytes=32 time=197ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 but if I ping the host server the same time, the reply time is normal, around 34ms - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list
Re: [kvm-devel] VM networking stops working
Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? Thank you for your reply. I can't connect to the vm if it has died, even with vnc. I tried this already, no reply from the host. I don't have physical access to the server because its located in a dc. Only ssh to the host. ok this mean there is bug in kvm for amd and it not realted to the network what is the guest that you use? is it 64/32? I'm using Debian Etch 32 Bit for all guests with Kernel Linux apache 2.6.18-5-486 #1 Tue Oct 2 23:38:54 UTC 2007 i686 GNU/Linux - ok but what more interesting me is: if you run just one vm is it work? Yes. If I run only 1 vm, it runs days without problems. I have sometimes have peaks in reply time from the guest. e.g. bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=119ms TTL=57 bytes=32 time=400ms TTL=57 bytes=32 time=540ms TTL=57 bytes=32 time=947ms TTL=57 bytes=32 time=754ms TTL=57 bytes=32 time=850ms TTL=57 bytes=32 time=925ms TTL=57 bytes=32 time=2032ms TTL=57 bytes=32 time=897ms TTL=57 bytes=32 time=197ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 but if I ping the host server the same time, the reply time is normal, around 34ms - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list
Re: [kvm-devel] VM networking stops working
On Nov 21, 2007, at 12:52 PM, Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike I had similar problems for my first week or so of trying to use KVM for my virtualization needs. My problem was solved by adding a model=rtl8139 to the first -net option on the kvm/qemu command. The default ne2k emulation seems to be broken. Another possibility is problems with macaddr. In my testing I found that several of my machines were getting the same macaddr by default so now I specify them explicitly for each VM (or generate a dummy one based on the time for testing). An example from one of my KVMMs (hopefully line wrapping won't interfere): /usr/local/bin/qemu-system-x86_64 -name DOM9-BSD62 -hda /vm_img/ bsd_in1/dom9-disk1.qcow \ -hdb /vm_img/bsd_in1/dom9-disk2.raw -m 512 -boot c -smp 2 -usb - usbdevice tablet -vnc :9 \ -serial telnet::4109,server,nowait -monitor telnet:: 4209,server,nowait \ -net nic,vlan=0,macaddr=52:54:09:12:34:56,model=rtl8139 \ -net tap,vlan=0,ifname=tap1,script=/etc/kvm/kvm-ifup Lynn Kerby - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] VM networking stops working
Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Izik Eidus schrieb: Mike wrote: Hello, I have a problem with my virtual machines. I am using kvm53 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+. As distribution I use Ubuntu server 7.10. As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15 GMT 2007 x86_64 GNU/Linux. I have 3 different vms running. At the beginning they all work without a problem. Then, after one moment to another one or more stop working. I did a ping test to all the machines, the vm with the failure stops pinging. The result from external ping: Destination host unreachable. The same result from a ping onto the main server. Here are my configuration files: cat /etc/qemu-ifup #!/bin/sh /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 sleep 2 cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet static address 195.24.77.169 netmask 255.255.255.0 gateway 195.24.77.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 I use scripts for starting the vms: kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize kvm -hda postfix.img -m 512 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize kvm -hda openvpn.img -m 256 -boot c -net nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize The tapN devices are being created at the startup of the vms. When I run dmesg I have this: [ 112.390943] br0: port 2(tap1) entering learning state [ 112.391919] br0: port 3(tap0) entering learning state [ 112.397605] br0: port 4(tap2) entering learning state [ 122.674313] tap0: no IPv6 routers present [ 122.729185] tap1: no IPv6 routers present [ 122.843901] tap2: no IPv6 routers present [ 123.336081] kvm: emulating exchange as write [ 127.367940] br0: topology change detected, propagating [ 127.367949] br0: port 4(tap2) entering forwarding state [ 127.362971] br0: topology change detected, propagating [ 127.362977] br0: port 2(tap1) entering forwarding state [ 127.362978] br0: topology change detected, propagating [ 127.362980] br0: port 3(tap0) entering forwarding state No indication of a problem, nowhere in the log files. I don't know if the vms are freezing, or the network forwarding stops working. I also activated net.ipv4.conf.default.forwarding=1 I googled days for that problem, but without a result. I hope that maybe you have a solution for this problem. That would be great, because I prefer using kvm instead of other virtualization systems. Thank you very much in advance, Greetings from Luxembourg. Have a nice day, Mike it might be not the network that die, but the whole vm can you run the vms with -vnc ? (first vm -vnc :1 secoend vm -vnc :2 third vm -vnc :3) and try to connect to them with vncviewer and see if they are alive? Thank you for your reply. I can't connect to the vm if it has died, even with vnc. I tried this already, no reply from the host. I don't have physical access to the server because its located in a dc. Only ssh to the host. ok this mean there is bug in kvm for amd and it not realted to the network what is the guest that you use? is it 64/32? I'm using Debian Etch 32 Bit for all guests with Kernel Linux apache 2.6.18-5-486 #1 Tue Oct 2 23:38:54 UTC 2007 i686 GNU/Linux - ok but what more interesting me is: if you run just one vm is it work? Yes. If I run only 1 vm, it runs days without problems. I have sometimes have peaks in reply time from the guest. e.g. bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=119ms TTL=57 bytes=32 time=400ms TTL=57 bytes=32 time=540ms TTL=57 bytes=32 time=947ms TTL=57 bytes=32 time=754ms TTL=57 bytes=32 time=850ms TTL=57 bytes=32 time=925ms TTL=57 bytes=32 time=2032ms TTL=57 bytes=32 time=897ms TTL=57 bytes=32 time=197ms TTL=57 bytes=32 time=34ms TTL=57 bytes=32 time=34ms TTL=57 but if I ping the host server the same time, the reply time is normal, around 34ms - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list
[kvm-devel] Compile problem with GIT repo on Scientific Linux
Hi, I'm trying to install KVM using the git repos on Scientific Linux. The error occurs when I run make. The kvm-53 tarball works fine, but something is getting misconfigured when I run make -C kernel sync. This error doesn't occur on Fedora Core. I installed kernel-headers using yum in the standard way Has anyone experienced this problem with other RHEL clones like CentOS? Thanks, Cam [/usr/scratch/cam/new/kvm-userspace]$ make make -C kernel make[1]: Entering directory `/usr/scratch/cam/new/kvm-userspace/kernel' make -C /lib/modules/2.6.18-8.1.15.el5/build M=`pwd` $@ make[2]: Entering directory `/usr/src/kernels/2.6.18-8.1.15.el5-x86_64' CC [M] /usr/scratch/cam/new/kvm-userspace/kernel/svm.o In file included from /usr/scratch/cam/new/kvm-userspace/kernel/svm.c:27: include/asm/desc.h:17: error: redefinition of 'struct kvm_desc_struct' include/asm/desc.h:24: error: redefinition of 'struct n_desc_struct' include/asm/desc.h:31: error: redeclaration of enumerator 'GATE_INTERRUPT' /usr/scratch/cam/new/kvm-userspace/kernel/include/asm/desc_defs.h:27: error: previous definition of 'GATE_INTERRUPT' was here include/asm/desc.h:32: error: redeclaration of enumerator 'GATE_TRAP' /usr/scratch/cam/new/kvm-userspace/kernel/include/asm/desc_defs.h:28: error: previous definition of 'GATE_TRAP' was here include/asm/desc.h:33: error: redeclaration of enumerator 'GATE_CALL' /usr/scratch/cam/new/kvm-userspace/kernel/include/asm/desc_defs.h:29: error: previous definition of 'GATE_CALL' was here include/asm/desc.h:37: error: redefinition of 'struct gate_struct' include/asm/desc.h:51: error: redeclaration of enumerator 'DESC_TSS' /usr/scratch/cam/new/kvm-userspace/kernel/include/asm/desc_defs.h:47: error: previous definition of 'DESC_TSS' was here include/asm/desc.h:52: error: redeclaration of enumerator 'DESC_LDT' /usr/scratch/cam/new/kvm-userspace/kernel/include/asm/desc_defs.h:48: error: previous definition of 'DESC_LDT' was here include/asm/desc.h:56: error: redefinition of 'struct ldttss_desc' include/asm/desc.h:65: error: redefinition of 'struct kvm_desc_ptr' make[3]: *** [/usr/scratch/cam/new/kvm-userspace/kernel/svm.o] Error 1 make[2]: *** [_module_/usr/scratch/cam/new/kvm-userspace/kernel] Error 2 make[2]: Leaving directory `/usr/src/kernels/2.6.18-8.1.15.el5-x86_64' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/scratch/cam/new/kvm-userspace/kernel' make: *** [kernel] Error 2 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] [RFC] Expose host cpuid to guest
On Wed, 21 Nov 2007 09:36:31 pm Dan Kenigsberg wrote: These patches expose host CPU features (that are known to work under KVM) to guests. It makes a couple of benchmarks run faster, and generally gives kvm's user better info on its host. The kernel-space patch adds KVM_GET_SUPPORTED_CPUID ioctl to obtain the table of cpuid functions supported by the host. The user-space patch allows fine-tuning this table from the command-line. I had to define struct kvm_cpuid2, KVM_SET_CPUID2 etc., because cpuid functions are a little more complex than just function-value pairs. Dan. With current kvm-git (commit 51727a110220681f6f43b005d069e28c58f5d151) (userspace is current to commit 6a385c9539f9746d7ff51ef34c064c3eba86448b) and the userspace portion of this patch I cannot boot a 64 bit guest (Mandriva 2008 x64) on my AMD x2 without -cpu host. The guest kernel says Your CPU does not support long mode. Use a 32bit distribution.. Works fine without the userspace portion of the patch. With -cpu host, the 64bit kernel starts to boot then panics almost immediately: Code: 0f 30 e9 ed fc ff ff b8 66 00 00 00 f0 0f ab 45 08 e9 e2 fa RIP [8020ff99 identify_cpu+0x609/0x700 RSP 8057df58 Kernel panic - not syncing: Attempted to kill the idle task! In the host log I see: cpu0 unhandled wrmsr: 0xc0010015, which might not have anything to do with this patch of course :) Mike - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] kvm-53
Sorry to be late on reporting on kvm-53 release but I have had host hang and BSOD when running windows xp sp2 32-bit guest. I have had to revert to release 51 as I also have problems with release 52 (boot failure). My host does have flexpriority and details are as follows: Linux localhost.localdomain 2.6.23.1-21.fc7 #1 SMP Thu Nov 1 20:28:15 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux Output of /proc/cpuinfo processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz stepping: 10 cpu MHz : 2201.000 cache size : 4096 KB physical id : 0 siblings: 2 core id : 1 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm ida bogomips: 4387.70 clflush size: 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual Regards Haydn On Nov 21, 2007 3:01 PM, Alexey Eremenko [EMAIL PROTECTED] wrote: try with kvm-53! it do not even start to boot for me (actually i don't remember for the kvm-51 result but it may be worked with kvm-51). Tried, and you're right. It crashes right from start. Opened a bug report. We will look into this issue. http://sourceforge.net/tracker/index.php?func=detailaid=1835911group_id=180599atid=893831 -- -Alexey Eremenko Technologov - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel