professionalsvur.blogg.se

Virtualbox guest
Virtualbox guest







One of the minor annoyances of VirtualBox when compared to VMware is that update method for Guest Additions (known as VMware tools). Unfortunately at this point I could not get the Amazon Linux kernel to boot inside VirtualBox.Having shown how to setup VirtualBox Guest Additions on Windows, it is now time to see how to update VirtualBox Guest Additions on Windows guests. Now just create a VirtualBox VM with the vmdk image mounted as the primary boot device.

virtualbox guest

$ mount -t ext4 /dev/loop2 /mnt/loop/2 # mount ami-imageĪnd install Grub: $ cp /usr/lib/grub/x86_64-pc/stage* /mnt/loop/1/boot/grub/Īnd unmount the device ( umount /dev/loop1) and convert the raw disk image to a vmdk image: $ qemu-img convert -f raw -O vmdk vmdk-image.raw final.vmdk $ mount -t ext4 /dev/loop1 /mnt/loop/1 # mount vmdk-image $ mkdir -p /mnt/loop/1 /mnt/loop/2 # create mount points Now you need to copy everything from the EC2 image to the empty image: $ losetup -fv ec2-image.raw

virtualbox guest

$ fdisk -l -u /dev/loop0 # get the size of the partition $ losetup -fv -o 32256 vmdk-image.raw # mount the partition with an offset $ cfdisk /dev/loop0 # create a bootable partition, write, and quit $ losetup -fv vmdk-image.raw # mount as loopback device Then copy the running system to a local disk image: $ ssh -i ~/.ec2/your_key 'dd if=/dev/xvda1 bs=1M | gzip' | gunzip | dd of=./ec2-image.rawĪfter that prepare a filesystem on a new image file: $ dd if=/dev/zero of=vmdk-image.raw bs=1M count=10240 # create a 10gb image file $ sudo /etc/init.d/sshd reload # optional command */PermitRootLogin without-password/' /etc/ssh/sshd_config

virtualbox guest

So basically you need to enable root SSH access, e.g. The link points toward the following page: How to convert EC2 AMI to VMDK for Vagrant. I'm just adding this answer to make it more clear because the answer is link to in an anchor tag too. I just wanted to note that answered this question in the first comment to the original question.









Virtualbox guest