ISSUE: VIrtIO disks not found (during Image capture/deploy)
-
Server
- FOG Version: 1.3.0
- OS: Ubuntu 16.04.1 LTS
Client
- Service Version: Debian Lenny
- OS: Debian lenny (any modern Linux with virtio block driver)
Description
During Image Creation or Image Restore disks are not found if using paravirtual drivers (virtio).
When a VirtualMachine uses VirtIO (KVM/VMware) or (presumibily) XEN vbd disk, during capture/deploy process fog reports this error: “Cannot find disk on system (getHardDisk)”
I have see the code and I think it could be fixed adding the next Major numbers to the lsblk filter: 202(Xen) and 253 (VirtIO)
So, the code will be something like this:
cat fogproject/src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh ...snip... getHardDisk() { [[ -n $fdrive ]] && hd=$(echo $fdrive) [[ -n $hd ]] && return ->>> local devs=$(lsblk -dpno KNAME -I 3,8,9,179,202,253,259 | uniq | sort -V) <<<- disks=$(echo $devs) [[ -z $disks ]] && handleError "Cannot find disk on system (${FUNCNAME[0]})\n Args Passed: $*" [[ $1 == true ]] && return for hd in $disks; do break done }
-
@alv000h Thank you for the information.
I’ve pushed your suggestion in to the working-1.3.2 branch on github and found that the partition getter was missing this changes as well.
I’ve updated with your suggestions and fixed this partition to follow this approach as well. I’ve also moved this thread into Feature requests.
While I’m sure the info was unexpected, we didn’t know that this was even a problem until you brought it forward. We use the HDD id’s to limit what is/isn’t visible to the fog system and probably didn’t have Xen or VirtIO disks until this very first report. As we hadn’t known about this even being an issue, I’m considering this a feature request. Hopefully you understand.
I’ve updated the inits on the working-1.3.2 branch and they are currently up for being used.
If you do need these inits (they should work fine for 1.3.1 as well), please run:
wget --no-check-certificate /var/www/fog/service/ipxe/init.xz https://fogproject.org/inits/init.xz wget --no-check-certificate /var/www/fog/service/ipxe/init_32.xz https://fogproject.org/inits/init_32.xz
-
I have open Pull Request #152 in github
https://github.com/FOGProject/fogproject/pull/152@george1421, +1 in github PR are welcome…
-
@alv000h Thank you for the information.
I’ve pushed your suggestion in to the working-1.3.2 branch on github and found that the partition getter was missing this changes as well.
I’ve updated with your suggestions and fixed this partition to follow this approach as well. I’ve also moved this thread into Feature requests.
While I’m sure the info was unexpected, we didn’t know that this was even a problem until you brought it forward. We use the HDD id’s to limit what is/isn’t visible to the fog system and probably didn’t have Xen or VirtIO disks until this very first report. As we hadn’t known about this even being an issue, I’m considering this a feature request. Hopefully you understand.
I’ve updated the inits on the working-1.3.2 branch and they are currently up for being used.
If you do need these inits (they should work fine for 1.3.1 as well), please run:
wget --no-check-certificate /var/www/fog/service/ipxe/init.xz https://fogproject.org/inits/init.xz wget --no-check-certificate /var/www/fog/service/ipxe/init_32.xz https://fogproject.org/inits/init_32.xz
-
@alv000h Excellent work.