Re: [qubes-users] VMWare vmdk converted to raw image - Will Not Boot (Windows or Linux)

2018-08-16 Thread joeviocoe
On Wednesday, 15 August 2018 06:52:02 UTC-4, awokd  wrote:

> 
> > $ 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
> 
> How large is the root created when you use this method? Default is only
> 10GB, but both your images are much larger. Try manually creating the HVM
> without the copy, resizing the root volume to match the raw size, then
> "copy Win10.raw /dev/mapper/qubes_dom0-vm--Win10--root".

Yes.  Thank you.  That did it.

Set the system storage max size to greater than the filesytem size of the raw 
image.
dd if=Win10.raw of=/dev/mapper/qubes_dom0-vm--Win10--root

Now both boot.
 
I guess system storage should be a pref option in qvm-create, so we can still 
use --root-copy-from.  Or, better yet, determine size automatically and prompt 
the user to accept the larger storage size.

-- 
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/6e3978e1-82bc-4394-8d56-8655b4987181%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] VMWare vmdk converted to raw image - Will Not Boot (Windows or Linux)

2018-08-15 Thread 'awokd' via qubes-users
On Tue, August 14, 2018 5:03 am, joevio...@gmail.com wrote:

> $ 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

How large is the root created when you use this method? Default is only
10GB, but both your images are much larger. Try manually creating the HVM
without the copy, resizing the root volume to match the raw size, then
"copy Win10.raw /dev/mapper/qubes_dom0-vm--Win10--root".

-- 
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/9ff53bd8c548016da797b26903b13272.squirrel%40tt3j2x4k5ycaa5zt.onion.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] VMWare vmdk converted to raw image - Will Not Boot (Windows or Linux)

2018-08-13 Thread Michael MENG
I did that before on win7 and qubes3.2, but i use qemu for windows to convert 
to raw, its smooth, just qwt i dont like it shown test mode.

-- 
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/e16d078a-34cb-41df-9767-00de2bc838f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] VMWare vmdk converted to raw image - Will Not Boot (Windows or Linux)

2018-08-13 Thread joeviocoe
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.