docker pull jigneshvasoya/vm:ubuntu-server-16.04
docker run -it jigneshvasoya/vm:ubuntu-server-16.04 /bin/bash
above command will start container, get its container id
docker export <id> > /tmp/vm-iamge.tar
fallocate kvm-vm-image.img -l8G
mkfs.ext4 kvm-vm-image.img
mount kvm-vm-image.img /tmp/mnt
tar xf kvm-vm-image.img -C /tmp/mnt
cp /tmp/mnt/vmlinuz /tmp/vmlinuz
cp /tmp/mnt/initrd.img /tmp/initrd.img
umount /tmp/mnt
create new VM using virt-manager and attach kvm-vm-image.img to the VM use direct kernl booting using kernle and initrd copied in previoys step (/tmp/vmlinuz, /tmp/initrd.img) kernel arguments: "root= ro quiet fastboot"
Content type
Image
Digest
Size
313.5 MB
Last updated
almost 10 years ago
docker pull jigneshvasoya/vm:14.04_base