How to convert VMDK to a Docker image


qemu-img convert -f vmdk -O raw MyImage-disk1.vmdk myimage.img

Next, After the raw has been created you can apply Guestfish:

$ guestfish -a myimage.img –ro

$ ><fs> run

$ ><fs> list-filesystems 

/dev/sda1: ext4

/dev/VolGroup/lv_root: ext4

/dev/VolGroup/lv_swap: swap

$ ><fs> mount /dev/VolGroup/lv_root /

$ ><fs> tar-out / – | xz –best >>  myimage.xz

$ ><fs> exit

Now, Importing myimage.xz into docker:

$ cat mytry.xz | docker import – mydockerimage

Next, Look inside the container:

$ docker run -it mydockerimage bash

댓글 남기기

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin