Bug 984308 - Fedora 19 will not install to 512MB VM
Summary: Fedora 19 will not install to 512MB VM
Keywords:
Status: CLOSED DUPLICATE of bug 972547
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-14 17:34 UTC by Alex Williamson
Modified: 2014-02-20 23:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-20 23:01:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
anaconda-tb-dvzPtz (OSError: [Errno 12] Cannot allocate memory) (413.73 KB, text/plain)
2013-07-14 20:08 UTC, Steve Tyler
no flags Details
free memory at beginning of install (3.66 KB, image/png)
2013-07-14 21:03 UTC, Alex Williamson
no flags Details
kernel modules remaining after housecleaning (4.75 KB, image/png)
2013-07-14 21:05 UTC, Alex Williamson
no flags Details
free memory after housecleaning (5.78 KB, image/png)
2013-07-14 21:06 UTC, Alex Williamson
no flags Details
screenshot showing the installer requires 512 MB memory (8.47 KB, image/png)
2013-07-14 23:49 UTC, Steve Tyler
no flags Details

Description Alex Williamson 2013-07-14 17:34:32 UTC
Description of problem:
Attempting to install F19 to a KVM VPS (https://backupsy.com).  Note that at every price point the VM is provided with 512MB of RAM.  I'm attempting to use the network install image (http://download.fedoraproject.org/pub/fedora/linux/releases/19/Fedora/x86_64/iso/Fedora-19-x86_64-netinst.iso) and a minimal install and cannot find any incantation of making it through to begin the installation without anaconda dying.  I really want to eat our own dog food and support Fedora, but it's a shame that Fedora can't support a minimal server environment.


Version-Release number of selected component (if applicable):
F19

How reproducible:
100%

Steps to Reproduce:
1. Get a 512MB VM
2. Get an F19 ISO
3. Good luck trying to install it

Actual results:
Anaconda fails

Expected results:
Quick and easy installation

Additional info:
1G may be trivial to require on physical hardware, but requiring more than 512MB to make it through an install is sure to get Fedora sidelined from being a viable target for users on a VPS.  Can't the installation at least enable swap at the point where a disk is configured so that it can limp through the rest of the install?

Comment 1 Steve Tyler 2013-07-14 18:48:39 UTC
Confirmed. With 512 MB memory, a memory exception occurs almost immediately at "Preparing to install":

OSError: [Errno 12] Cannot allocate memory

There is not enough memory, apparently, to report a bug, however.

The installer is supposed to detect insufficient memory, so that is the bug here, IMO.

Tested with:
$ qemu-img create f19-test-2.img 12G
$ qemu-kvm -m 512 -hda f19-test-2.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-netinst.iso -vga std -boot menu=on

Default disk configuration and minimal install selected.

Comment 2 Steve Tyler 2013-07-14 19:07:37 UTC
Could you try again with the installer DVD?

With the installer DVD, 512 MB memory, and default disk partitioning, I successfully completed a minimal install, rebooted, logged in as root, completed a yum update, rebooted again, and logged in as root again.

BTW, the installer allocates 1 GB swap space by default when there is 512 MB memory. The installer uses swap during installation, but swap cannot be enabled before the disk has been configured.

Tested with:
$ qemu-img create f19-test-2.img 12G
$ qemu-kvm -m 512 -hda f19-test-2.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-DVD.iso -vga std -boot menu=on

Comment 3 Steve Tyler 2013-07-14 20:04:39 UTC
FYI, you can see how the installer is using memory by switching to the installer console (ctrl-alt-f2) and running "top". Press "M" to sort processes by memory usage.

Press ctrl-alt-f7 to get back to the installer GUI.

Comment 4 Steve Tyler 2013-07-14 20:08:52 UTC
Created attachment 773400 [details]
anaconda-tb-dvzPtz (OSError: [Errno 12] Cannot allocate memory)

anaconda 19.30.13-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/subprocess.py", line 1205, in _execute_child
    self.pid = os.fork()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/site-packages/blivet/util.py", line 39, in _run_program
    preexec_fn=chroot, cwd=root, env=env)
  File "/usr/lib/python2.7/site-packages/blivet/util.py", line 55, in run_program
    return _run_program(*args, **kwargs)[0]
  File "/usr/lib/python2.7/site-packages/blivet/udev.py", line 86, in udev_settle
    util.run_program(["udevadm", "settle", "--timeout=300"])
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 244, in processActions
    udev_settle()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 310, in doIt
    self.devicetree.processActions()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 169, in turnOnFilesystems
    storage.doIt()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 140, in doInstall
    turnOnFilesystems(storage, mountOnly=flags.flags.dirInstall)
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 168, in run
    threading.Thread.run(self, *args, **kwargs)
OSError: [Errno 12] Cannot allocate memory

