I am trying this method and can't quite figure out what root device to pass grub.

# Step 0, clear old vm1
bhyvectl --vm=vm1 --destroy

# Step 1, Launch grub-bhyve and configure grub.
grub-bhyve -r hd0 -m ./device.map -v -M 2048 vm1

# Step 2, type in the following commands
set root=(hd0,msdos1)
linux /vmlinuz root=/dev/vda1
initrd /initrd.img
boot

# Step 3, launch bhyve
bhyve -c 2 -m 2048M -A -H -P -s 0:0,amd_hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,vm1.img -l com1,stdio -W vm1


[...snip...]
[ 1.998485] Freeing unused kernel memory: 836K (ffff880001b2f000 - ffff880001c00000)
Loading, please wait...
[    2.012707] systemd-udevd[98]: starting version 204
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... [ 2.729112] Switched to clocksource tsc
done.
mount: can't read '/etc/fstab': No such file or directory
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
done.
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.


BusyBox v1.20.2 (Ubuntu 1:1.20.0-8.1ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)

No vda or sda in /dev/...  Do I need a custom initrd that supports virtio?




Trying AHCI-HD doesn't make anything better.
Redo Step 0 and Step 1, and use sda in Step 2:
linux /vmlinuz root=/dev/sda1

# Step 0, clear old vm1
bhyvectl --vm=vm1 --destroy

# Step 1, Launch grub-bhyve and configure grub.
grub-bhyve -r hd0 -m ./device.map -v -M 2048 vm1

# Step 2, type in the following commands
set root=(hd0,msdos1)
linux /vmlinuz root=/dev/sda1
initrd /initrd.img
boot

# Step 3, launch bhyve
bhyve -c 2 -m 2048M -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 1:1,ahci-hd,vm1.img -s 4,ahci-cd,vm1.iso -l com1,stdio -W vm1

but that gives a CORE DUMPED...

[..snip..]
Begin: Mounting root file system ... [    2.035418] scsi2 : ahci
Begin: Running /scripts/local-top ... done.
[    2.037537] scsi3 : ahci
[    2.039652] scsi4 : ahci
[    2.040360] scsi5 : ahci
[ 2.040750] ata1: SATA max UDMA/133 abar m1024@0xc0000000 port 0xc0000100 irq 33
[    2.041552] ata2: DUMMY
[    2.041828] ata3: DUMMY
[    2.042103] ata4: DUMMY
[    2.042377] ata5: DUMMY
[    2.042653] ata6: DUMMY
[    2.043880] ahci: SSS flag set, parallel bus scan disabled
[ 2.044683] ahci 0000:00:04.0: AHCI 0001.0300 16 slots 6 ports 6 Gbps 0x1 impl SATA mode [ 2.045583] ahci 0000:00:04.0: flags: 64bit ncq sntf ilck stag pm led clo pio slum part sxs apst
[    2.047250] scsi6 : ahci
[    2.047695] scsi7 : ahci
[    2.048082] scsi8 : ahci
[    2.048500] scsi9 : ahci
[    2.048916] scsi10 : ahci
[    2.049332] scsi11 : ahci
[ 2.049696] ata7: SATA max UDMA/133 abar m1024@0xc0000400 port 0xc0000500 irq 34
[    2.050503] ata8: DUMMY
[    2.050784] ata9: DUMMY
[    2.051063] ata10: DUMMY
[    2.051346] ata11: DUMMY
[    2.051660] ata12: DUMMY
[    2.361125] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.361872] ata1.00: ATA-8: BHYVE SATA DISK, 001, max UDMA/133
[    2.362499] ata1.00: 4194304 sectors, multi 128: LBA48 NCQ (depth 31/32)
[    2.363224] ata1.00: applying bridge limits
[    2.363776] ata1.00: configured for UDMA/100
[ 2.364383] scsi 0:0:0:0: Direct-Access ATA BHYVE SATA DISK 001 PQ: 0 ANSI: 5
[    2.365424] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 2.365451] sd 0:0:0:0: [sda] 4194304 512-byte logical blocks: (2.14 GB/2.00 GiB)
[    2.365547] sd 0:0:0:0: [sda] Write Protect is off
[ 2.365589] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.369088]  sda: sda1 sda2 < sda5 >
[    2.370173] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.372461] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.373257] ata7.00: ATAPI: BHYVE SATA DVD ROM, 001, max UDMA/133
[    2.374038] ata7.00: configured for UDMA/133
[ 2.374714] scsi 6:0:0:0: CD-ROM BHYVE BHYVE DVD-ROM 001 PQ: 0 ANSI: 5
[    2.375801] sr0: scsi3-mmc drive: 0x/0x xa/form2 caddy
[    2.376399] cdrom: Uniform CD-ROM driver Revision: 3.20
[    2.377096] sr 6:0:0:0: Attached scsi generic sg1 type 5
Begin: Running /scripts/local-premount ... done.
[ 2.497631] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[    2.498397] EXT4-fs (sda1): write access will be enabled during recovery
[    2.501272] EXT4-fs (sda1): recovery complete
[ 2.501927] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
[    2.728969] Switched to clocksource tsc
Assertion failed: (aior != NULL), function ahci_handle_dma, file /usr/src/usr.sbin/bhyve/pci_ahci.c, line 445.
                       Abort (core dumped)



10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

(root@bami) 524> kldstat
Id Refs Address            Size     Name
 1   32 0xffffffff80200000 15f0310  kernel
 2    1 0xffffffff81a12000 1546d8   zfs.ko
 3    1 0xffffffff81b67000 3858     opensolaris.ko
 4    1 0xffffffff81b6b000 aa35     if_lagg.ko
 5    1 0xffffffff81b76000 34d8     ums.ko
 6    1 0xffffffff81b7a000 802e     ipmi.ko
 7    1 0xffffffff81b83000 ae4      smbus.ko
 8    1 0xffffffff81b84000 5545     if_tap.ko
 9    2 0xffffffff81b8a000 52a4     bridgestp.ko
10    1 0xffffffff81b90000 947f     if_bridge.ko
11    1 0xffffffff81b9a000 16efe5   vmm.ko



Thanks in advance,
Rudy




_______________________________________________
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"

Reply via email to