Fedora Linux Support Community & Resources Center
  #1  
Old 13th June 2010, 05:00 AM
nyceyes Online
Registered User
 
Join Date: Jan 2009
Posts: 59
linuxfirefox
FC13: Migrating a KVM O/S image disk to a larger one - can't log in after it boots...


Hi Peers:

Using virt-manager on Fedora 13 (FC13), I installed an FC13 guest on an image disk.
Nothing special there. Even though I only installed the minimal distribution, it turns out
my 4GB image disk size would be too small once I started adding the software I needed.

So while the VM was shut down, I basically created and migrated the O/S from the 4GB disk
image to a 12GB disk image I manually created, using cpio(1). Sparing you the (elsewhere
well documented) process details to set this all up using dd(1), fdisk(1), mke2fs(1), losetup(1),
and kpartx(1), the actual copy part was accomplished as follows:

root# cd /mnt # this is where the 4GB source is mounted (read-only btw).
root# find . | cpio -pudm ../mnt2 # /mnt2 is where the 12GB dest is mounted r/w.
root#
root# blkid # (Inspect the output, and note the appropriate UUID's for the new disk image).
root# vi /mnt2/boot/grub/menu.lst # (Make adjustments to the UUID's on the kernel line).
root# vi /mnt2/etc/fstab # (Make adjustments to the UUID's for root and swap entries).
root# Here I install a GRUB sector onto the new disk image (details omitted because it worked).

Next I basically unmounted the filesystems, tore down all the temporary logical
(losetup and kpartx) device stuff for the image disks. So far so good.

Finally I rename the disk images so that the 12GB disk image assumes the expected name for
that VM that the KVM expects. The O/S was file-for-file transferred from the 4GB disk image to the
12GB disk image.

Ok: I boot the VM (using virt-manager). It boots clean, and gets to a login prompt.
However, when I attempt to log in via the console, as root, or as myself (non-root), the O/S
logs out immediately, and goes right back to the console login prompt. It does it so fast, that I
can make out what the issue is. It's almost as if it's having an issue with spawning a login
session/process.

So I'm guessing that, in addition to making post copy adjustments to the grub.conf and fstab
files (as indicated above), there must also be something else I need to do on the new image
to overcome this issue. Any thoughs?

Note I can't log in over the newtork yet (because I haven't set that up yet - recall that it's
a minimal install). So ... think Console. What file needs updating for console/login process
spawning?

Any ideas?
Thanks in advance.
NOEL



---------- Post added 2010-06-13 at 12:00 AM CDT ---------- Previous post was 2010-06-12 at 10:31 PM CDT ----------

SOLVED:

I figured it out. I had not disabled selinux in the source image yet and, while that didn't cause any login issues, it did after migrating to the larger disk image. The give away was the login error I received once I tried to log in via a network connection, as opposed to via the console. The message was "Unable to get valid context for root" (or for
whatever user you tried to log in as).

Once I disabled selinux (both in the /etc/selinux/config file, and also by passing the selinux=0 directive to the
kernel line of the grub.conf file), login's proceeded without issue.

Hope this help others.

NOEL
Reply With Quote
Reply

Tags
boots, disk, fc13, image, kvm, larger, log, migrating, o or s

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fc13 manual disk partitioning during installation sudheerd Installation, Upgrades and Live Media 4 5th June 2010 04:04 PM
LVM help replacing disk with larger disk Doug G Using Fedora 5 11th October 2006 08:48 AM
Migrating FC5 Default Install to Larger Hard Drive gadgetwiz EOL (End Of Life) Versions 14 2nd October 2006 02:33 AM


Current GMT-time: 00:00 (Monday, 22-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
...Durbarmarg Photos - Puerto de Tapia de Casariego Instagram Photos - Puri Padi Hotel Ubud Bali Travel Photos on Instagram - Los Angeles International Airport (Lax) Tom Bradley International Terminal - Cervinia