Re: Re[2]: Migrate from real server to virtual

2018-02-28 Thread Rodney W. Grimes
>  --- Original message ---
>  From: "Peter Grehan" 
>  Date: 27 February 2018, 20:40:52
>   
> 
> 
> > > But I think the bigger problem is that this is an MBR disk
> > > with Windows 7 in it, I
> > > do not believe that bhyve can run Windows 7 at this time.

So let me correct that statement with the new information.
I do not believe that bhyve can run an MBR Windows 7 install
at this time, as that would indicated the install is not UEFI
bootable, and we can only boot Windows 7 64 bit in EFI mode.

> > 
> > Bhyve has been able to run Win7 since 2015, though x64 only and in 
> > UEFI mode.
> > 
> 
> Yes, Windows 7 is from the same "brunch" as Windows 2008. And I
> think my problem is that hardware server has been installed
> without UEFI, just in Legacy mode.
> So, in this situation it is unable run this server in Bihyve with UEFI.
> 
> Am I right?

Yes, I do believe that is the correct conclusion to your current situation.
The other part that could be at issue here is if this is a 32bit or 64bit
version of windows.  As Peter stated only 64 bit windows in UEFI mode.

It might be possible to create a shim drive that has the Windows UEFI boot
code on it, and set that shim drive up to load the copy of windows from
your image file.

This would be a experiment that might lead to a booting VM.
It may also be possible to remove the legacy bootmgr files
from the disk0.img and add the needed uefi files, I gave
some commands in a prior email that would allow you to mount
this disk on the FreeBSD system to facilitate this type of
work.

-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re[2]: Migrate from real server to virtual

2018-02-27 Thread wishmaster


 
 --- Original message ---
 From: "Peter Grehan" 
 Date: 27 February 2018, 20:40:52
  


> > But I think the bigger problem is that this is an MBR disk with Windows 7 
> > in it, I
> > do not believe that bhyve can run Windows 7 at this time.
> 
> Bhyve has been able to run Win7 since 2015, though x64 only and in 
> UEFI mode.
> 

Yes, Windows 7 is from the same "brunch" as Windows 2008. And I think my 
problem is that hardware server has been installed without UEFI, just in Legacy 
mode.
So, in this situation it is unable run this server in Bihyve with UEFI.

Am I right?

--
Vitaly
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Re[2]: Re[2]: Re[2]: Re[2]: Migrate from real server to virtual

2018-02-27 Thread Rodney W. Grimes
>  --- Original message ---
>  From: "Rodney W. Grimes" 
>  Date: 27 February 2018, 10:28:37
> > > --- Original message ---
> > > From: "Rodney W. Grimes" 
> > > Date: 27 February 2018, 09:13:56
> > > > ...
> > > > 
> > > > > > Boot Failed? So windows never started.
> > > > > > Your not having a shutdown problem your having a start up failure. 
> > > > > > 
> > > > > > What is the output of:
> > > > > > file /vm/img/disk1.raw
 
> > > > > > file /VM/distro/null.iso
 

Your command in the original email had these 2 strings, please correct that
error in your command.   VM != vm in unix world.

> > > > > > And do you really have /vm and /VM? Or is that a typo?
> > > > 
> > > > 
> > > > You have not answered these 3 questions
> > > > what is output of "file /vm/img/disk1.raw"
> > > > what is output of "file /VM/distro/null.iso"
> > > > 
> > > > Is there a possible typo here in your command line??? vm vs VM?
> > > 
> > > This files are present and without typo as I have copied path and 
> > > filenames via clipboard.
> > > Next I will try with sysutils/uefi-edk2-bhyve-csm.
> > 
> > It would still be helpful to know what the host system thinks of
> > these files, please output of:
> > file /vm/img/disk1.raw
> > file /VM/distory/null.iso
> 
> Ok,
> 
> # file ./null.iso
> ./null.iso: empty
> 
> # file ./disk1.raw
> ./disk1.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 0xbaf010d7; partition 
> 1 : ID=0x7, active, start-CHS (0x0,32,33), end-CHS (0xc,223,19), startsector 
> 2048, 204800 sectors; partition 2 : ID=0x7, start-CHS (0xc,223,20), end-CHS 
> (0x3ff,254,63), startsector 206848, 253745152 sectors; partition 3 : ID=0x7, 
> start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 253953468, 
> 722810844 sectors