Comment 5 Steve Tyler 2013-07-14 20:13:47 UTC
(In reply to Steve Tyler from comment #4)
> Created attachment 773400 [details]
> anaconda-tb-dvzPtz (OSError: [Errno 12] Cannot allocate memory)
...

Procedure:

Initialize a disk image and start the installer:
$ qemu-img create f19-test-2.img 12G
$ qemu-kvm -m 512 -hda f19-test-2.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-netinst.iso -vga std -boot menu=on

In this order:
1. Select minimal install.
2. Select default disk partitioning.
3. Begin Installation.

Examination from the console after the exception occurred shows that swap space had been created, but swapping on it had not been enabled.

Comment 6 Alex Williamson 2013-07-14 21:03:56 UTC
Created attachment 773423 [details]
free memory at beginning of install

Comment 7 Alex Williamson 2013-07-14 21:05:17 UTC
Created attachment 773424 [details]
kernel modules remaining after housecleaning

Comment 8 Alex Williamson 2013-07-14 21:06:56 UTC
Created attachment 773425 [details]
free memory after housecleaning

Comment 9 Alex Williamson 2013-07-14 21:17:07 UTC
The folks at Backupsy were kind enough to help me get past the low memory problem on their VMs, but I've spent a little more time trying to work around it on a local VM.  Using the full DVD ISO image does not reliably work around the problem for me.  Here's what I've found works:

1. Use the basic install option and add "cgroup_disable=memory selinux=0" to the command line.  I have not individually evaluated each of these, I generally use the former because I don't use memory cgroups, the latter I added because I see avc warnings/errors in dmesg in the installer and I assume selinux and userspace monitors are using some memory.

That gets me to the screenshot in comment 6.

2. 'modprobe -r' all unused kernel modules.  This includes, xfs, btrfs, iscsi, drm, floppy, fcoe, etc.  I was left with the list in comment 7 of things that I felt I probably shouldn't remove (virtio_balloon could also be removed).

This gets me to the screenshot in comment 8, which somehow show that I have even less free space, but I can now get through an install selecting the minimal package set and configuring a basic swap+/ on lvm disk setup.  You'll need to remove the selinux=0 option from the kernel commandline after install.

Comment 10 Alex Williamson 2013-07-14 21:28:21 UTC
Somewhat interesting, selinux=0 alone, no manually unloading modules, is enough to get me through the install.  I don't know if selinux is being particularly memory hungry or if we're just so close to the edge that disabling it is enough to get through.

Comment 11 Steve Tyler 2013-07-14 22:18:39 UTC
(In reply to Alex Williamson from comment #9)
...
> Using the full DVD ISO image does not reliably
> work around the problem for me.
...

Are you getting an exception dialog?
If so, what exception?

I'm asking, because I got a file system error exception when I forgot to reinitialize the disc image after an install failure. I haven't reproduced it, though ...

I've been rigorously initializing the disc image before each test install with:
$ qemu-img create f19-test-2.img 12G

Out of curiosity, does Backupsy guarantee an initialized disc image?

Comment 12 Steve Tyler 2013-07-14 23:49:56 UTC
Created attachment 773459 [details]
screenshot showing the installer requires 512 MB memory

(In reply to Steve Tyler from comment #1)
...
> The installer is supposed to detect insufficient memory, so that is the bug
> here, IMO.
...

Correcting myself. The installer does detect insufficient memory and says that 512 MB is required. See attached screenshot.

Tested with 256 MB memory:
$ qemu-img create f19-test-2.img 12G
$ qemu-kvm -m 256 -hda f19-test-2.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-DVD.iso -vga std -boot menu=on

Comment 13 Alex Williamson 2013-07-15 01:55:50 UTC
(In reply to Steve Tyler from comment #11)
> 
> Out of curiosity, does Backupsy guarantee an initialized disc image?

Meaning pre-allocated?  I don't see any wording that would make such a guarantee, but their support has been outstanding (in the <12hrs I've been a customer) and I'm sure they could tell you.  Feel free to contact me via email for further questions about their service or for a referral link.

Comment 14 Steve Tyler 2013-07-15 02:52:29 UTC
(In reply to Alex Williamson from comment #13)
> (In reply to Steve Tyler from comment #11)
> > 
> > Out of curiosity, does Backupsy guarantee an initialized disc image?
> 
> Meaning pre-allocated?
...

Meaning zero-filled, so the installer isn't trying to analyze random data or a previous user's file systems.

Comment 15 Alex Williamson 2013-07-15 03:11:10 UTC
(In reply to Steve Tyler from comment #14)
> (In reply to Alex Williamson from comment #13)
> > (In reply to Steve Tyler from comment #11)
> > > 
> > > Out of curiosity, does Backupsy guarantee an initialized disc image?
> > 
> > Meaning pre-allocated?
> ...
> 
> Meaning zero-filled, so the installer isn't trying to analyze random data or
> a previous user's file systems.

That seems like a pretty obvious security issue.  I don't know, I didn't look at the contents of the disk before trying to use it, but anaconda presented it as a fresh disk w/o partitions.

Comment 16 David Shea 2014-02-20 23:01:23 UTC

*** This bug has been marked as a duplicate of bug 972547 ***


Note You need to log in before you can comment on or make changes to this bug.