I am trying to import a CentOS 5.4 guest VM that someone else is making with VMware, and they are using IDE virtual harddisks. I have successfully imported their VMDK files into a VirtualBox guest VM, using IDE, but would like to see if switching over to SATA or SCSI will improve performance. One would think it will. I'd like to try SATA first.
The guest uses one big VMDK for all the partitions. And so trying to leave the /boot partition as IDE is less than trivial. From what I can tell, I need to edit the /etc/modules.conf file to include more modules such as:
scsi_mod
sd_mod
libata
ata_piix
and then rerun mkinitrd so that the SATA modules are loaded from the ramdisk. I have tried that, but I get errors to the effect it cannot find the root filesystem, as if it did not include the right SATA modules in the initramdisk.
Yes, it is using an initramdisk to boot, with GRUB. It is pointing to the right ramdisk image.
The /etc/fstab file references the filesystems by LABEL=, as opposed to /dev/hd* style paths, but I intend to see if changing to /dev/sd* or even UUID= might fix this. I doubt it.
Does anyone know the magic set of modules that need to go into the initramdisk from Linux kernel 2.6.18-164.10.1.el5.centos.plus? I kind of think I am not using the right set.
Convert Linux Guest from VMWare+IDE to VirtualBox+SATA
-
gregdavisfromnj
- Posts: 14
- Joined: 13. Oct 2009, 16:49
- Primary OS: MS Windows Vista
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: lots
-
gregdavisfromnj
- Posts: 14
- Joined: 13. Oct 2009, 16:49
- Primary OS: MS Windows Vista
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: lots
[solved] Convert Linux Guest from VMWare+IDE to VirtualBox+S
Well, my misconception about mkinitrd was that it forced the inclusion of all modules listed in /etc/modules.conf into the initramdisk image. I had to make that file, btw, so it might not even be looking at it at all.
Using the -v option to mkinitrd showed a bunch of "Adding module xyz" output. Missing there was any mention of ahci, even though it was listed in /etc/modules.conf. So to force the inclusion of ahci, I had to send mkinitrd a --with=ahci option. This is necessary because the root device is mounted on an IDE channel while I am executing mkinitrd, and with good intentions, mkinitrd wants to preserve the currently running setup (which happens to be IDE). Instead, I specifically want to use the AHCI module appropriately named "ahci" because before the next bootup I am going to switch the storage from an IDE to SATA channel.
So for anyone else trying this maneuver (which is me 6 mos from now when I forget what I did, and google this), just get the Guest system running with IDE, update the kernel, and run this as root-user:
mkinitrd -v -f --with=ahci /boot/initfile.img kernel-version-x.y.z
and adapt for proper path and kernel version of course. Who knows if this works the same way on other distros that use mkinitramfs or something other than mkinitrd.
Using the -v option to mkinitrd showed a bunch of "Adding module xyz" output. Missing there was any mention of ahci, even though it was listed in /etc/modules.conf. So to force the inclusion of ahci, I had to send mkinitrd a --with=ahci option. This is necessary because the root device is mounted on an IDE channel while I am executing mkinitrd, and with good intentions, mkinitrd wants to preserve the currently running setup (which happens to be IDE). Instead, I specifically want to use the AHCI module appropriately named "ahci" because before the next bootup I am going to switch the storage from an IDE to SATA channel.
So for anyone else trying this maneuver (which is me 6 mos from now when I forget what I did, and google this), just get the Guest system running with IDE, update the kernel, and run this as root-user:
mkinitrd -v -f --with=ahci /boot/initfile.img kernel-version-x.y.z
and adapt for proper path and kernel version of course. Who knows if this works the same way on other distros that use mkinitramfs or something other than mkinitrd.
-
ylee
- Posts: 1
- Joined: 22. May 2010, 19:37
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: CentOS
Re: Convert Linux Guest from VMWare+IDE to VirtualBox+SATA
I had a very similar situation, except that the formerly-VMware VM used SCSI disks, not IDE. The mkinitrd command permitted the system to boot after adding a SATA controller to the configuration and attaching the hard disk to it. The mkinitrd command is only needed once; future kernel installations will automatically add in the AHCI module. I also did not have to make any changes to /etc/modules.conf.