[PATCH] set-smp: limit the number of cpus below 255
From: Wanlong Gao <gaowanlong@cn.fujitsu.com> Limit the number of cpus below 255, since qemu can't support. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- src/guestfs.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/guestfs.c b/src/guestfs.c index 3607eaa..f5875e6 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -794,7 +794,10 @@ guestfs__get_pgroup (guestfs_h *g) int guestfs__set_smp (guestfs_h *g, int v) { - if (v >= 1) { + if (v > 255) { + error (g, "Unsupported number of smp cpus: %d", v); + return -1; + } else if (v >= 1) { g->smp = v; return 0; } else { -- 1.7.9
On Sat, Feb 25, 2012 at 10:02:20AM +0800, Wanlong Gao wrote:
From: Wanlong Gao <gaowanlong@cn.fujitsu.com> Limit the number of cpus below 255, since qemu can't support.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- src/guestfs.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/guestfs.c b/src/guestfs.c index 3607eaa..f5875e6 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -794,7 +794,10 @@ guestfs__get_pgroup (guestfs_h *g) int guestfs__set_smp (guestfs_h *g, int v) { - if (v >= 1) { + if (v > 255) { + error (g, "Unsupported number of smp cpus: %d", v); + return -1; + } else if (v >= 1) { g->smp = v; return 0; } else {
ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
Hi Rich: I can't find the binary packages for RHEL6 now, including febootstrap, Right? Thanks -Wanlong Gao
On Sat, Feb 25, 2012 at 10:02:20AM +0800, Wanlong Gao wrote:
From: Wanlong Gao <gaowanlong@cn.fujitsu.com> Limit the number of cpus below 255, since qemu can't support.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- src/guestfs.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/guestfs.c b/src/guestfs.c index 3607eaa..f5875e6 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -794,7 +794,10 @@ guestfs__get_pgroup (guestfs_h *g) int guestfs__set_smp (guestfs_h *g, int v) { - if (v >= 1) { + if (v > 255) { + error (g, "Unsupported number of smp cpus: %d", v); + return -1; + } else if (v >= 1) { g->smp = v; return 0; } else {
ACK.
Rich.
On 02/25/2012 11:44 PM, Wanlong Gao wrote:
Hi Rich:
I can't find the binary packages for RHEL6 now, including febootstrap, Right?
Sorry, I just find out them. http://people.redhat.com/~rjones/libguestfs-RHEL-6.2-preview/
Thanks -Wanlong Gao
On Sat, Feb 25, 2012 at 10:02:20AM +0800, Wanlong Gao wrote:
From: Wanlong Gao <gaowanlong@cn.fujitsu.com> Limit the number of cpus below 255, since qemu can't support.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> --- src/guestfs.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/guestfs.c b/src/guestfs.c index 3607eaa..f5875e6 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -794,7 +794,10 @@ guestfs__get_pgroup (guestfs_h *g) int guestfs__set_smp (guestfs_h *g, int v) { - if (v >= 1) { + if (v > 255) { + error (g, "Unsupported number of smp cpus: %d", v); + return -1; + } else if (v >= 1) { g->smp = v; return 0; } else {
ACK.
Rich.
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
On Sat, Feb 25, 2012 at 11:48:07PM +0800, Wanlong Gao wrote:
On 02/25/2012 11:44 PM, Wanlong Gao wrote:
Hi Rich:
I can't find the binary packages for RHEL6 now, including febootstrap, Right?
Sorry, I just find out them. http://people.redhat.com/~rjones/libguestfs-RHEL-6.2-preview/
Yup. There are going to be some updates this coming week. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
On Sat, Feb 25, 2012 at 04:09:20PM +0000, Richard W.M. Jones wrote:
On Sat, Feb 25, 2012 at 11:48:07PM +0800, Wanlong Gao wrote:
On 02/25/2012 11:44 PM, Wanlong Gao wrote:
Hi Rich:
I can't find the binary packages for RHEL6 now, including febootstrap, Right?
Sorry, I just find out them. http://people.redhat.com/~rjones/libguestfs-RHEL-6.2-preview/
Yup. There are going to be some updates this coming week.
Correction .. the link is wrong. For RHEL _6.3_ preview packages (which can be installed on 6.2), you'll be wanting this link: http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/ Read the README file first: http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/README.txt Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Hi Rich:
On Sat, Feb 25, 2012 at 04:09:20PM +0000, Richard W.M. Jones wrote:
On Sat, Feb 25, 2012 at 11:48:07PM +0800, Wanlong Gao wrote:
On 02/25/2012 11:44 PM, Wanlong Gao wrote:
Hi Rich:
I can't find the binary packages for RHEL6 now, including febootstrap, Right?
Sorry, I just find out them. http://people.redhat.com/~rjones/libguestfs-RHEL-6.2-preview/
Yup. There are going to be some updates this coming week.
Correction .. the link is wrong. For RHEL _6.3_ preview packages (which can be installed on 6.2), you'll be wanting this link:
http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
Read the README file first: http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/README.txt
Yes, I see, thanks a lot. but it seems hard to find out them, you maybe need to make a list for these package directories? Thanks -Wanlong Gao
Rich.
On 02/26/2012 09:44 AM, Wanlong Gao wrote:
Hi Rich:
On Sat, Feb 25, 2012 at 04:09:20PM +0000, Richard W.M. Jones wrote:
On Sat, Feb 25, 2012 at 11:48:07PM +0800, Wanlong Gao wrote:
On 02/25/2012 11:44 PM, Wanlong Gao wrote:
Hi Rich:
I can't find the binary packages for RHEL6 now, including febootstrap, Right?
Sorry, I just find out them. http://people.redhat.com/~rjones/libguestfs-RHEL-6.2-preview/
Yup. There are going to be some updates this coming week.
Correction .. the link is wrong. For RHEL _6.3_ preview packages (which can be installed on 6.2), you'll be wanting this link:
http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
Read the README file first: http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/README.txt
Yes, I see, thanks a lot. but it seems hard to find out them, you maybe need to make a list for these package directories?
I installed the febootstrap package from above url, then I met an error: [root@6u2 libguestfs-1.16.5]#./configure ... configure: error: febootstrap >= 3.0 must be installed, your version is too old [root@6u2 libguestfs-1.16.5]# rpm -qa febootstrap febootstrap-3.12-1.el6.x86_64 [root@6u2 libguestfs-1.16.5]# febootstrap febootstrap febootstrap3 febootstrap-install febootstrap-minimize febootstrap-run febootstrap-supermin-helper febootstrap-to-initramfs febootstrap-to-supermin [root@6u2 libguestfs-1.16.5]# febootstrap --version febootstrap: unrecognized option '--version' febootstrap: problem parsing the command line arguments
Thanks -Wanlong Gao
Rich.
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
On Sun, Feb 26, 2012 at 10:27:56AM +0800, Wanlong Gao wrote:
I installed the febootstrap package from above url, then I met an error: [root@6u2 libguestfs-1.16.5]#./configure ... configure: error: febootstrap >= 3.0 must be installed, your version is too old
Have a look at the libguestfs .src.rpm in that directory. It sets the FEBOOTSTRAP=febootstrap3 variable before running ./configure, amongst other things. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On 02/26/2012 06:22 PM, Richard W.M. Jones wrote:
On Sun, Feb 26, 2012 at 10:27:56AM +0800, Wanlong Gao wrote:
I installed the febootstrap package from above url, then I met an error: [root@6u2 libguestfs-1.16.5]#./configure ... configure: error: febootstrap >= 3.0 must be installed, your version is too old
Have a look at the libguestfs .src.rpm in that directory. It sets the FEBOOTSTRAP=febootstrap3 variable before running ./configure, amongst other things.
But it seems that source packages (.tar.gz) doesn't do like this, so makes hard to compile source packages on RHEL6 for other users. Right? Thanks -Wanlong Gao
Rich.
On Sun, Feb 26, 2012 at 09:47:36PM +0800, Wanlong Gao wrote:
On 02/26/2012 06:22 PM, Richard W.M. Jones wrote:
On Sun, Feb 26, 2012 at 10:27:56AM +0800, Wanlong Gao wrote:
I installed the febootstrap package from above url, then I met an error: [root@6u2 libguestfs-1.16.5]#./configure ... configure: error: febootstrap >= 3.0 must be installed, your version is too old
Have a look at the libguestfs .src.rpm in that directory. It sets the FEBOOTSTRAP=febootstrap3 variable before running ./configure, amongst other things.
But it seems that source packages (.tar.gz) doesn't do like this, so makes hard to compile source packages on RHEL6 for other users.
Right?
It's true that the upstream source packages don't automatically search for 'febootstrap3', but I don't think this is a problem since that is a RHEL 6 peculiarity, and it's easily worked around using FEBOOTSTRAP=febootstrap3. There are several other non-upstream changes that we (Red Hat) make in RHEL, such as including the old virt-inspector and removing unsupported features. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
participants (3)
-
Richard W.M. Jones -
Wanlong Gao -
Wanlong Gao