
"Įcho " you need ssh and sudo privileges on that host"Įcho " device: the disk to dump from e.g. Qemu-img convert -p -O vmdk "$l_ddimage" "$l_vmwareimage"Įcho " host: the host to get the disk dump from e.g.

# convert to VMware disk format showing progess "Įcho "converting dd image $l_image to vmware $l_vmwareimage" "Įcho "installing $l_package to make $l_command available. # optionally install command from package if it is not available yetĮcho "checking that $l_command from package $l_package is installed. Ssh $l_host "sudo dd if=/dev/$disk bs=1M | gzip -1 -" | pv | dd of=$l_target Ssh $l_host sudo fdisk -l | egrep "^/dev/$l_disk"Įcho "device $l_disk does not exist on host $l_host" 1>&2 # get a dd dump from the given host's given disk and create a compressedĮcho "getting disk dump of $l_disk from $l_host"

# get a dd disk dump and convert it to vmware 20 minutes to unpack to a 60 GByte dd file.3 hours to get a 47 GByte disk dump of a 60 GByte partition.In my environment 2 x Ubuntu 12.04 LTS the steps took: It also uses pv and qemu-img -p to show the progress of each step. The script is restartable and checks the existence of the intermediate files. get the dd dump via ssh from a remote server (as gz file).Krosenvold's answer inspired the following script which does the following: 1 root root 0 Apr 5 17:13 'Test file.txt' sudo losetup -o $((63*512)) loop4 usbdrv.img In the command below I used loop4 because it was the first available loop device in my case. Take note of the start position of the partition: 63.

Now we need to create a virtual device that references the partition.

First dismount it from the guest OS to be sure and remove it from the virtual machine. You might want to access your files on Linux. Use FAT for small volumes, FAT32 or NTFS for large volumes.