Ok so infact these 2 files are in the same directory, that needs to be spelled 
exactly the same
on the command line of bhyyve.

But I think the bigger problem is that this is an MBR disk with Windows 7 in 
it, I
do not believe that bhyve can run Windows 7 at this time.  

> May be I incorrect have converted this image?...

The results above look ok, though the alignment is a bit odd.
You man want to play with mdconfig and fusefs to see if you
can read the converted image:

pkg install fusefs-ntfs

mdconfig -f disk1.raw
ntfs-3g /dev/md0s1 /mnt
find /mnt

That should atleast validate the file system a little.

> I have just tested with UEFI_CSM.
> I am able manage BHYVE UEFI via F2 key pressing and there are Legacy CD-ROM 
> and Legacy Hard Drive options. If choosing HDD and continue to booting just 
> black screen...

Peter pointed out to us that UEFI_CSM does not work with windows.
I think the bigger problem here is this appears to be a windows 7 image?
-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Re[2]: Re[2]: Re[2]: Migrate from real server to virtual

2018-02-27 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> 
> 
>  
>  --- Original message ---
>  From: "Rodney W. Grimes" 
>  Date: 27 February 2018, 09:13:56
>   
> 
> 
> > ...
> > 
> > > > Boot Failed? So windows never started.
> > > > Your not having a shutdown problem your having a start up failure. 
> > > > 
> > > > What is the output of:
> > > > file /vm/img/disk1.raw
> > > > file /VM/distro/null.iso
> > > > 
> > > > And do you really have /vm and /VM? Or is that a typo?
> > 
> > 
> > You have not answered these 3 questions
> > what is output of "file /vm/img/disk1.raw"
> > what is output of "file /VM/distro/null.iso"
> > 
> > Is there a possible typo here in your command line??? vm vs VM?
> 
> This files are present and without typo as I have copied path and filenames 
> via clipboard.
> Next I will try with sysutils/uefi-edk2-bhyve-csm.

It would still be helpful to know what the host system thinks of
these files, please output of:
file /vm/img/disk1.raw
file /VM/distory/null.iso

-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re[2]: Re[2]: Re[2]: Migrate from real server to virtual

2018-02-27 Thread wishmaster


 
 --- Original message ---
 From: "Rodney W. Grimes" 
 Date: 27 February 2018, 09:13:56
  


> ...
> 
> > > Boot Failed? So windows never started.
> > > Your not having a shutdown problem your having a start up failure. 
> > > 
> > > What is the output of:
> > > file /vm/img/disk1.raw
> > > file /VM/distro/null.iso
> > > 
> > > And do you really have /vm and /VM? Or is that a typo?
> 
> 
> You have not answered these 3 questions
> what is output of "file /vm/img/disk1.raw"
> what is output of "file /VM/distro/null.iso"
> 
> Is there a possible typo here in your command line??? vm vs VM?

This files are present and without typo as I have copied path and filenames via 
clipboard.
Next I will try with sysutils/uefi-edk2-bhyve-csm.

--
Vitaly
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Re[2]: Re[2]: Migrate from real server to virtual

2018-02-26 Thread Rodney W. Grimes
...

> > Boot Failed? So windows never started.
> > Your not having a shutdown problem your having a start up failure. 
> > 
> > What is the output of:
> > file /vm/img/disk1.raw
> > file /VM/distro/null.iso
> > 
> > And do you really have /vm and /VM? Or is that a typo?


You have not answered these 3 questions
what is output of "file /vm/img/disk1.raw"
what is output of "file /VM/distro/null.iso"

