Difference between revisions of "VMware"
imported>Pew (Replaced content with "Category:Pending deletion") |
(Undo revision 2373 by [[Special:Contributions/imported>Pew|imported>Pew]] ([[User talk:imported>Pew|talk]])) (Tag: Undo) |
||
Line 1: | Line 1: | ||
− | [[Category: | + | '''VMware''' is a proprietary virtualization brand. Their popularity is probably due to their early start in the field of virtualization and cross-platform host capabilities. [[VirtualBox]] and [[QEMU]] are [[free software]] alternatives to VMware. |
+ | |||
+ | =Converting to VDI= | ||
+ | Follow the instructions in the [[VirtualBox#Converting_a_Flat_VMDK_to_a_VDI|VirtualBox article]] to convert a flat (raw) image into VirtualBox's virtual desktop image format. | ||
+ | |||
+ | =Cracking Open VMDK Images with DD= | ||
+ | The <code>dd</code> utility can be used to crack open a <code>-flat.vmdk</code> file. | ||
+ | |||
+ | ==Offset and Length Information== | ||
+ | To get the offset and length of each partition, run the <code>file</code> command it. | ||
+ | |||
+ | <pre> | ||
+ | $ file Red\ Hat\ Enterprise\ Linux\ 4-flat.vmdk Red Hat Enterprise Linux 4-flat.vmdk: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, boot drive 0x80, 1st sector stage2 0xac03f, GRUB version 0.94; partition 1: ID=0x83, active, starthead 1, startsector 63, 5526297 sectors; partition 2: ID=0x82, starthead 0, startsector 5526360, 530145 sectors; partition 3: ID=0x83, starthead 0, startsector 6056505, 224910 sectors, code offset 0x48 | ||
+ | </pre> | ||
+ | |||
+ | If you're dealing with Linux partitions, look for IDs of 0x83. 0x82 is Linux swap. Partition one generally begins at offset 63, but in this example, you can see a second partition at offset 6056505. The sector sizes are in multiples of 512 bytes. | ||
+ | |||
+ | ==Dumping the Partitions== | ||
+ | The key components of the <code>dd</code> command are the <code>skip</code> and <code>count</code> settings. They are, respectively, the offset and length of the data to copy, copied from the information given by the <code>file</code> command. | ||
+ | |||
+ | The following will dump the root partition. | ||
+ | <pre> | ||
+ | $ dd if=Red\ Hat\ Enterprise\ Linux\ 4-flat.vmdk of=~/centosroot.img skip=63 count=5526297 | ||
+ | </pre> | ||
+ | |||
+ | The other partition in this example was the <code>/home</code> partition. Since it was at the end of the file, the <code>count</code> variable was left unspecified. The partition was extracted with the following line. | ||
+ | <pre> | ||
+ | $ dd if=Red\ Hat\ Enterprise\ Linux\ 4-flat.vmdk of=~/centoshome.img skip=6056505 bs=512 | ||
+ | </pre> | ||
+ | |||
+ | ==Mounting the Partitions== | ||
+ | Mounting images on Linux is relatively straightforward. | ||
+ | |||
+ | <pre> | ||
+ | # mount -o loop /home/user/centosroot.img /mnt/mymountpoint | ||
+ | # mount -o loop /home/user/centoshome.img /mnt/mymountpoint/home | ||
+ | </pre> | ||
+ | |||
+ | You may need specify the filesystem type, i.e. <code>-t ext3</code>. Also, if you're having trouble mounting, it might be possible that you got the parameters wrong or potentially just got a bad copy. Try again to see if that's the case. | ||
+ | |||
+ | [[Category:Software]] | ||
+ | [[Category:Campus computing resources]] | ||
+ | [[Category:Howtos]] |
Revision as of 06:49, 4 January 2019
VMware is a proprietary virtualization brand. Their popularity is probably due to their early start in the field of virtualization and cross-platform host capabilities. VirtualBox and QEMU are free software alternatives to VMware.
Contents
Converting to VDI
Follow the instructions in the VirtualBox article to convert a flat (raw) image into VirtualBox's virtual desktop image format.
Cracking Open VMDK Images with DD
The dd
utility can be used to crack open a -flat.vmdk
file.
Offset and Length Information
To get the offset and length of each partition, run the file
command it.
$ file Red\ Hat\ Enterprise\ Linux\ 4-flat.vmdk Red Hat Enterprise Linux 4-flat.vmdk: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, boot drive 0x80, 1st sector stage2 0xac03f, GRUB version 0.94; partition 1: ID=0x83, active, starthead 1, startsector 63, 5526297 sectors; partition 2: ID=0x82, starthead 0, startsector 5526360, 530145 sectors; partition 3: ID=0x83, starthead 0, startsector 6056505, 224910 sectors, code offset 0x48
If you're dealing with Linux partitions, look for IDs of 0x83. 0x82 is Linux swap. Partition one generally begins at offset 63, but in this example, you can see a second partition at offset 6056505. The sector sizes are in multiples of 512 bytes.
Dumping the Partitions
The key components of the dd
command are the skip
and count
settings. They are, respectively, the offset and length of the data to copy, copied from the information given by the file
command.
The following will dump the root partition.
$ dd if=Red\ Hat\ Enterprise\ Linux\ 4-flat.vmdk of=~/centosroot.img skip=63 count=5526297
The other partition in this example was the /home
partition. Since it was at the end of the file, the count
variable was left unspecified. The partition was extracted with the following line.
$ dd if=Red\ Hat\ Enterprise\ Linux\ 4-flat.vmdk of=~/centoshome.img skip=6056505 bs=512
Mounting the Partitions
Mounting images on Linux is relatively straightforward.
# mount -o loop /home/user/centosroot.img /mnt/mymountpoint # mount -o loop /home/user/centoshome.img /mnt/mymountpoint/home
You may need specify the filesystem type, i.e. -t ext3
. Also, if you're having trouble mounting, it might be possible that you got the parameters wrong or potentially just got a bad copy. Try again to see if that's the case.