Re: Xen Dom0

2017-06-29 Thread Larry Rosenman


On 6/29/17, 5:01 AM, "Roger Pau Monné"  wrote:

Hello,

Sorry for the delay, I don't read freebsd-virt as often as I should.
There's also freebsd-xen@ for FreeBSD/Xen specific issues (although
posting here is fine).

On Wed, Jun 28, 2017 at 11:44:27PM -0500, Larry Rosenman wrote:
> Any ideas?

When was the last time that you updated world (or more specifically
/boot/)?

Could you please attempt the following and try again:

cd sys/boot/ && make && make install

I've just tested the port with the current loader code and seems to
work fine.

There was a brief period of time when HEAD couldn't boot a Xen kernel,
IIRC it's ~3month ago or so. That was fixed, but you might just happen
to have a loader from that time.

Roger.

I buildworld/buildkernel on a regular basis:
Edit /etc/motd to change this login announcement.
borg.lerctr.org /home/ler $ ls -l /boot/*loader*
-r-xr-xr-x  1 root  wheel  376832 Jun 25 16:48 /boot/loader
-r--r--r--  1 root  wheel7483 Jun 25 16:48 /boot/loader.4th
-rw-r--r--  1 root  wheel1157 Jun 25 08:26 /boot/loader.conf
-r-xr-xr-x  1 root  wheel  445952 Jun 25 16:48 /boot/loader.efi
-r--r--r--  1 root  wheel   15084 Jun 25 16:48 /boot/loader.help
-r-xr-xr-x  1 root  wheel  376832 Jun 21 10:29 /boot/loader.old
-r--r--r--  1 root  wheel 423 Jun 25 16:48 /boot/loader.rc
-r-xr-xr-x  1 root  wheel  442368 Jun 25 16:48 /boot/zfsloader
-r-xr-xr-x  1 root  wheel  442368 Jun 21 10:29 /boot/zfsloader.old
borg.lerctr.org /home/ler $

Note: I have *NOT* updated the efi partition stuff.  

This is root-on-ZFS if it matters, and it *IS* EFI.

Do I need to update the EFI boot partition?





___
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: Xen Dom0

2017-06-29 Thread Roger Pau Monné
Hello,

Sorry for the delay, I don't read freebsd-virt as often as I should.
There's also freebsd-xen@ for FreeBSD/Xen specific issues (although
posting here is fine).

On Wed, Jun 28, 2017 at 11:44:27PM -0500, Larry Rosenman wrote:
> Any ideas?

When was the last time that you updated world (or more specifically
/boot/)?

Could you please attempt the following and try again:

cd sys/boot/ && make && make install

I've just tested the port with the current loader code and seems to
work fine.

There was a brief period of time when HEAD couldn't boot a Xen kernel,
IIRC it's ~3month ago or so. That was fixed, but you might just happen
to have a loader from that time.

Roger.
___
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: Xen Dom0

2017-06-28 Thread Larry Rosenman
Any ideas?


On 6/25/17, 8:28 AM, "Larry Rosenman"  wrote:

On Sun, Jun 25, 2017 at 07:50:25AM -0500, Larry Rosenman wrote:
> On Sat, Jun 24, 2017 at 06:12:24PM -0400, Allan Jude wrote:
> > On 2017-06-24 16:11, Larry Rosenman wrote:
> > > I tried to play with Xen on my existing root-on-zfs system, and when 
it tried to
> > > load /boot/xen, it said it couldn't. 
> > > 
> > > This is on:
> > > 
> > > FreeBSD borg.lerctr.org 12.0-CURRENT FreeBSD 12.0-CURRENT #33 
r320190: Wed Jun 21 10:22:24 CDT 2017 
r...@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER  amd64 1200034 1200034
> > > 
> > > Using ports at:
> > > 
> > > Path: /usr/ports
> > > Working Copy Root Path: /usr/ports
> > > URL: svn://svn.freebsd.org/ports/head
> > > Relative URL: ^/head
> > > Repository Root: svn://svn.freebsd.org/ports
> > > Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> > > Revision: 444091
> > > Node Kind: directory
> > > Schedule: normal
> > > Last Changed Author: jbeich
> > > Last Changed Rev: 444091
> > > Last Changed Date: 2017-06-21 20:19:28 -0500 (Wed, 21 Jun 2017)
> > > 
> > > 
> > > Ideas?
> > > 
> > 
> > Do you have the actual error message?
> it said can't load /boot/xen
screenshot: http://www.lerctr.org/~ler/XEN.png

> that was all.
> > Can you share the relevant bits of /boot/loader.conf ?
> Exactly what was put out by the port. 
> 
> (I've reverted and removed it for now). 
> 
> > 
> > -- 
> > Allan Jude
> > ___
> > 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"
> 
> -- 
> Larry Rosenman http://www.lerctr.org/~ler
> Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
> US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281

-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281



___
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: Xen Dom0

2017-06-25 Thread Larry Rosenman
On Sun, Jun 25, 2017 at 07:50:25AM -0500, Larry Rosenman wrote:
> On Sat, Jun 24, 2017 at 06:12:24PM -0400, Allan Jude wrote:
> > On 2017-06-24 16:11, Larry Rosenman wrote:
> > > I tried to play with Xen on my existing root-on-zfs system, and when it 
> > > tried to
> > > load /boot/xen, it said it couldn't. 
> > > 
> > > This is on:
> > > 
> > > FreeBSD borg.lerctr.org 12.0-CURRENT FreeBSD 12.0-CURRENT #33 r320190: 
> > > Wed Jun 21 10:22:24 CDT 2017 
> > > r...@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER  amd64 1200034 1200034
> > > 
> > > Using ports at:
> > > 
> > > Path: /usr/ports
> > > Working Copy Root Path: /usr/ports
> > > URL: svn://svn.freebsd.org/ports/head
> > > Relative URL: ^/head
> > > Repository Root: svn://svn.freebsd.org/ports
> > > Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> > > Revision: 444091
> > > Node Kind: directory
> > > Schedule: normal
> > > Last Changed Author: jbeich
> > > Last Changed Rev: 444091
> > > Last Changed Date: 2017-06-21 20:19:28 -0500 (Wed, 21 Jun 2017)
> > > 
> > > 
> > > Ideas?
> > > 
> > 
> > Do you have the actual error message?
> it said can't load /boot/xen
screenshot: http://www.lerctr.org/~ler/XEN.png

> that was all.
> > Can you share the relevant bits of /boot/loader.conf ?
> Exactly what was put out by the port. 
> 
> (I've reverted and removed it for now). 
> 
> > 
> > -- 
> > Allan Jude
> > ___
> > 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"
> 
> -- 
> Larry Rosenman http://www.lerctr.org/~ler
> Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
> US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281

-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281


signature.asc
Description: PGP signature


Re: Xen Dom0

2017-06-25 Thread Larry Rosenman
On Sat, Jun 24, 2017 at 06:12:24PM -0400, Allan Jude wrote:
> On 2017-06-24 16:11, Larry Rosenman wrote:
> > I tried to play with Xen on my existing root-on-zfs system, and when it 
> > tried to
> > load /boot/xen, it said it couldn't. 
> > 
> > This is on:
> > 
> > FreeBSD borg.lerctr.org 12.0-CURRENT FreeBSD 12.0-CURRENT #33 r320190: Wed 
> > Jun 21 10:22:24 CDT 2017 
> > r...@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER  amd64 1200034 1200034
> > 
> > Using ports at:
> > 
> > Path: /usr/ports
> > Working Copy Root Path: /usr/ports
> > URL: svn://svn.freebsd.org/ports/head
> > Relative URL: ^/head
> > Repository Root: svn://svn.freebsd.org/ports
> > Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> > Revision: 444091
> > Node Kind: directory
> > Schedule: normal
> > Last Changed Author: jbeich
> > Last Changed Rev: 444091
> > Last Changed Date: 2017-06-21 20:19:28 -0500 (Wed, 21 Jun 2017)
> > 
> > 
> > Ideas?
> > 
> 
> Do you have the actual error message?
it said can't load /boot/xen
that was all.
> Can you share the relevant bits of /boot/loader.conf ?
Exactly what was put out by the port. 

(I've reverted and removed it for now). 

> 
> -- 
> Allan Jude
> ___
> 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"

-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281
___
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: Xen Dom0

2017-06-24 Thread Allan Jude
On 2017-06-24 16:11, Larry Rosenman wrote:
> I tried to play with Xen on my existing root-on-zfs system, and when it tried 
> to
> load /boot/xen, it said it couldn't. 
> 
> This is on:
> 
> FreeBSD borg.lerctr.org 12.0-CURRENT FreeBSD 12.0-CURRENT #33 r320190: Wed 
> Jun 21 10:22:24 CDT 2017 r...@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER 
>  amd64 1200034 1200034
> 
> Using ports at:
> 
> Path: /usr/ports
> Working Copy Root Path: /usr/ports
> URL: svn://svn.freebsd.org/ports/head
> Relative URL: ^/head
> Repository Root: svn://svn.freebsd.org/ports
> Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> Revision: 444091
> Node Kind: directory
> Schedule: normal
> Last Changed Author: jbeich
> Last Changed Rev: 444091
> Last Changed Date: 2017-06-21 20:19:28 -0500 (Wed, 21 Jun 2017)
> 
> 
> Ideas?
> 

Do you have the actual error message?
Can you share the relevant bits of /boot/loader.conf ?

-- 
Allan Jude
___
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"


Xen Dom0

2017-06-24 Thread Larry Rosenman
I tried to play with Xen on my existing root-on-zfs system, and when it tried to
load /boot/xen, it said it couldn't. 

This is on:

FreeBSD borg.lerctr.org 12.0-CURRENT FreeBSD 12.0-CURRENT #33 r320190: Wed Jun 
21 10:22:24 CDT 2017 r...@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER  
amd64 1200034 1200034

Using ports at:

Path: /usr/ports
Working Copy Root Path: /usr/ports
URL: svn://svn.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 444091
Node Kind: directory
Schedule: normal
Last Changed Author: jbeich
Last Changed Rev: 444091
Last Changed Date: 2017-06-21 20:19:28 -0500 (Wed, 21 Jun 2017)


Ideas?

-- 
Larry Rosenman https://people.FreeBSD.org/~ler/
Phone: +1 214-642-9640 E-Mail: l...@freebsd.org
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281


signature.asc
Description: PGP signature


Re: Booting Solaris 11.3 (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-05-06 Thread Roger Pau Monné
On Thu, May 05, 2016 at 10:20:51PM +, Marcin Cieslak wrote:
> On Thu, 5 May 2016, Roger Pau Monné wrote:
> 
> > On Sat, Apr 30, 2016 at 08:56:54PM +, Marcin Cieslak wrote:
> > > > Certainly. I assumed that you meant it crashed the VM, not the whole 
> > > > host. 
> > > > Can you please provide the trace of the crash?
> > > 
> > > Apologies, forgot to let Xen keep VGA:
> > > 
> > > http://marcincieslak.com/tmp/xencrash.png
> > > 
> > > Manual OCR:
> > > 
> > > FreeBSD/amd64 (o.saper.info) (xc0)
> > > 
> > > login: (XEN) vmx.c:2464:d0v0 EPT violation 0x182 (-w-/---), gpa 
> > > 0x010178f000
> > 
> > Hello,
> > 
> > I've been able to debug this and found the issue. I have two patches that 
> > should be applied to FreeBSD in order to fix it, they can be found at:
> > 
> > https://people.freebsd.org/~royger/privcmd_fixes/
> > 
> > Could you please give them a try?
> 
> > I have however been unable to boot a Solaris 11.3 guest under PV mode, but 
> > at least the host is not crashing anymore :).
> 
> Thanks, I can confirm that the patches fix the crash for me.
> The half-life of PV Solaris is still under the microsecond.
> 
> Btw. I have managed to get gdbsx going by replacing "/proc/xen/privcmd"
> with "/dev/xen/privcmd".
> 
> Indeed, the state of Solaris is pretty bad:
> 
> - Solaris 11.3 under HVM boots, but the installer complains there
>   are no local disks (which is not true, even device nodes are there
>   under /dev/dsk/ ... )

That's quite weird, under HVM disks are available using both the emulated 
and the PV interfaces, and Solaris 11.3 should certainly support the 
emulated ones. IIRC they are AHCI. 
 
> - OpenIndiana (OI-hipster-text-20160421.iso as HVM) hangs after printing
>   out the kernel version message
> 
> - SmartOS (smartos-20160428T170316Z.iso) 
>   seems to work at first, but after the initial configuration
>   it cannot bring the network interface up because its link
>   state is unknown (tried model=e1000 and the default Realtek):
> 
> [root@master0 ~]# dladm show-phys
> LINK MEDIASTATE SPEED  DUPLEX   DEVICE
> e1000g0  Ethernet unknown   0  half e1000g0

Hm, AFAICT this doesn't look related to FreeBSD, but just to be sure, could 
you try the same with a Linux Dom0?

Roger.
___
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: Booting Solaris 11.3 (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-05-05 Thread Marcin Cieslak
On Thu, 5 May 2016, Roger Pau Monné wrote:

> On Sat, Apr 30, 2016 at 08:56:54PM +, Marcin Cieslak wrote:
> > > Certainly. I assumed that you meant it crashed the VM, not the whole 
> > > host. 
> > > Can you please provide the trace of the crash?
> > 
> > Apologies, forgot to let Xen keep VGA:
> > 
> > http://marcincieslak.com/tmp/xencrash.png
> > 
> > Manual OCR:
> > 
> > FreeBSD/amd64 (o.saper.info) (xc0)
> > 
> > login: (XEN) vmx.c:2464:d0v0 EPT violation 0x182 (-w-/---), gpa 
> > 0x010178f000
> 
> Hello,
> 
> I've been able to debug this and found the issue. I have two patches that 
> should be applied to FreeBSD in order to fix it, they can be found at:
> 
> https://people.freebsd.org/~royger/privcmd_fixes/
> 
> Could you please give them a try?

> I have however been unable to boot a Solaris 11.3 guest under PV mode, but 
> at least the host is not crashing anymore :).

Thanks, I can confirm that the patches fix the crash for me.
The half-life of PV Solaris is still under the microsecond.

Btw. I have managed to get gdbsx going by replacing "/proc/xen/privcmd"
with "/dev/xen/privcmd".

Indeed, the state of Solaris is pretty bad:

- Solaris 11.3 under HVM boots, but the installer complains there
  are no local disks (which is not true, even device nodes are there
  under /dev/dsk/ ... )

- OpenIndiana (OI-hipster-text-20160421.iso as HVM) hangs after printing
  out the kernel version message

- SmartOS (smartos-20160428T170316Z.iso) 
  seems to work at first, but after the initial configuration
  it cannot bring the network interface up because its link
  state is unknown (tried model=e1000 and the default Realtek):

[root@master0 ~]# dladm show-phys
LINK MEDIASTATE SPEED  DUPLEX   DEVICE
e1000g0  Ethernet unknown   0  half e1000g0


Marcin


 
   
  

___
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: Booting Solaris 11.3 (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-05-05 Thread Roger Pau Monné
On Sat, Apr 30, 2016 at 08:56:54PM +, Marcin Cieslak wrote:
> On Fri, 29 Apr 2016, Roger Pau Monné wrote:
> 
> > On Thu, Apr 28, 2016 at 08:01:23PM +, Marcin Cieslak wrote:
> > > On Tue, 26 Apr 2016, Roger Pau Monné wrote:
> > > 
> > > > On Tue, Apr 26, 2016 at 10:39:06AM +, Marcin Cieslak wrote:
> > > > > By the way, I just managed to crash a whole machine by trying to
> > > > > boot Solaris 11.3:
> > > > > 
> > > > > # builder = "hvm"
> > > > > memory = 2048
> > > > > vcpus = 1
> > > > > name = "Solaris0"
> > > > > disk = [ 'file:/root/sol-11_3-text-x86.iso,6:cdrom,r', 
> > > > > '/dev/zvol/zroot/solaris0,raw,hda,w' ]
> > > > > kernel = "/root/xen/solaris/unix"
> > > > > ramdisk = "/root/xen/solaris/boot_archive"
> > > > > extra = "/platform/i86xpv/kernel/amd64/unix -B 
> > > > > console=ttya,livemode=text"
> > > > > #boot = "c"
> > > > > usbdevice = 'tablet'
> > > > > vnc = 1
> > > > > vnclisten = '0.0.0.0'
> > > > > vif = [ 'bridge=bridge0' ]
> > > > > 
> > > > > /root/xen/solaris/unix and /root/xen/solaris/boot_archive where 
> > > > > extracted from sol-11_3-text-x86.iso
> > > > > ("Intel text-only image").
> > > > 
> > > > I don't think you can boot Solaris as a PV guest anymore, you should 
> > > > instead 
> > > > boot it as a HVM guest. You will have to remove the kernel and ramdisk 
> > > > options and instead add builder="hvm" (that you have left commented 
> > > > out).
> > > 
> > > However supported or not, I think it should not crash a whole host 
> > > system?...
> > 
> > Certainly. I assumed that you meant it crashed the VM, not the whole host. 
> > Can you please provide the trace of the crash?
> 
> Apologies, forgot to let Xen keep VGA:
> 
> http://marcincieslak.com/tmp/xencrash.png
> 
> Manual OCR:
> 
> FreeBSD/amd64 (o.saper.info) (xc0)
> 
> login: (XEN) vmx.c:2464:d0v0 EPT violation 0x182 (-w-/---), gpa 
> 0x010178f000

Hello,

I've been able to debug this and found the issue. I have two patches that 
should be applied to FreeBSD in order to fix it, they can be found at:

https://people.freebsd.org/~royger/privcmd_fixes/

Could you please give them a try?

I have however been unable to boot a Solaris 11.3 guest under PV mode, but 
at least the host is not crashing anymore :).

Roger.
___
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: Booting Solaris 11.3 (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-04-29 Thread Roger Pau Monné
On Thu, Apr 28, 2016 at 08:01:23PM +, Marcin Cieslak wrote:
> On Tue, 26 Apr 2016, Roger Pau Monné wrote:
> 
> > On Tue, Apr 26, 2016 at 10:39:06AM +, Marcin Cieslak wrote:
> > > By the way, I just managed to crash a whole machine by trying to
> > > boot Solaris 11.3:
> > > 
> > > # builder = "hvm"
> > > memory = 2048
> > > vcpus = 1
> > > name = "Solaris0"
> > > disk = [ 'file:/root/sol-11_3-text-x86.iso,6:cdrom,r', 
> > > '/dev/zvol/zroot/solaris0,raw,hda,w' ]
> > > kernel = "/root/xen/solaris/unix"
> > > ramdisk = "/root/xen/solaris/boot_archive"
> > > extra = "/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text"
> > > #boot = "c"
> > > usbdevice = 'tablet'
> > > vnc = 1
> > > vnclisten = '0.0.0.0'
> > > vif = [ 'bridge=bridge0' ]
> > > 
> > > /root/xen/solaris/unix and /root/xen/solaris/boot_archive where extracted 
> > > from sol-11_3-text-x86.iso
> > > ("Intel text-only image").
> > 
> > I don't think you can boot Solaris as a PV guest anymore, you should 
> > instead 
> > boot it as a HVM guest. You will have to remove the kernel and ramdisk 
> > options and instead add builder="hvm" (that you have left commented out).
> 
> However supported or not, I think it should not crash a whole host system?...

Certainly. I assumed that you meant it crashed the VM, not the whole host. 
Can you please provide the trace of the crash?

Roger.
___
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"


Booting Solaris 11.3 (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-04-28 Thread Marcin Cieslak
On Tue, 26 Apr 2016, Roger Pau Monné wrote:

> On Tue, Apr 26, 2016 at 10:39:06AM +, Marcin Cieslak wrote:
> > By the way, I just managed to crash a whole machine by trying to
> > boot Solaris 11.3:
> > 
> > # builder = "hvm"
> > memory = 2048
> > vcpus = 1
> > name = "Solaris0"
> > disk = [ 'file:/root/sol-11_3-text-x86.iso,6:cdrom,r', 
> > '/dev/zvol/zroot/solaris0,raw,hda,w' ]
> > kernel = "/root/xen/solaris/unix"
> > ramdisk = "/root/xen/solaris/boot_archive"
> > extra = "/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text"
> > #boot = "c"
> > usbdevice = 'tablet'
> > vnc = 1
> > vnclisten = '0.0.0.0'
> > vif = [ 'bridge=bridge0' ]
> > 
> > /root/xen/solaris/unix and /root/xen/solaris/boot_archive where extracted 
> > from sol-11_3-text-x86.iso
> > ("Intel text-only image").
> 
> I don't think you can boot Solaris as a PV guest anymore, you should instead 
> boot it as a HVM guest. You will have to remove the kernel and ramdisk 
> options and instead add builder="hvm" (that you have left commented out).

However supported or not, I think it should not crash a whole host system?...

Marcin
___
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: Booting Windows/UEFI (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-04-26 Thread Roger Pau Monné
On Tue, Apr 26, 2016 at 10:39:06AM +, Marcin Cieslak wrote:
> Yes, should be easy. Will try to plug a binary port in.

Thanks :).
 
> By the way, I just managed to crash a whole machine by trying to
> boot Solaris 11.3:
> 
> # builder = "hvm"
> memory = 2048
> vcpus = 1
> name = "Solaris0"
> disk = [ 'file:/root/sol-11_3-text-x86.iso,6:cdrom,r', 
> '/dev/zvol/zroot/solaris0,raw,hda,w' ]
> kernel = "/root/xen/solaris/unix"
> ramdisk = "/root/xen/solaris/boot_archive"
> extra = "/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text"
> #boot = "c"
> usbdevice = 'tablet'
> vnc = 1
> vnclisten = '0.0.0.0'
> vif = [ 'bridge=bridge0' ]
> 
> /root/xen/solaris/unix and /root/xen/solaris/boot_archive where extracted 
> from sol-11_3-text-x86.iso
> ("Intel text-only image").

I don't think you can boot Solaris as a PV guest anymore, you should instead 
boot it as a HVM guest. You will have to remove the kernel and ramdisk 
options and instead add builder="hvm" (that you have left commented out).

Roger.
___
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: Booting Windows/UEFI (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-04-26 Thread Marcin Cieslak
On Tue, 26 Apr 2016, Roger Pau Monné wrote:

> On Tue, Apr 26, 2016 at 09:24:30AM +, Marcin Cieslak wrote:
> > I got lazy and I have downloaded
> > 
> > https://sourceforge.net/projects/edk2/files/OVMF/OVMF-X64-r15214.zip/download
> > 
> > recompiled xen-tools by adding to xen-tools/Makefile
> > 
> > CONFIGURE_ARGS+=--enable-ovmf
> > CONFIGURE_ARGS+=--with-system-ovmf=/root/xen/OVMF.fd
> > 
> > and worked pretty much out of the box.
> 
> Oh, thanks for the info, I didn't know OVMF provided pre-compiled binaries. 
> This should make adding a OVMF port trivial. Would you like to take a stab 
> at adding such a port and wiring it into the xen-tools package?

Yes, should be easy. Will try to plug a binary port in.

By the way, I just managed to crash a whole machine by trying to
boot Solaris 11.3:

# builder = "hvm"
memory = 2048
vcpus = 1
name = "Solaris0"
disk = [ 'file:/root/sol-11_3-text-x86.iso,6:cdrom,r', 
'/dev/zvol/zroot/solaris0,raw,hda,w' ]
kernel = "/root/xen/solaris/unix"
ramdisk = "/root/xen/solaris/boot_archive"
extra = "/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text"
#boot = "c"
usbdevice = 'tablet'
vnc = 1
vnclisten = '0.0.0.0'
vif = [ 'bridge=bridge0' ]

/root/xen/solaris/unix and /root/xen/solaris/boot_archive where extracted from 
sol-11_3-text-x86.iso
("Intel text-only image").

Marcin

___
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: Booting Windows/UEFI (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-04-26 Thread Roger Pau Monné
On Tue, Apr 26, 2016 at 09:24:30AM +, Marcin Cieslak wrote:
> I got lazy and I have downloaded
> 
> https://sourceforge.net/projects/edk2/files/OVMF/OVMF-X64-r15214.zip/download
> 
> recompiled xen-tools by adding to xen-tools/Makefile
> 
> CONFIGURE_ARGS+=--enable-ovmf
> CONFIGURE_ARGS+=--with-system-ovmf=/root/xen/OVMF.fd
> 
> and worked pretty much out of the box.

Oh, thanks for the info, I didn't know OVMF provided pre-compiled binaries. 
This should make adding a OVMF port trivial. Would you like to take a stab 
at adding such a port and wiring it into the xen-tools package?
 
Roger.
___
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"


Booting Windows/UEFI (was Re: Booting r298488 as Xen Dom0 may break ZFS pool?)

2016-04-26 Thread Marcin Cieslak
On Tue, 26 Apr 2016, Marcin Cieslak wrote:

> On Tue, 26 Apr 2016, Roger Pau Monné wrote:
> 
> > You will have to boot it using OVMF, which is not compiled with Xen by 
> > default. I will try to add an OVMF package (like the SeaBIOS one that we 
> > already have), and wire it into the xen-tools package.
> > 
> > If you want to try it yourself, you can add "--enable-ovmf" to the 
> > xen-tools 
> > package configure and see what breaks ;).
> 
> Thanks, lots of bad Linux-only scripts (#!/bin/bash and the like), will try!

I got lazy and I have downloaded

https://sourceforge.net/projects/edk2/files/OVMF/OVMF-X64-r15214.zip/download

recompiled xen-tools by adding to xen-tools/Makefile

CONFIGURE_ARGS+=--enable-ovmf
CONFIGURE_ARGS+=--with-system-ovmf=/root/xen/OVMF.fd

and worked pretty much out of the box.

This is Windows Server 2016 Technical Preview 2016, with GPL PV drivers
added to get networking. My config:

builder = "hvm"
memory = 4096
vcpus = 2
name = "Windows"
disk = [ '/dev/zvol/zroot/windows0,raw,hda,w','/root/fat.bin,raw,hdb,w' ]
boot = "c" # Boot to hard disk image
vnc = 2
vnclisten = "0.0.0.0"
usbdevice = 'tablet'
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
acpi = 1
bios = 'ovmf'
vif = [ 'bridge=bridge0' ]

/root/fat.bin is a little partitioned "hard drive" with FAT16 partition
used to provide GPL drivers.

Marcin
___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-26 Thread Marcin Cieslak
On Tue, 26 Apr 2016, Roger Pau Monné wrote:

> You will have to boot it using OVMF, which is not compiled with Xen by 
> default. I will try to add an OVMF package (like the SeaBIOS one that we 
> already have), and wire it into the xen-tools package.
> 
> If you want to try it yourself, you can add "--enable-ovmf" to the xen-tools 
> package configure and see what breaks ;).

Thanks, lots of bad Linux-only scripts (#!/bin/bash and the like), will try!

Marcin
___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-26 Thread Roger Pau Monné
On Tue, Apr 26, 2016 at 07:16:25AM +, Marcin Cieslak wrote:
> On Tue, 26 Apr 2016, Roger Pau Monné wrote:
> 
> > > > libxl: error: libxl.c:6121:libxl_xen_console_read_line: reading console 
> > > > ring buffer: Cannot allocate memory
> > > 
> > > It seems that my problem was ...
> > > 
> > > vm.max_wired=1
> > > 
> > > in /boot/loader.conf
> > > 
> > > instead of
> > > 
> > > vm.max_wired=-1
> > 
> > And this also caused the ZFS corruption?
> 
> Looks like it to me... Pretty strange.

I thought the max_wired sysctl node only affected the usage of wired memory 
by userspace applications, but it may have also prevented ZFS from using 
memory.
 
> Btw. is there any way to boot UEFI Windows partition under Xen?
> (it works fine under bhyve)

You will have to boot it using OVMF, which is not compiled with Xen by 
default. I will try to add an OVMF package (like the SeaBIOS one that we 
already have), and wire it into the xen-tools package.

If you want to try it yourself, you can add "--enable-ovmf" to the xen-tools 
package configure and see what breaks ;).

Roger.
___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-26 Thread Marcin Cieslak
On Tue, 26 Apr 2016, Roger Pau Monné wrote:

> > > libxl: error: libxl.c:6121:libxl_xen_console_read_line: reading console 
> > > ring buffer: Cannot allocate memory
> > 
> > It seems that my problem was ...
> > 
> > vm.max_wired=1
> > 
> > in /boot/loader.conf
> > 
> > instead of
> > 
> > vm.max_wired=-1
> 
> And this also caused the ZFS corruption?

Looks like it to me... Pretty strange.

Btw. is there any way to boot UEFI Windows partition under Xen?
(it works fine under bhyve)

Marcin
___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-26 Thread Roger Pau Monné
On Mon, Apr 25, 2016 at 08:50:53PM +, Marcin Cieslak wrote:
> On Mon, 25 Apr 2016, Marcin Cieslak wrote:
> 
> > On Mon, 25 Apr 2016, Marcin Cieslak wrote:
> > 
> > > On Mon, 25 Apr 2016, Roger Pau Monné wrote:
> > > > TBH, I have no idea. Can you also paste the log of the system (Xen + 
> > > > FreeBSD) when it fails to boot? If that's not possible, can you at 
> > > > least 
> > > > paste the output of `xl dmesg` when booted correctly under Xen?
> > 
> > I managed to boot it again...
> > 
> > root@o:~ # xl dmesg
> > xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> > temporarily unavailabl): Internal error
> > xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> > temporarily unavailabl): Internal error
> > xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> > temporarily unavailabl): Internal error
> > xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> > temporarily unavailabl): Internal error
> > xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> > temporarily unavailabl): Internal error
> > xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> > temporarily unavailabl): Internal error
> > libxl: error: libxl.c:6121:libxl_xen_console_read_line: reading console 
> > ring buffer: Cannot allocate memory
> 
> It seems that my problem was ...
> 
> vm.max_wired=1
> 
> in /boot/loader.conf
> 
> instead of
> 
> vm.max_wired=-1

And this also caused the ZFS corruption?

Roger.
___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-25 Thread Marcin Cieslak
On Mon, 25 Apr 2016, Marcin Cieslak wrote:

> On Mon, 25 Apr 2016, Marcin Cieslak wrote:
> 
> > On Mon, 25 Apr 2016, Roger Pau Monné wrote:
> > > TBH, I have no idea. Can you also paste the log of the system (Xen + 
> > > FreeBSD) when it fails to boot? If that's not possible, can you at least 
> > > paste the output of `xl dmesg` when booted correctly under Xen?
> 
> I managed to boot it again...
> 
> root@o:~ # xl dmesg
> xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> temporarily unavailabl): Internal error
> xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> temporarily unavailabl): Internal error
> xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> temporarily unavailabl): Internal error
> xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> temporarily unavailabl): Internal error
> xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> temporarily unavailabl): Internal error
> xc: error: Could not bounce buffer for version hypercall (35 = Resource 
> temporarily unavailabl): Internal error
> libxl: error: libxl.c:6121:libxl_xen_console_read_line: reading console ring 
> buffer: Cannot allocate memory

It seems that my problem was ...

vm.max_wired=1

in /boot/loader.conf

instead of

vm.max_wired=-1

Marcin
___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-25 Thread Marcin Cieslak
On Mon, 25 Apr 2016, Marcin Cieslak wrote:

> On Mon, 25 Apr 2016, Roger Pau Monné wrote:
> > TBH, I have no idea. Can you also paste the log of the system (Xen + 
> > FreeBSD) when it fails to boot? If that's not possible, can you at least 
> > paste the output of `xl dmesg` when booted correctly under Xen?

I managed to boot it again...

root@o:~ # xl dmesg
xc: error: Could not bounce buffer for version hypercall (35 = Resource 
temporarily unavailabl): Internal error
xc: error: Could not bounce buffer for version hypercall (35 = Resource 
temporarily unavailabl): Internal error
xc: error: Could not bounce buffer for version hypercall (35 = Resource 
temporarily unavailabl): Internal error
xc: error: Could not bounce buffer for version hypercall (35 = Resource 
temporarily unavailabl): Internal error
xc: error: Could not bounce buffer for version hypercall (35 = Resource 
temporarily unavailabl): Internal error
xc: error: Could not bounce buffer for version hypercall (35 = Resource 
temporarily unavailabl): Internal error
libxl: error: libxl.c:6121:libxl_xen_console_read_line: reading console ring 
buffer: Cannot allocate memory

also:

# w
 8:01PM  up 5 mins, 1 users, load averages: 0.10, 0.25, 0.15
w: kvm_getprocs: Cannot allocate memory: Cannot allocate memory

xen_cmdline="dom0_mem=2048M dom0_max_vcpus=4 dom0pvh=1 com1=115200,8n1 
guest_loglvl=all loglvl=all"

I am running a plain GENERIC kernel.

Marcin

___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-25 Thread Marcin Cieslak
On Mon, 25 Apr 2016, Roger Pau Monné wrote:

> > I have managed to make zpool boot again by doing voodoo
> > similar to this one:
> > 
> > [root@rescue ~]# zpool import -R /mnt zroot
> > [root@rescue ~]# mount -t devfs devfs /mnt/dev
> > [root@rescue ~]# chroot /mnt /bin/tcsh
> > 
> > (... Running make install in /usr/src/sys/boot ...)
> > 
> > root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada0
> > partcode written to ada0p1
> > root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada1
> > partcode written to ada1p1
> > root@rescue:/ # exit
> > [root@rescue ~]# umount /mnt/dev
> > [root@rescue ~]# zpool export zroot
> > [root@rescue ~]# reboot
> > 
> > Why zpool metadata get corrupted?
> 
> TBH, I have no idea. Can you also paste the log of the system (Xen + 
> FreeBSD) when it fails to boot? If that's not possible, can you at least 
> paste the output of `xl dmesg` when booted correctly under Xen?

I am using a VGA-emulating console attached by my friendly hosting
provider (Hetzner) and it does not give me the terminal-like output,
only VGA. From the quickly scrolling Xen kernel messages
I am getting to the stage where it is "scrubbing" and hands over
to the kernel.

> What operations did you perform when the system booted correctly using 
> FreeBSD/Xen?

Nothing in particular. It seems it succeeds every other time.

> Does the disk get corrupted even if the system fails to boot? AFAICT, it 
> seems like it's only the bootcode that gets corrupted, is that right?

I am not sure what really gets corrupted - once I noticed that
just rewriting bootcode (without "make install") didn't help (at least once).

Maybe this is some leftover from the 10.3 -> 11 upgrade? It's hard
to install 11 clean on the rented server But no idea how would *that*
affect booting.

I also have two drives on the controller, maybe something is not in sync there?

Marcin
___
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: Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-25 Thread Roger Pau Monné
On Sat, Apr 23, 2016 at 10:40:20PM +, Marcin Cieslak wrote:
> On a freshly installed (via upgrade from 10.3 from source)
> -CURRENT on this machine:
> 
> FreeBSD 11.0-CURRENT #0 r298488: Sat Apr 23 11:10:01 UTC 2016
> r...@o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64
> FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 
> 3.8.0)
> WARNING: WITNESS option enabled, expect reduced performance.
> VT(vga): resolution 640x480
> CPU: Intel(R) Xeon(R) CPU E31245 @ 3.30GHz (3300.09-MHz K8-class CPU)
>   Origin="GenuineIntel"  Id=0x206a7  Family=0x6  Model=0x2a  Stepping=7
>   
> Features=0xbfebfbff
>   
> Features2=0x1fbae3ff
>   AMD Features=0x28100800
>   AMD Features2=0x1
>   XSAVE Features=0x1
>   VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
>   TSC: P-state invariant, performance statistics
> real memory  = 17179869184 (16384 MB)
> avail memory = 16475140096 (15711 MB)
> Event timer "LAPIC" quality 600
> ACPI APIC Table: 
> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads
> random: unblocking device.
> ioapic0  irqs 0-23 on motherboard
> 
> ... i am trying to boot the system as Dom0 under Xen (4.5.2_2
> installed via pkg install).
> 
> The kernel boots in one of four cases, mostly
> though I don't get a block cursor after Xen messages
> and the machine sits and waits.
> 
> 
> After trying Xen suddenly the system no longer
> boots again:
> 
> Booting from local disk...
> PXE-M0F: Existing Intel Boot Agent.
> 
> ZFS: i/o error - all block copies unavailable
> ZFS: i/o error - all block copies unavailable
> ZFS: i/o error - all block copies unavailable
> 
> Can't find /boot/zfsloader
> 
> FreeBSD/x86 boot
> Default: zroot:/boot/kernel/kernel
> boot:
> ZFS: i/o error - all block copies unavailable

I'm currently running a r298464 world+kernel with ZFS on root and have seen 
no issues so far.
 
> (...)
> 
> The zpool imports without problems when
> booting from the rescue mfsbsd (10.3):
> 
>   pool: zroot
>  state: ONLINE
>   scan: none requested
> config:
> 
>   NAMESTATE READ WRITE CKSUM
>   zroot   ONLINE   0 0 0
> mirror-0  ONLINE   0 0 0
>   ada0p3  ONLINE   0 0 0
>   ada1p3  ONLINE   0 0 0
> 
> errors: No known data errors
> 
> gpart layout:
> 
> =>34  5860533101  ada0  GPT  (2.7T)
>   341024 1  freebsd-boot  (512K)
> 1058 4194304 2  freebsd-swap  (2.0G)
>  4195362  5856337773 3  freebsd-zfs  (2.7T)
> 
> =>34  5860533101  ada1  GPT  (2.7T)
>   341024 1  freebsd-boot  (512K)
> 1058 4194304 2  freebsd-swap  (2.0G)
>  4195362  5856337773 3  freebsd-zfs  (2.7T)
> 
> I have managed to make zpool boot again by doing voodoo
> similar to this one:
> 
> [root@rescue ~]# zpool import -R /mnt zroot
> [root@rescue ~]# mount -t devfs devfs /mnt/dev
> [root@rescue ~]# chroot /mnt /bin/tcsh
> 
> (... Running make install in /usr/src/sys/boot ...)
> 
> root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada0
> partcode written to ada0p1
> root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada1
> partcode written to ada1p1
> root@rescue:/ # exit
> [root@rescue ~]# umount /mnt/dev
> [root@rescue ~]# zpool export zroot
> [root@rescue ~]# reboot
> 
> Why zpool metadata get corrupted?

TBH, I have no idea. Can you also paste the log of the system (Xen + 
FreeBSD) when it fails to boot? If that's not possible, can you at least 
paste the output of `xl dmesg` when booted correctly under Xen?

What operations did you perform when the system booted correctly using 
FreeBSD/Xen?

Does the disk get corrupted even if the system fails to boot? AFAICT, it 
seems like it's only the bootcode that gets corrupted, is that right?

Roger.
___
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"


Booting r298488 as Xen Dom0 may break ZFS pool?

2016-04-23 Thread Marcin Cieslak
On a freshly installed (via upgrade from 10.3 from source)
-CURRENT on this machine:

FreeBSD 11.0-CURRENT #0 r298488: Sat Apr 23 11:10:01 UTC 2016
r...@o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 
3.8.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT(vga): resolution 640x480
CPU: Intel(R) Xeon(R) CPU E31245 @ 3.30GHz (3300.09-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x206a7  Family=0x6  Model=0x2a  Stepping=7
  
Features=0xbfebfbff
  
Features2=0x1fbae3ff
  AMD Features=0x28100800
  AMD Features2=0x1
  XSAVE Features=0x1
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 17179869184 (16384 MB)
avail memory = 16475140096 (15711 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads
random: unblocking device.
ioapic0  irqs 0-23 on motherboard

... i am trying to boot the system as Dom0 under Xen (4.5.2_2
installed via pkg install).

The kernel boots in one of four cases, mostly
though I don't get a block cursor after Xen messages
and the machine sits and waits.


After trying Xen suddenly the system no longer
boots again:

Booting from local disk...
PXE-M0F: Existing Intel Boot Agent.

ZFS: i/o error - all block copies unavailable
ZFS: i/o error - all block copies unavailable
ZFS: i/o error - all block copies unavailable

Can't find /boot/zfsloader

FreeBSD/x86 boot
Default: zroot:/boot/kernel/kernel
boot:
ZFS: i/o error - all block copies unavailable

(...)

The zpool imports without problems when
booting from the rescue mfsbsd (10.3):

  pool: zroot
 state: ONLINE
  scan: none requested
config:

NAMESTATE READ WRITE CKSUM
zroot   ONLINE   0 0 0
  mirror-0  ONLINE   0 0 0
ada0p3  ONLINE   0 0 0
ada1p3  ONLINE   0 0 0

errors: No known data errors

gpart layout:

=>34  5860533101  ada0  GPT  (2.7T)
  341024 1  freebsd-boot  (512K)
1058 4194304 2  freebsd-swap  (2.0G)
 4195362  5856337773 3  freebsd-zfs  (2.7T)

=>34  5860533101  ada1  GPT  (2.7T)
  341024 1  freebsd-boot  (512K)
1058 4194304 2  freebsd-swap  (2.0G)
 4195362  5856337773 3  freebsd-zfs  (2.7T)

I have managed to make zpool boot again by doing voodoo
similar to this one:

[root@rescue ~]# zpool import -R /mnt zroot
[root@rescue ~]# mount -t devfs devfs /mnt/dev
[root@rescue ~]# chroot /mnt /bin/tcsh

(... Running make install in /usr/src/sys/boot ...)

root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada0
partcode written to ada0p1
root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada1
partcode written to ada1p1
root@rescue:/ # exit
[root@rescue ~]# umount /mnt/dev
[root@rescue ~]# zpool export zroot
[root@rescue ~]# reboot

Why zpool metadata get corrupted?

-- 
Marcin

Xen commandline from /boot/loader.conf:

xen_kernel="/boot/xen"
xen_cmdline="dom0_mem=2048M dom0_max_vcpus=4 dom0pvh=1 com1=115200,8n1 
guest_loglvl=all loglvl=all"

dmesg when started under Xen successfully:

Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r298488: Sat Apr 23 11:10:01 UTC 2016
r...@o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 
3.8.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT(vga): text 80x25
CPU: Intel(R) Xeon(R) CPU E31245 @ 3.30GHz (3300.02-MHz K8-class CPU)
Origin="GenuineIntel"  Id=0x206a7  Family=0x6  Model=0x2a  Stepping=7
Features=0x1fc3ebff
Features2=0x9fb82283
AMD Features=0x20100800
AMD Features2=0x1
XSAVE Features=0x1
TSC: P-state invariant, performance statistics
Hypervisor: Origin = "XenVMMXenVMM"
real memory  = 2152079360 (2052 MB)
avail memory = 2025705472 (1931 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)

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

Re: HEAD UP: notice to FreeBSD/Xen Dom0 users

2015-08-17 Thread Roger Pau Monné
Hello,

El 15/08/15 a les 15.36, Outback Dingo ha escrit:
 HEAD UP on 10.2 the instructions found at
 http://wiki.xen.org/wiki/FreeBSD_Dom0
  git branch
  master
 * stable-4.5
 
 
 
 no longer appear to work
 
 gmake -j8 install-tools HOSTCC=gcc48 CC=gcc48
 
 fails with
 __SNIP__
 gmake[3]: Entering directory
 '/usr/home/dingo/xen/tools/qemu-xen-dir-remote'
  GEN   config-host.h
  GEN   trace/generated-tracers.h
  GEN   trace/generated-tracers.c
  LINK  qemu-nbd
  LINK  qemu-img
 c++  LINK  qemu-io
 : error: unknown argument: '-fstack-protector-strong'
 c++: error: unknown argument: '-fstack-protector-strong'

I've tried to reproduce this with a fresh checkout without success. I
guess you have some libraries in your system that change the way Qemu is
built. In any case, can you try the following rune:

gmake -j8 install-tools HOSTCC=gcc48 CC=gcc48 HOSTCXX=g++48 CXX=g++48

Also, did you perform a distclean before building? (If the tree is not a
fresh checkout).

Roger.
___
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: HEAD UP: notice to FreeBSD/Xen Dom0 users

2015-08-15 Thread Outback Dingo
On Fri, Jun 26, 2015 at 5:19 PM, Roger Pau Monné roy...@freebsd.org wrote:

 Hello,

 If you are running a FreeBSD/Xen Dom0 and update FreeBSD to r284870 or
 any later revision make sure you are using the xen-kernel-4.5.0_4 and
 xen-tools-4.5.0_7 packages (or any later version), or else you won't be
 able to boot.

 Sorry for the trouble this might cause. Be aware that the Xen PVH
 interface (which FreeBSD uses) is still not marked as stable, so other
 incompatible changes will happen before this is fully stabilized.

 Users of FreeBSD as a Xen guest (PVHVM mode) are not affected and should
 ignore this message.

 Roger.



HEAD UP on 10.2 the instructions found at
http://wiki.xen.org/wiki/FreeBSD_Dom0
 git branch
 master
* stable-4.5



no longer appear to work

gmake -j8 install-tools HOSTCC=gcc48 CC=gcc48

fails with
__SNIP__
gmake[3]: Entering directory
'/usr/home/dingo/xen/tools/qemu-xen-dir-remote'
 GEN   config-host.h
 GEN   trace/generated-tracers.h
 GEN   trace/generated-tracers.c
 LINK  qemu-nbd
 LINK  qemu-img
c++  LINK  qemu-io
: error: unknown argument: '-fstack-protector-strong'
c++: error: unknown argument: '-fstack-protector-strong'
/usr/home/dingo/xen/tools/qemu-xen-dir/rules.mak:92: recipe for target
'qemu-nbd' failed
gmake[3]: *** [qemu-nbd] Error 1
gmake[3]: *** Waiting for unfinished jobs
c++: error: unknown argument: '-fstack-protector-strong'
/usr/home/dingo/xen/tools/qemu-xen-dir/rules.mak:92: recipe for target
'qemu-img' failed
gmake[3]: *** [qemu-img] Error 1
/usr/home/dingo/xen/tools/qemu-xen-dir/rules.mak:92: recipe for target
'qemu-io' failed
gmake[3]: *** [qemu-io] Error 1
 GEN   i386-softmmu/config-target.h
 LINK  i386-softmmu/qemu-system-i386
c++: error: unknown argument: '-fstack-protector-strong'
Makefile:175: recipe for target 'qemu-system-i386' failed
gmake[4]: *** [qemu-system-i386] Error 1
Makefile:167: recipe for target 'subdir-i386-softmmu' failed
gmake[3]: *** [subdir-i386-softmmu] Error 2
gmake[3]: Leaving directory '/usr/home/dingo/xen/tools/qemu-xen-dir-remote'
Makefile:201: recipe for target 'subdir-all-qemu-xen-dir' failed
gmake[2]: *** [subdir-all-qemu-xen-dir] Error 2
gmake[2]: Leaving directory '/usr/home/dingo/xen/tools'
/usr/home/dingo/xen/tools/../tools/Rules.mk:111: recipe for target
'subdirs-install' failed
gmake[1]: *** [subdirs-install] Error 2
gmake[1]: Leaving directory '/usr/home/dingo/xen/tools'
Makefile:69: recipe for target 'install-tools' failed
gmake: *** [install-tools] Error 2





 ___
 freebsd-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-xen
 To unsubscribe, send any mail to freebsd-xen-unsubscr...@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

HEAD UP: notice to FreeBSD/Xen Dom0 users

2015-06-26 Thread Roger Pau Monné
Hello,

If you are running a FreeBSD/Xen Dom0 and update FreeBSD to r284870 or
any later revision make sure you are using the xen-kernel-4.5.0_4 and
xen-tools-4.5.0_7 packages (or any later version), or else you won't be
able to boot.

Sorry for the trouble this might cause. Be aware that the Xen PVH
interface (which FreeBSD uses) is still not marked as stable, so other
incompatible changes will happen before this is fully stabilized.

Users of FreeBSD as a Xen guest (PVHVM mode) are not affected and should
ignore this message.

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