我有一个现有的 Centos 5 安装。我想升级到 Ubuntu。问题是,我不想停机太久,因为整个环境需要迁移 - 安装软件、配置连接等。我想一步一步来。
但我真的不想在新操作系统和旧操作系统之间来回重启。上次我升级到新操作系统时就是这样做的,结果很快就过时了。
因此,由于我的新 MB 已准备好进行虚拟化(AMD Phenom II 945 四核),我认为我可以在新操作系统安装下创建一个运行旧操作系统安装的虚拟机。
The problem is that the documentation I've been able to find has been pretty sparse. I've found a lot of possibilities, and little info on which would be capable of doing what I want.
I have a new Ubuntu 9.10 installation, and a second disk containing the Centos 5 installation. And I don't know where to go next.
Any help would be appreciated.
答案1
Setting up a virtual environment is possible, but may not be what you need. If you really want it, look into VMware's converter to read the Centos disk and create a VM, then use VMPlayer to run that VM under Ubuntu. I've found these tools to be pretty easy to use.
VMware converter will read the disk and create a new disk image file - this means you need to have a place big enough to put this disk image. However, I believe it is also possible to create a VM that uses the physical disk image, I just haven't used VMPlayer this way myself.
Since you say you have these on separate disks, I'm assuming you mean you have two harddrives, one with Ubuntu and one with Centos. Why not just make sure both disks are plugged in and running?
With Ubuntu running as the boot disk, create a mount point mkdir /centos
, mount the disk there with something like mount /dev/sdb1 /centos
and look for any info you need on the Centos disk. To make that permanent, add a line to /etc/fstab something like
/dev/sdb1 /centos ext3 defaults 1 2
Most of the system info you want will be under /centos/etc, and you should be able to use your existing Centos disk /centos/home/ as your login directory, so you don't even need to copy your home directory to the new disk.
答案2
If you feel confident, you can try VirtualBox with raw disk support. This should leave your system on a separate partition/drive intact. However, I'm not sure how your system would react to switching back and forth between virtualized and normal boot. Windows could probably freak out here. ;-)
答案3
KVM is really good for non-graphical VM's. VMWare is a pain these days in Linux IMHO. I've switched to VirtualBox and have been happy running various VM's (including Windows 7) on Ubuntu AMD64 9.10 and 9.04 installs.