mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
bhyvexml2argv: Add tests for domain-configured bootloader, args
This commit is contained in:
parent
79f370fc4b
commit
cf133ed1c6
@ -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
|
@ -0,0 +1 @@
|
||||
/usr/sbin/bhyveload -X -Y -Z
|
@ -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>
|
3
tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args
Normal file
3
tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args
Normal 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
|
@ -0,0 +1 @@
|
||||
/fizz_buzz_bazz -X -Y -Z
|
24
tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.xml
Normal file
24
tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.xml
Normal 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>
|
@ -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
|
@ -0,0 +1 @@
|
||||
(cd) /tmp/cdrom.iso
|
@ -0,0 +1,2 @@
|
||||
/usr/local/sbin/grub-bhyve --root cd --device-map '<device.map>' --memory 214 \
|
||||
bhyve
|
23
tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.xml
Normal file
23
tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.xml
Normal 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>
|
3
tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args
Normal file
3
tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args
Normal 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
|
@ -0,0 +1 @@
|
||||
(hd0) /tmp/freebsd.img
|
@ -0,0 +1,2 @@
|
||||
/usr/local/sbin/grub-bhyve --root hd0,msdos1 --device-map '<device.map>' \
|
||||
--memory 214 bhyve
|
23
tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.xml
Normal file
23
tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.xml
Normal 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>
|
@ -160,6 +160,10 @@ mymain(void)
|
||||
DO_TEST("macaddr");
|
||||
DO_TEST("serial");
|
||||
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.xmlopt);
|
||||
|
Loading…
Reference in New Issue
Block a user