Looking for a Libvirt example xml file
Conrad Meyer
cse.cem at gmail.com
Sun Oct 26 12:35:59 UTC 2014
On Sun, Oct 26, 2014 at 5:49 AM, Roman Bogorodskiy <novel at freebsd.org> wrote:
> Conrad Meyer wrote:
>
>> On Sat, Oct 25, 2014 at 9:42 PM, Willem Jan Withagen <wjw at digiware.nl> wrote:
>> > Seems that my CDrom block was a problem.
>> > But the disk is already build, so I just skipped that.
>>
>> Yes, even in git libvirt-bhyve doesn't work well with >1 disk :-(.
>
> Hi!
>
> Could you please provide more details on the issues you're seeing with
> that?
Hi Roman,
As far as I can tell, libvirt-bhyve will only boot from the first
disk, and ignores libvirt's boot ordering stuff. Unless libvirt sorts
the disks array by bootorder before passing to the driver? I had
trouble getting it to boot a select disk when I included both a cdrom
and hdd in my testing the other day. E.g. in git master:
297 virCommandPtr
298 virBhyveProcessBuildLoadCmd(virConnectPtr conn,
299 virDomainDefPtr def)
300 {
...
310 disk = def->disks[0];
...
329 cmd = virCommandNew(BHYVELOAD);
...
337 virCommandAddArg(cmd, "-d");
338 virCommandAddArg(cmd, virDomainDiskGetSource(disk));
Libvirt lets you specify some sort of boot ordering in domain XML
inside /domain/os[0]:
<boot dev='hd'/>
<boot dev='cdrom'/>
Although now that I am looking more closely it appears that ordering
is basically ignored for same-bus devices :-(. That may explain my
test results...
So, I guess the right way to do it is to slap "<boot order='N'/>"
inside <disk> elements. I didn't try that and don't know if libvirt
sorts those before handing off to driver.
[0]: http://libvirt.org/formatdomain.html#elementsOS
Thanks,
Conrad
More information about the freebsd-virtualization
mailing list