Is there a possible typo here in your command line???  vm vs VM?


> 
> I said not clear. I can not reboot hardware server for some reason and 
> therefore do not know boot settings: or this is UEFI boot or Legacy.
> But problem is in inability to boot the virtual server. After I connect via 
> VNC I see this error:
> 
> Boot Filed. UEFI Hard Drive
> 
> Without parameter "-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd"  
> bhyve does not start at all with error

Without a BIOS you must use bhyveload to get a kernel loaded, and thats not
going to work for your Windows img.  

> virtual machine cannot be booted.
> 
> --
> Vitaly

-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Re[2]: Re[2]: Migrate from real server to virtual

2018-02-26 Thread Rodney W. Grimes
> On 27 Feb. 2018 5:07 pm, "wishmaster"  wrote:
> 
> 
> Boot Filed. UEFI Hard Drive
> 
> Without parameter "-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd"
> bhyve does not start at all with error
> 
> virtual machine cannot be booted.
> 
> 
> Have you tried using the CSM UEFI firmware that came in same bundle as the
> one above? It's worth a try.

That was going to be my next suggestion as well.

-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re[2]: Re[2]: Migrate from real server to virtual

2018-02-26 Thread wishmaster


 
 --- Original message ---
 From: "Rodney W. Grimes" 
 Date: 26 February 2018, 17:08:06
  


> > 
> > ? 
> > 
> > --- Original message ---
> > From: "Rodney W. Grimes" 
> > Date: 26 February 2018, 16:17:44
> > 
> > 
> > > > Hi, colleagues.
> > > > 
> > > > There is a server running with Windows Server 2008 R2 and I am 
> > > > attempting launch this server in virtual environment as a back up. But 
> > > > there is one big problem - I can not shutdown this server.
> > > > My first step was creating a VHD image with help of Disk2vhd. Then a 
> > > > converted this image from VHD to raw image with qemu.
> > > > I don't know boot setting of BIOS.
> > > > 
> > > > With this command I am unable to start the server.
> > > > 
> > > > bhyve -c 2 -s 0,hostbridge -s 3,ahci-hd,/vm/img/disk1.raw -s 
> > > > 4,ahci-cd,/VM/distro/null.iso -s 10,virtio-net,tap1 -s 
> > > > 20,fbuf,tcp=192.168.0.254:5900,w=800,h=600,wait -s 21,lpc -l 
> > > > bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -m 6G -H -w 
> > > > windows2
> > > > 
> > > > Boot Filed. UEFI Hard Drive
> > > > 
> > > > Any ideas?
> > > 
> > > You mention how you start it, what are you using to try and stop it?
> > 
> > Ctrl+C then bhyvectl --vm windows2 --destroy
> 
> Ok, thats to clean up after a crashed VM, not the way to shutdown
> a running system.
> 
> > > Also what version of FreeBSD are you running as a host?
> > 
> > FreeBSD 11.1-STABLE r329364
> 
> Thanks, wanted to make sure this was a 10.x system.
> 
> > > Are you saying you can not connect to the vnc on 192.168.0.254:5900
> > > and tell windows to shutdown?
> > 
> > I can connect to the 192.168.0.254:5900, but error is displayed: Boot 
> > Filed. UEFI Hard Drive
> 
> Boot Failed? So windows never started.
> Your not having a shutdown problem your having a start up failure. 
> 
> What is the output of:
> file /vm/img/disk1.raw
> file /VM/distro/null.iso
> 
> And do you really have /vm and /VM? Or is that a typo?
> 
> 
> -- 
> Rod Grimes rgri...@freebsd.org


I said not clear. I can not reboot hardware server for some reason and 
therefore do not know boot settings: or this is UEFI boot or Legacy.
But problem is in inability to boot the virtual server. After I connect via VNC 
I see this error:

Boot Filed. UEFI Hard Drive

Without parameter "-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd"  
bhyve does not start at all with error

