omniosorg / pkg5

Image Packaging System
https://omnios.org/
Other
11 stars 55 forks source link

creating bhyve vm with zvol under zonepath now fails #330

Closed sjorge closed 3 years ago

sjorge commented 3 years ago
{
   "autoboot" : "false",
   "bootdisk" : {
      "blocksize" : "4K",
      "path" : "rpool/vms/rcon1/disk0",
      "size" : "10G",
      "sparse" : "false"
   },
   "bootrom" : "BHYVE_RELEASE",
   "brand" : "bhyve",
   "diskif" : "nvme",
   "hostbridge" : "i440fx",
   "net" : [
      {
         "global-nic" : "ixgbe0",
         "mac-addr" : "00:22:06:eb:5c:9f",
         "physical" : "rcon1",
         "vlan-id" : "10"
      }
   ],
   "ppt": [ "ppt0" ],
   "netif" : "virtio-net",
   "ram" : "1G",
   "rng" : "on",
   "vcpus" : "1,sockets=1,cores=1,threads=1",
   "vga" : "off",
   "vnc" : "off",
   "xhci" : "off",
   "zonename" : "rcon1",
   "zonepath" : "/zones/rcon1"
}
root@jupiter:~# zfs list -r rpool/vms
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
rpool/vms                             124G   126G   256K  /zones
... other hvm/zones here ...
rpool/vms/rcon1                      10.6G   126G   224K  /zones/rcon1
rpool/vms/rcon1/disk0                10.6G   136G   112K  -

Having a zvol (bootdisk or regular disks) under the zonepath used to work fine, but this now fails, no 100% sure this is a brand or zadm issue.

It used to work fine before, but now it fails with Zonepath /zones/rcon1 is on a nosuid file system. When the zvol is create it looks like it creates the parent rpool/vms/rcon1 which is mounted on /zones/rcon1, so far so good. However this dataset has setuid set to off with SOURCE set to temporary.

Creating the parent manually first sees to fix this (I set all properties to the values my existing bhyve VM's had on those datasets)

Perhaps somewhere the order in which the zvol vs dataset create got swapped recently.

sjorge commented 3 years ago

Still haven't found what is doing the creation of the zvol's