I have to work with VMWare images often, so I would like them to be run in
Qubes.
They gave me a Windows 10 and a Kali vmware virtual machines.
Many people, including myself, have tested these as working in VMWare Player.
There isn't a problem with the source.
The vmx files only points to the images I am converting, so I don't think I am
missing something there.
-
$ file C-Drive.vmdk
C-Drive.vmdk: VMware4 disk image
$ qemu-img info C-Drive.vmdk
image: C-Drive.vmdk
file format: vmdk
virtual size: 100G (107374182400 bytes)
disk size: 13G
cluster_size: 65536
Format specific information:
cid: 1024382763
parent cid: 4294967295
create type: monolithicSparse
extents:
[0]:
virtual size: 107374182400
filename: C-Drive.vmdk
cluster size: 65536
format:
$ qemu-img convert -f vmdk C-Drive.vmdk -O raw Win10.raw
$ file Win10.raw
Win10.raw: DOS/MBR boot sector MS-MBR Windows 7 english at offset 0x163
"Invalid partition table" at offset 0x17b "Error loading operating system" at
offset 0x19a "Missing operating system", disk signature 0x8d1c10fa; partition 1
: ID=0x7, active, start-CHS (0x0,32,33), end-CHS (0x3ff,254,63), startsector
2048, 209711104 sectors
$ qemu-img info Win10.raw
image: Win10.raw
file format: raw
virtual size: 100G (107374182400 bytes)
disk size: 12G
$ sudo fdisk -l Win10.raw
Disk Win10.raw: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8d1c10fa
Device Boot Start End Sectors Size Id Type
Win10.raw1 * 2048 209713151 209711104 100G 7 HPFS/NTFS/exFAT
--
$ qvm-create --verbose Win10 --class StandaloneVM --property virt_mode=hvm
--property kernel='' --property memory=4096 --property maxmem=4096 --label=red
--root-copy-from Win10.raw
When I start the VM... it boots to the Windows "Diagnostics" menu, and any
attempts to fix/repair fail.
I have tried booting this VM to a Windows 10 iso to see if it could repair it
too, no luck.
==
The Kali VM is similar, in that it will not boot using this convert to raw
method. It boots to the grub rescue menu.
The only difference between Kali and Windows VMware, is that Kali disk was
split into a span of 8 vmdk's. But qemu-img does create a single raw image as
expected.
$ qemu-img convert -f vmdk *.vmdk -O raw Kali.img
$ qemu-img info Kali.img
image: Kali.img
file format: raw
virtual size: 60G (64424509440 bytes)
disk size: 19G
$ file Kali.img
Kali.img: DOS/MBR boot sector; partition 1 : ID=0x82, active, start-CHS
(0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 123179008, 2648064 sectors
$ sudo fdisk -l Kali.img
Disk Kali.img: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaaea4a6f
Device Boot Start End Sectors Size Id Type
Kali.img1 *123179008 125827071 2648064 1.3G 82 Linux swap / Solaris
I've tried qvm-start with hddisk and cdrom option. No luck there.
I've tried using VMWare's "ovftool" to package the vm, tar extract the single
new vmdk, then convert to raw.
I've tried converting to qcow2.
And tried running "testdisk" to find and fix MBR and partition tables.
I can mount the images to view the file systems if I want. But somewhere in
the conversion (qemu-img) or the VM creation (qvm-create ... root-copy-from),
the MBR or partitioning gets screwed up and cannot boot. I need to boot and
run these VMs.
But I am lost. It would seem straight forward, as everywhere I look on the
internet, converting to raw is pretty easy and should work in Qubes 4.
--
You received this message because you are subscribed to the Google Groups
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/qubes-users/aeab97c6-4bab-46f5-bea9-6feb15d4eb58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.