Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMware ovf file contains unsupported value of disk format #106

Open
muchengshu opened this issue Aug 20, 2024 · 5 comments
Open

VMware ovf file contains unsupported value of disk format #106

muchengshu opened this issue Aug 20, 2024 · 5 comments

Comments

@muchengshu
Copy link

muchengshu commented Aug 20, 2024

Problem Description:
When I import an ovf file generated by Isar into ESXi, I found there was an error message: Not supported value "[URL]" for attribute "format" of element "disk".

Expected behavior:
The ovf file should contain valid value of disk format: e.g. http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized.

Actual behavior:
The ovf file contains invalid value of disk format: http://www.vmware.com/interfaces/specifications/vmdk.html#.

How to reproduce:
Build the VMware image with Isar and the ovf file will be generated.

@ismagulb
Copy link
Contributor

Thanks Shu Mucheng (please correct) for the report,
which specific value does Isar generate?
Which value would you like to have instead?

@WiseLord
Copy link
Collaborator

WiseLord commented Aug 20, 2024

@muchengshu could you clarify where the error happens?

I tried to build virtualbox image and imported it with no errors:

isar $ vboxmanage import build/tmp/deploy/images/virtualbox/isar-image-base-debian-bookworm-virtualbox.ovf 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/Work/isar/build/tmp/deploy/images/virtualbox/isar-image-base-debian-bookworm-virtualbox.ovf...
OK.
Disks:
  vmdisk1       1680332800      -1      http://www.vmware.com/interfaces/specifications/vmdk.html#      isar-image-base-debian-bookworm-virtualbox-disk001.vmdk -1      -1

Virtual system 0:
 0: Suggested OS type: "Debian_64"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: Suggested VM name "isar-image-base-debian-bookworm-virtualbox 6"
    (change with "--vsys 0 --vmname <name>")
 2: Suggested VM group "/"
    (change with "--vsys 0 --group <group>")
 3: Suggested VM settings file name "/home/Share/VirtualBox/isar-image-base-debian-bookworm-virtualbox 6/isar-image-base-debian-bookworm-virtualbox 6.vbox"
    (change with "--vsys 0 --settingsfile <filename>")
 4: Suggested VM base folder "/home/Share/VirtualBox"
    (change with "--vsys 0 --basefolder <path>")
 5: Number of CPUs: 4
    (change with "--vsys 0 --cpus <n>")
 6: Guest memory: 8192 MB
    (change with "--vsys 0 --memory <MB>")
 7: Sound card (appliance expects "ensoniq1371", can change on import)
    (disable with "--vsys 0 --unit 7 --ignore")
 8: USB controller
    (disable with "--vsys 0 --unit 8 --ignore")
 9: Network adapter: orig NAT, config 6, extra slot=0;type=NAT
10: CD-ROM
    (disable with "--vsys 0 --unit 10 --ignore")
11: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 11 --ignore")
12: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 12 --ignore")
13: VirtioSCSI controller, type VirtioSCSI
    (disable with "--vsys 0 --unit 13 --ignore")
14: Hard disk image: source image=isar-image-base-debian-bookworm-virtualbox-disk001.vmdk, target path=isar-image-base-debian-bookworm-virtualbox-disk001.vmdk, controller=13;port=0
    (change target path with "--vsys 0 --unit 14 --disk path";
    change controller with "--vsys 0 --unit 14 --controller <index>";
    change controller port with "--vsys 0 --unit 14 --port <n>";
    disable with "--vsys 0 --unit 14 --ignore")
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully imported the appliance.

Imported machine boots OK.

@muchengshu
Copy link
Author

muchengshu commented Aug 21, 2024

Thanks Shu Mucheng (please correct) for the report, which specific value does Isar generate? Which value would you like to have instead?

Thanks for your reply. When I build the ova image, meta-isar/conf/machine/vmware.conf will specify the OVF_TEMPLATE_FILE to meta/recipes-core/images/vmware/vm-img-vmware.ovf.tmpl. After investigation, I found the variable VMDK_SUBFORMAT was not assigned to the template file(meta/classes/imagetypes_vm.bbclass, line 63). My expectation is that I can specify any valid value for the ovf file. I have posted the patch in mail list isar-users, please check the mail for details, thanks.

@muchengshu
Copy link
Author

@muchengshu could you clarify where the error happens?

I tried to build virtualbox image and imported it with no errors:

isar $ vboxmanage import build/tmp/deploy/images/virtualbox/isar-image-base-debian-bookworm-virtualbox.ovf 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/Work/isar/build/tmp/deploy/images/virtualbox/isar-image-base-debian-bookworm-virtualbox.ovf...
OK.
Disks:
  vmdisk1       1680332800      -1      http://www.vmware.com/interfaces/specifications/vmdk.html#      isar-image-base-debian-bookworm-virtualbox-disk001.vmdk -1      -1

Virtual system 0:
 0: Suggested OS type: "Debian_64"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: Suggested VM name "isar-image-base-debian-bookworm-virtualbox 6"
    (change with "--vsys 0 --vmname <name>")
 2: Suggested VM group "/"
    (change with "--vsys 0 --group <group>")
 3: Suggested VM settings file name "/home/Share/VirtualBox/isar-image-base-debian-bookworm-virtualbox 6/isar-image-base-debian-bookworm-virtualbox 6.vbox"
    (change with "--vsys 0 --settingsfile <filename>")
 4: Suggested VM base folder "/home/Share/VirtualBox"
    (change with "--vsys 0 --basefolder <path>")
 5: Number of CPUs: 4
    (change with "--vsys 0 --cpus <n>")
 6: Guest memory: 8192 MB
    (change with "--vsys 0 --memory <MB>")
 7: Sound card (appliance expects "ensoniq1371", can change on import)
    (disable with "--vsys 0 --unit 7 --ignore")
 8: USB controller
    (disable with "--vsys 0 --unit 8 --ignore")
 9: Network adapter: orig NAT, config 6, extra slot=0;type=NAT
10: CD-ROM
    (disable with "--vsys 0 --unit 10 --ignore")
11: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 11 --ignore")
12: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 12 --ignore")
13: VirtioSCSI controller, type VirtioSCSI
    (disable with "--vsys 0 --unit 13 --ignore")
14: Hard disk image: source image=isar-image-base-debian-bookworm-virtualbox-disk001.vmdk, target path=isar-image-base-debian-bookworm-virtualbox-disk001.vmdk, controller=13;port=0
    (change target path with "--vsys 0 --unit 14 --disk path";
    change controller with "--vsys 0 --unit 14 --controller <index>";
    change controller port with "--vsys 0 --unit 14 --port <n>";
    disable with "--vsys 0 --unit 14 --ignore")
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully imported the appliance.

Imported machine boots OK.

Thanks for your reply. VirtualBox and VMware workstation are both OK for that. As I mentioned, it just comes out in ESXi(an OS installed on servers from VMware).

@WiseLord
Copy link
Collaborator

Yes, using VMDK_SUBFORMAT inside .tmpl files without adding them to OVA_VARS looks incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants