Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: hvm domus on netbsd-10 dom0 zvol



"Hauke Fath (SPG)" <hf%spg.tu-darmstadt.de@localhost> writes:

> On 2024-07-11 17:49, Brad Spencer wrote:
>> I believe that the "dsk" device must be used in a Xen
>> config to access a zvol for the purposes of presenting it to the guest.
>> That is, make sure that you use the block device and not the character
>> device.
>
> xl doesn't like the block device:

I am not entirely convinced of that...

> # xl -vv create -c arch-stick.conf
> Parsing config from arch-stick.conf
> libxl: detail: libxl_create.c:671:libxl__domain_make: passthrough: disabled
> libxl: error: libxl_device.c:437:libxl__device_disk_set_backend: Disk 
> vdev=hda failed to stat: phy:/dev/zvol/dsk/tank/arch-stick: No such file 
> or directory
> libxl: error: libxl_create.c:1331:initiate_domain_create: Domain 
> 12:Unable to set disk defaults for disk 0
> libxl: error: libxl_domain.c:354:libxl_domain_info: Domain 12:Getting 
> domain info: No such process
> libxl: error: libxl_domain.c:1179:libxl__destroy_domid: Domain 
> 12:Non-existant domain
> libxl: error: libxl_domain.c:1133:domain_destroy_callback: Domain 
> 12:Unable to destroy guest
> libxl: error: libxl_domain.c:1060:domain_destroy_cb: Domain 
> 12:Destruction of domain failed


> # cat /var/log/xen/qemu-dm-arch-stick.log
> char device redirected to /dev/pts/4 (label serial0)
> VNC server running on 127.0.0.1:5901
> qemu-system-i386: failed to create 'qdisk' device '5632': no dev parameter
> brconfig: bn1 is not a bridge
> qemu-system-i386: network script /etc/pkg/xen/scripts/qemu-ifup failed 
> with status 256
> qemu-system-i386: terminating on signal 1 from pid 6664 (<unknown process>)

The above hints of a possible problem with networking.

> # ls -l /dev/zvol/{,r}dsk/tank/arch-stick
> brw-------  1 root  wheel       190, 2 Jul 11 12:09 
> /dev/zvol/dsk/tank/arch-stick
> crw-------  1 root  wheel       190, 2 Jul 11 12:17 
> /dev/zvol/rdsk/tank/arch-stick
> #
>
> The DomU configuration has
>
> type = "hvm"
> name = "arch-stick"
> memory = 2048
> vcpus = 2
> vif = [ 'mac=00:16:3e:6c:4b:11, bridge=bridge0' ]
> disk =	[ 'format=raw, vdev=hda, access=rw, 
> target=phy:/dev/zvol/dsk/tank/arch-stick' ]
>
> Cheerio,
> Hauke

This uses older directives that may have been completely removed from
your version of Xen, so it might not work, but the following is how I
started HVM guests in the past on Xen 4.15 (and 4.8), except that I
would use LVM block devices.  I don't think that ZFS block devices
should matter.  There was some condition where I had to use
'qemu-xen-traditional', as well, but I have forgotten what that is.  I
adapted you config from information I used in the past.

kernel = "/usr/pkg/lib/xen/boot/hvmloader"
builder='hvm'
device_model_version="qemu-xen-traditional"
name = "arch-stick"
memory = 2048
vcpus = 2
vif = [ 'mac=00:16:3e:6c:4b:11, bridge=bridge0, type=ioemu' ]
disk = [ '/dev/zvol/dsk/tank/arch-stick,ioemu:hda,w' ]
boot='c'


I have moved away from HVM to PVH everywhere, including my ArchLinux
guests, but those did start out as a HVM guest booting the ArchLinux
install ISO.  With Linux guests, you can convert the guest to PV or PVH
later.





-- 
Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS - http://anduin.eldar.org


Home | Main Index | Thread Index | Old Index