VirtualBox

2 月 前 建立

3 天 前 更新

#22278 assigned defect

vboxpostintall.sh failure for Subiquity based unattended installs

回報者: ogayot 負責人: gombara
元件: other 版本: VirtualBox-7.1.4
關鍵字: 副本: ogayot
Guest type: Linux Host type: other

描述

Hello,

I am one of the developers of the Subiquity project (Ubuntu). Since recently, we started receiving bug reports [1] showing failed installations done using the unattended install mechanism of VirtualBox.

In the bugs reports, we see the script vboxpostinstall.sh failing with exit status 1.

I haven't had a chance to reproduce the issue yet, nor to get my hand on any vboxpostinstall.log log file - because Ubuntu does not automatically collect it.

However, after investigating, I found this:

Dec 17 09:31:33 ubuntu subiquity_log.3847[21868]: usermod: user 'vboxuser' does not exist
Dec 17 09:31:33 ubuntu subiquity_log.3847[21871]: ** exit code: 6

which I think is coming from this directive [2]

log_command_in_target usermod -a -G vboxsf "@@VBOX_INSERT_USER_LOGIN@@"

Currently subiquity-based installers defer the user creation until after first boot (we rely on cloud-init to perform the user creation). So we should somehow make sure that either:

  1. The postinstall.sh is not dependent on user-creation ; or
  2. We ensure the user user is created before (possibly using late-commands?) [3]

Thank you,

Olivier

更動歷史 (2)

comment:1 3 天 前Klaus Espenlaub 編輯

Hi Olivier,

is it possible to tell subiquity to add the group membership stuff to the cloud-init config it generates? That would be the cleanest solution I can think of, because it directly does 'the right thing' for user creation.

Would it work to extend the current user-data section in ubuntu_autoinstall_user_data (which is already in cloud-init form, but autoinstall/identity doesn't have any provisions for group membership) to something like

  user-data:

    users:
      - name: root
        primary_group: root
        groups: sudo
        lock-passwd: false
        passwd: '@@VBOX_INSERT_USER_PASSWORD_SHACRYPT512@@'
        uid: 0

@@VBOX_COND_IS_INSTALLING_ADDITIONS@@
      - name: '@@VBOX_INSERT_USER_LOGIN@@'
        groups: vboxsf
@@VBOX_COND_END

which essentially does what I hinted above if subiquity is smart enough to merge its stuff with the group membership.

comment:2 3 天 前gombara 編輯

狀態: newassigned
負責人: 指定為 gombara
注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette