hatching / vmcloak

Automated Virtual Machine Generation and Cloaking for Cuckoo Sandbox.
483 stars 120 forks source link

v0.2.5 build ISO and start VM but don't install W7 #33

Closed jhg closed 8 years ago

jhg commented 9 years ago

I install with pip version 0.2.5 and I do:

vboxmanage list hostonlyifs
vboxmanage hostonlyif create
vboxmanage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
sudo mkdir /mnt/w7
sudo mount -o loop,ro /home/jhg/Win_7_32Bit.iso /mnt/win7
mkdir ~/vms
mkdir ~/vms-data
vmcloak-vboxnet0
vmcloak --win7 --serial-key ONE00-FAKE0-KEY00-IT000-IS000 --vm-dir ~/vms/ --data-dir ~/vms-data/ --iso-mount /mnt/win7 --hostonly-ip 192.168.56.101 --hdsize 61440 --no-hwvirt --no-register-cuckoo --vm-visible w7

Then vmcloak run:

Warning: creating filesystem that does not conform to ISO-9660.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
INFO:vmcloak:Starting the Virtual Machine 'w7' to install Windows.
INFO:vmcloak:Waiting for the Virtual Machine 'w7' to connect back, this may take up to 30 minutes.

The VM start but only show first screen of Windows installation and not do more. In terminal, not do more, only wait more that 30 minutes and only wait but not continue installation.

With nmap I show that VM not has IP but in preferences I has DHCP enable in vboxnet0:

nmap 192.168.56.0/24 -p80-65000

Starting Nmap 6.40 ( http://nmap.org ) at 2015-07-08 14:57 WEST
Nmap scan report for 192.168.56.1
Host is up (0.00040s latency).
Not shown: 64920 closed ports
PORT     STATE SERVICE
16705/tcp open  unknown

Nmap done: 254 IP addresses (1 host up) scanned in 66.04 seconds

Only show this screen: captura de pantalla de 2015-07-08 15 10 34

baufrecht commented 9 years ago

Hi,

can you check what happens if you change the IMAGE/NAME value in the autounattend.xml file so that it matches the windows key you are using.

    <Key>/IMAGE/NAME</Key>
    <Value>Windows 7 HOMEBASIC</Value>

For example replace it with "Windows 7 Ultimate" if you using a Ultimate licence key.

File to change: https://github.com/jbremer/vmcloak/blob/master/vmcloak/data/win7/autounattend.xml

If you installed vmcloak via a recent pip version just run "pip show vmcloak" and navigate to the install path of the module and then just grep for the filename in there.

Also what happens if you simply press "Next" in this dialog screen after choosing the right windows version. Does the installation continue without any further errors?

jalewis commented 8 years ago

I had this same issue, my version is Windows 7 Professional. I made the following change to autounattend.xml and it completed the install without stopping on the version selection screen.

 <Key>/IMAGE/NAME</Key>
 <Value>Windows 7 Professional</Value>
jhg commented 8 years ago

Thanks for help me, I will go to try it and comment here if work with that. :D

ezeteze commented 8 years ago

Hello all, i have the same issue with a Windows 7 Professional ISO. I did try the suggestion of @jalewis but it still get stuck at the version selection screen. I will try with a home basic ISO and report back.

ezeteze commented 8 years ago

So after trying with a different image i noticed the same thing. Then i checked that the process architecture is set to amd64 while i was using an x86 image. So i changed processorArchitecture="amd64" to processorArchitecture="x86" and it moved on. I think when selecting the --win7 option it should choose a different xml specific to x86. BR.

jbremer commented 8 years ago

Yeah :-) Did your solution work for your ISO (changing amd64 to x86)? If so, feel free to do a PR for the related functionality of deciding between 32-bit and 64-bit :-) Or probably can get quite far just replacing all amd64 with something like %PLATFORM% and replacing that afterwards.

jbremer commented 8 years ago

I have finally implemented the necessary logic for this issue as started by @jhg. Closing it as fixed. Please reopen if any issues arise. @ezeteze At this point 32-bit Windows 7 support is not yet high on the todo list. Please feel free to open a new issue if you're still interested in that functionality, although I'd simply suggest to get a 64-bit Windows 7 ISO.