virtual machine cannot be booted.

--
Vitaly

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Re[2]: Migrate from real server to virtual

2018-02-26 Thread Rodney W. Grimes
> 
> ? 
> 
>  --- Original message ---
> From: "Rodney W. Grimes" 
> Date: 26 February 2018, 16:17:44
> 
>  
> > > Hi, colleagues.
> > > 
> > > There is a server running with Windows Server 2008 R2 and I am attempting 
> > > launch this server in virtual environment as a back up. But there is one 
> > > big problem - I can not shutdown this server.
> > > My first step was creating a VHD image with help of Disk2vhd. Then a 
> > > converted this image from VHD to raw image with qemu.
> > > I don't know boot setting of BIOS.
> > > 
> > > With this command I am unable to start the server.
> > > 
> > > bhyve -c 2 -s 0,hostbridge -s 3,ahci-hd,/vm/img/disk1.raw -s 
> > > 4,ahci-cd,/VM/distro/null.iso -s 10,virtio-net,tap1 -s 
> > > 20,fbuf,tcp=192.168.0.254:5900,w=800,h=600,wait -s 21,lpc -l 
> > > bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -m 6G -H -w windows2
> > > 
> > > Boot Filed. UEFI Hard Drive
> > > 
> > > Any ideas?
> > 
> > You mention how you start it, what are you using to try and stop it?
>   
> Ctrl+C then bhyvectl --vm windows2 --destroy

Ok, thats to clean up after a crashed VM, not the way to shutdown
a running system.

> > Also what version of FreeBSD are you running as a host?
> 
> FreeBSD 11.1-STABLE r329364

Thanks, wanted to make sure this was a 10.x system.

> > Are you saying you can not connect to the vnc on 192.168.0.254:5900
> > and tell windows to shutdown?
> 
> I can connect to the 192.168.0.254:5900, but error is displayed:   Boot 
> Filed. UEFI Hard Drive

Boot Failed?   So windows never started.
Your not having a shutdown problem your having a start up failure.  

What is the output of:
file /vm/img/disk1.raw
file /VM/distro/null.iso

And do you really have /vm and /VM?  Or is that a typo?


-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re[2]: Migrate from real server to virtual

2018-02-26 Thread wishmaster

  

 --- Original message ---
From: "Rodney W. Grimes" 
Date: 26 February 2018, 16:17:44

 
> > Hi, colleagues.
> > 
> > There is a server running with Windows Server 2008 R2 and I am attempting 
> > launch this server in virtual environment as a back up. But there is one 
> > big problem - I can not shutdown this server.
> > My first step was creating a VHD image with help of Disk2vhd. Then a 
> > converted this image from VHD to raw image with qemu.
> > I don't know boot setting of BIOS.
> > 
> > With this command I am unable to start the server.
> > 
> > bhyve -c 2 -s 0,hostbridge -s 3,ahci-hd,/vm/img/disk1.raw -s 
> > 4,ahci-cd,/VM/distro/null.iso -s 10,virtio-net,tap1 -s 
> > 20,fbuf,tcp=192.168.0.254:5900,w=800,h=600,wait -s 21,lpc -l 
> > bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -m 6G -H -w windows2
> > 
> > Boot Filed. UEFI Hard Drive
> > 
> > Any ideas?
> 
> You mention how you start it, what are you using to try and stop it?
  
Ctrl+C then bhyvectl --vm windows2 --destroy

> Also what version of FreeBSD are you running as a host?

FreeBSD 11.1-STABLE r329364


> Are you saying you can not connect to the vnc on 192.168.0.254:5900
> and tell windows to shutdown?

I can connect to the 192.168.0.254:5900, but error is displayed:   Boot Filed. 
UEFI Hard Drive


> Or are you saying you connect to that vnc and even though you told
> windows to shutdown it fails to do so?
> 
> Sorry for all the questions, and no answer,
> but it is not clear exactly what your problem is.
> 
> -- 
> Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"