bhyvexml2argv: Add tests for domain-configured bootloader, args

This commit is contained in:
Conrad Meyer 2014-11-08 11:48:33 -05:00 committed by Michal Privoznik
parent 79f370fc4b
commit cf133ed1c6
15 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,3 @@
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
-s 2:0,ahci-hd,/tmp/freebsd.img bhyve

View File

@ -0,0 +1 @@
/usr/sbin/bhyveload -X -Y -Z

View File

@ -0,0 +1,23 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
<memory>219136</memory>
<vcpu>1</vcpu>
<bootloader_args>-X -Y -Z</bootloader_args>
<os>
<type>hvm</type>
</os>
<devices>
<disk type='file'>
<driver name='file' type='raw'/>
<source file='/tmp/freebsd.img'/>
<target dev='hda' bus='sata'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</disk>
<interface type='bridge'>
<model type='virtio'/>
<source bridge="virbr0"/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
</devices>
</domain>

View File

@ -0,0 +1,3 @@
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
-s 2:0,ahci-hd,/tmp/freebsd.img bhyve

View File

@ -0,0 +1 @@
/fizz_buzz_bazz -X -Y -Z

View File

@ -0,0 +1,24 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
<memory>219136</memory>
<vcpu>1</vcpu>
<bootloader>/fizz_buzz_bazz</bootloader>
<bootloader_args>-X -Y -Z</bootloader_args>
<os>
<type>hvm</type>
</os>
<devices>
<disk type='file'>
<driver name='file' type='raw'/>
<source file='/tmp/freebsd.img'/>
<target dev='hda' bus='sata'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</disk>
<interface type='bridge'>
<model type='virtio'/>
<source bridge="virbr0"/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
</devices>
</domain>

View File

@ -0,0 +1,3 @@
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
-s 2:0,ahci-cd,/tmp/cdrom.iso bhyve

View File

@ -0,0 +1 @@
(cd) /tmp/cdrom.iso

View File

@ -0,0 +1,2 @@
/usr/local/sbin/grub-bhyve --root cd --device-map '<device.map>' --memory 214 \
bhyve

View File

@ -0,0 +1,23 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
<memory>219136</memory>
<vcpu>1</vcpu>
<bootloader>/usr/local/sbin/grub-bhyve</bootloader>
<os>
<type>hvm</type>
</os>
<devices>
<disk type='file' device='cdrom'>
<driver name='file' type='raw'/>
<source file='/tmp/cdrom.iso'/>
<target dev='hdc' bus='sata'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</disk>
<interface type='bridge'>
<model type='virtio'/>
<source bridge="virbr0"/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
</devices>
</domain>

View File

@ -0,0 +1,3 @@
/usr/sbin/bhyve -c 1 -m 214 -H -P -s 0:0,hostbridge \
-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \
-s 2:0,ahci-hd,/tmp/freebsd.img bhyve

View File

@ -0,0 +1 @@
(hd0) /tmp/freebsd.img

View File

@ -0,0 +1,2 @@
/usr/local/sbin/grub-bhyve --root hd0,msdos1 --device-map '<device.map>' \
--memory 214 bhyve

View File

@ -0,0 +1,23 @@
<domain type='bhyve'>
<name>bhyve</name>
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
<memory>219136</memory>
<vcpu>1</vcpu>
<bootloader>/usr/local/sbin/grub-bhyve</bootloader>
<os>
<type>hvm</type>
</os>
<devices>
<disk type='file'>
<driver name='file' type='raw'/>
<source file='/tmp/freebsd.img'/>
<target dev='hda' bus='sata'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</disk>
<interface type='bridge'>
<model type='virtio'/>
<source bridge="virbr0"/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
</devices>
</domain>

View File

@ -160,6 +160,10 @@ mymain(void)
DO_TEST("macaddr"); DO_TEST("macaddr");
DO_TEST("serial"); DO_TEST("serial");
DO_TEST("console"); DO_TEST("console");
DO_TEST("grub-defaults");
DO_TEST("bhyveload-explicitargs");
DO_TEST("custom-loader");
DO_TEST("disk-cdrom-grub");
virObjectUnref(driver.caps); virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt); virObjectUnref(driver.xmlopt);