Hi Would you give me a comment on this patch? If not, please apply it. Thanks, Masayuki Sunou. In message <200706011008.FEF69245.K9GE7N32@xxxxxxxxxxxxxxxxx> "[et-mgmt-tools] [PATCH] Fix memory check in interactive mode" "Masayuki Sunou <fj1826dm@xxxxxxxxxxxxxxxxx>" wrote: > Hi > > When memory is interactively input to virt-install, memory is not checked. > > ------------------------------------------------------------ > # virt-install --name TEST --hvm > How much RAM should be allocated (in megabytes)? 1 > What would you like to use as the disk (path)? > ------------------------------------------------------------ > > This patch fixes it. > > > Signed-off-by: Masayuki Sunou <fj1826dm@xxxxxxxxxxxxxxxxx> > > Thanks, > Masayuki Sunou. > > ------------------------------------------------------------------------------- > diff -r 7fd35e3303c6 virt-install > --- a/virt-install Fri May 25 10:49:47 2007 -0400 > +++ b/virt-install Thu May 31 10:49:20 2007 +0900 > @@ -87,14 +87,14 @@ def get_name(name, guest): > > def get_memory(memory, guest): > while 1: > - memory = prompt_for_input("How much RAM should be allocated (in megabytes)?", memory) > - if memory < MIN_RAM: > - print "ERROR: Installs currently require %d megs of RAM." %(MIN_RAM,) > - print "" > - memory = None > - continue > - try: > - guest.memory = int(memory) > + try: > + memory = int(prompt_for_input("How much RAM should be allocated (in megabytes)?", memory)) > + if memory < MIN_RAM: > + print "ERROR: Installs currently require %d megs of RAM." %(MIN_RAM,) > + print "" > + memory = None > + continue > + guest.memory = memory > break > except ValueError, e: > print "ERROR: ", e > ------------------------------------------------------------------------------- > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/et-mgmt-tools >