wojkxlq 发表于 2015-4-15 07:08:57

P2V Ubuntu 10.10 to VirtualBox Disk

  

http://askubuntu.com/questions/34802/p2v-ubuntu-10-10-to-virtualbox-disk
P2V Ubuntu 10.10 to VirtualBox Disk


up vote4down votefavorite
1share share share

  Is it possible to convert a Physical Ubuntu Install (Intel based PC with Ubuntu 10.10) to a virtual box disk, so that I can use that same environment on a separate pc or can keep it virtual for testing?
  Something similar to "Disk2VHD" which converts a physical Windows 2K3 and above box into a VHD or VMware image.
  Will be grateful for your assistance ! Kind Regards

virtualbox virtualization
linkimprove this question

asked Apr 13 '11 at 5:56

http://www.gravatar.com/avatar/39edc37fa755fe6b9896a980546562fe?s=32&d=identicon&r=PG
rihatum
30428

25% accept rate
feedback  



1 Answer

ACTIVEOLDESTVOTES

up vote1down voteaccepted
  Yes, however it will most likely take a very long time. I haven't actually tried the steps below, but they should work.
  First, you need to make an image of your entire partition. You need to know the partition path of the Ubuntu partition, for example /dev/sda1 would be the first partition on the first attached hard drive.
  sudo dd if=PART_PATH of=OUTPUT_PATH/ubuntu.bin
  note that you should do the above command from a liveCD with the partition you are trying to copy unmounted -- i.e. you need to have another hard drive or something to copy all the data to.
  You can shut the liveCD down and boot back into Ubuntu to perform the last step:
  Convert the binary into a vbox drive:
  VBoxManage convertdd PATH_TO_ubuntu.bin ubuntu.vdi --format VDI
  you can then use the resulting ubuntu.vdi as a Virtualbox drive. Just make sure you have plenty of time and hard drive space for this operation. A little tip: commandline tasks can be suspended by hitting The operation will go to sleep, and you can use you computer again. When you are interested in resuming the process, type fg in the terminal, and the operation will resume. Quite handy for long operations like this.
页: [1]
查看完整版本: P2V Ubuntu 10.10 to VirtualBox Disk