bhyve vm-bhyve: dataset does not exists

martinrame

Member

Reaction score: 11
Messages: 92

Hi, I have one virtual machine that returns "dataset does not exist" when I run vm info.

The configuration file of this vm is in /zroot/vms/windows7, there are two files device.map and windows7.conf.

device.map

Code:
(hd0) /datos/vms/Windows7/os_disk
(hd1) /datos/vms/Windows7/datos_disk

windows7.conf

Code:
loader="uefi"
graphics="yes"
graphics_port="5905"
cpu=2
memory=4092M
network0_type="e1000"
network0_switch="public"
disk0_type="ahci-hd"
disk0_dev="custom"
disk0_name="/dev/zvol/datos/vms/Windows7/os_disk"
disk1_type="ahci-hd"
disk1_dev="custom"
disk1_name="/dev/zvol/datos/vms/Windows7/datos_disk"

# nota: para acceso vnc agregar
# -s 29,fbuf,tcp=0.0.0.0:5902,wait \

uuid="9a225132-b313-11eb-8660-b42e99ead36c"
network0_mac="58:9c:fc:07:0d:d8"

When I run vm info windows7 I get:
Code:
------------------------
Virtual Machine: windows7
------------------------
  state: stopped
  datastore: default
  loader: uefi
  uuid: 9a225132-b313-11eb-8660-b42e99ead36c
  uefi: default
  cpu: 2
  memory: 4092M

  network-interface
    number: 0
    emulation: e1000
    virtual-switch: public
    fixed-mac-address: 58:9c:fc:07:0d:d8
    fixed-device: -

  virtual-disk
    number: 0
    device-type: custom
    emulation: ahci-hd
    options: -
    system-path: /dev/zvol/datos/vms/Windows7/os_disk

  virtual-disk
    number: 1
    device-type: custom
    emulation: ahci-hd
    options: -
    system-path: /dev/zvol/datos/vms/Windows7/datos_disk
cannot open 'zroot/vms/windows7': dataset does not exist
cannot open 'zroot/vms/windows7': dataset does not exist

  clone-origin

As you can see, there are two not so friendly lines:

Code:
cannot open 'zroot/vms/windows7': dataset does not exist
cannot open 'zroot/vms/windows7': dataset does not exist

I think those messages appear because the root vms directory is /zroot/vms (defined in /etc/rc.conf) but there's no /zroot/vms/windows7 dataset, it's just a directory.

Should I create a zfs dataset in /zroot/vms/windows7 to get rid of those messages?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,602
Messages: 37,927

I think those messages appear because the root vms directory is /zroot/vms (defined in /etc/rc.conf) but there's no /zroot/vms/windows7 dataset, it's just a directory.
It looks like you created the VM when the ZFS dataset was set to datos/vms instead of zroot/vms. So you're going to have to move the datasets.

You can use an additional datastore, if you configure it:
Code:
root@hosaka:~ # vm datastore list
NAME            TYPE        PATH                      ZFS DATASET
default         zfs         /vm                       zroot/DATA/vm
stor10k         zfs         /storage/vm               stor10k/DATA/vm
 
OP
martinrame

martinrame

Member

Reaction score: 11
Messages: 92

Well, in fact this was a VM I used to launch manually, with the plain bhyve command, then I created a directory inside the vm-bhyve directory (instead of vm create ...), and created the /zroot/vms/windows7/windows7.conf then figured out how to run it using vm-bhyve.

Now I think I should rename the directory, run vm create windows7 to let vm-bhyve create the dataset, then move the files into it.
 
Top