Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
susu.exp
Posts: 35
Joined: 15. Feb 2012, 09:01

Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by susu.exp »

VBox 7.0.10 uninstalled successfully in non-global zones, but fails to uninstall from the global zone?

[Have to remove old version 7.0.10 before upgrade to VBox 7.0.14]


# uname -a
SunOS [hostname] 5.11 11.4.42.111.0 i86pc i386 i86pc non-virtualized

Code: Select all

# pkgrm -v SUNWvbox

The following package is currently installed:
   SUNWvbox  Oracle VM VirtualBox
             (i386) 7.0.10,REV=2023.07.12.19.27.39.158379

Do you want to remove this package? [y,n,?,q] yes

## Removing installed package instance <SUNWvbox>
(A previous attempt may have been unsuccessful.)

This package contains scripts which will be executed with super-user
permission during the process of removing this package.

Do you want to continue with the removal of this package [y,n,?,q] yes
## Verifying package <SUNWvbox> dependencies in global zone
## Processing package information.
## Executing preremove script.
+ zonename
+ currentzone=global
+ test xglobal '=' xglobal
+ echo 'Removing VirtualBox services and drivers...'
Removing VirtualBox services and drivers...
+ //opt/VirtualBox/vboxconfig.sh --preremove
/var/sadm/pkg/SUNWvbox/install/preremove[32]: //opt/VirtualBox/vboxconfig.sh: not found [No such file or directory]
+ test 127 -eq 0
+ echo '## Failed.'
+ 1>& 2
## Failed.
+ exit 1
pkgrm: ERROR: preremove script did not complete successfully

Removal of <SUNWvbox> failed.


Thanks to BEs, data not lost, but without a patch...this is bad.
susu.exp
Posts: 35
Joined: 15. Feb 2012, 09:01

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by susu.exp »

I did install and configure VBox in zone vbox0, then I cloned zones vbox1-vbox6 from vbox0.

Maybe that's what broke uninstall in the GZ?
susu.exp
Posts: 35
Joined: 15. Feb 2012, 09:01

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by susu.exp »

So prstat revealed a vbox process, which i killed. Then I cleared the FMRI fault and took the vbox service out of maintenance mode, which allowed a reinstall of the same version of VBox, and a subsequent clean uninstall, which is nice.

I got the "reinstall same version" trick from the Windows Hosts forum here, where it's been waiting to help since at least 2010. :lol:

Vbox now updated to 7.0.14 and all VMs are up & running. VBox Forums FTW :mrgreen:
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by scottgus1 »

Great! Glad you kept up the hunt and found a solution!
HeatherMoran
Posts: 2
Joined: 9. Feb 2024, 15:28

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by HeatherMoran »

I want to ask something. Can I ask here or I start a new thread?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by scottgus1 »

@HeatherMoran, please use the "New Topic" button at the top of every subforum page. We'll be happy to help.
paulson
Oracle Corporation
Posts: 28
Joined: 6. Jun 2019, 20:16

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by paulson »

@HeatherMoran, glad you found a workaround but I'm curious as to how the
global zone VirtualBox installation was affected by uninstalling the
VBox package in a non-global zone. Do you have /opt loopback mounted
into the zone from the global zone? What is the non-global zone's
configuration? (zonecfg -z zone info)

If VirtualBox is installed in the global zone and the relevant
/dev/vbox* devices are shared to the non-global zone and /opt is
loopback mounted (ideally read-only) into the zone then I don't think
you need to install VirtualBox into the non-global zone. Have you tried
that configuration and found it doesn't work?

I'm just trying to get a clearer picture of what went wrong here in case
there is a bug in the VirtualBox package or if we need improved
documentation for the non-global zone scenario
(https://www.virtualbox.org/manual/UserM ... aris-zones).
Thanks!

-Brent
susu.exp
Posts: 35
Joined: 15. Feb 2012, 09:01

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by susu.exp »

paulson wrote: 26. Feb 2024, 01:09 @HeatherMoran, glad you found a workaround but I'm curious as to how the
global zone VirtualBox installation was affected by uninstalling the
VBox package in a non-global zone. Do you have /opt loopback mounted
into the zone from the global zone? What is the non-global zone's
configuration? (zonecfg -z zone info)
@paulson: Please forgive the latency! Evidently, I'll need to review my error-handling routines. :lol:

Yes, have GZ /opt/Virtualbox mounted by lofs in VB zones with no options set [presumably r/w]. But not the whole of /opt. eg:

Code: Select all

$ zonecfg -z vbz2 info
zonename: vbz2
brand: solaris
autoboot: true
bootargs: -m verbose
fs:
        dir: /opt/VirtualBox
        special: /opt/VirtualBox
        type: lofs
        options: []
anet:
        linkname: net0
        configure-allowed-address: true
        auto-mac-address: 2:8:20:2c:57:d
device:
        match: /dev/vboxdrv
device:
        match: /dev/vboxdrvu


If VirtualBox is installed in the global zone and the relevant
/dev/vbox* devices are shared to the non-global zone and /opt is
loopback mounted (ideally read-only) into the zone then I don't think
you need to install VirtualBox into the non-global zone. Have you tried
that configuration and found it doesn't work?
I haven't changed my VBox roll in quite a while, so no not lately. :oops:

But 1 [5] less thing is one less thing, and this upgrade I will uninstall manually as prev, then reinstall on the Global Zone and attempt to boot an existing VM in an existing nonglobal zone, since /opt/VirtualBox is connected via loopback and I have nothing to lose. :mrgreen:


I'm just trying to get a clearer picture of what went wrong here in case
there is a bug in the VirtualBox package or if we need improved
documentation for the non-global zone scenario
(https://www.virtualbox.org/manual/UserM ... aris-zones).
Thanks!

-Brent
I may have a PuTTY text dump of that terminal session [it's most likely user error], and probably logs.
Solaris host is still on VB 7.0.14, plan to upgrade to 7.0.18 in the next few days and can get you whatever might be of interest.

Thank you for checking. 8)
susu.exp
Posts: 35
Joined: 15. Feb 2012, 09:01

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by susu.exp »

Once again uninstall from Solaris 11.4 Global Zone fails when attempt update


Code: Select all

# pkgrm SUNWvbox

The following package is currently installed:
   SUNWvbox  Oracle VM VirtualBox
             (i386) 7.0.14,REV=2024.01.15.15.24.40.161095

Do you want to remove this package? [y,n,?,q] y

## Removing installed package instance <SUNWvbox>

This package contains scripts which will be executed with super-user
permission during the process of removing this package.

Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package <SUNWvbox> dependencies in global zone
## Processing package information.
## Executing preremove script.
Removing VirtualBox services and drivers...
/var/sadm/pkg/SUNWvbox/install/preremove[32]: //opt/VirtualBox/vboxconfig.sh: not found [No such file or directory]
## Failed.
pkgrm: ERROR: preremove script did not complete successfully

Removal of <SUNWvbox> failed.
susu.exp
Posts: 35
Joined: 15. Feb 2012, 09:01

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by susu.exp »

And once again, reinstall of current version [7.0.14] was successful and allowed uninstall of 7.0.14 and install of version 7.0.20. :)
susu.exp
Posts: 35
Joined: 15. Feb 2012, 09:01

Re: Can't uninstall VBox 7.0.10 from Solaris 11.4 Host

Post by susu.exp »

paulson wrote: 26. Feb 2024, 01:09 @HeatherMoran, glad you found a workaround but I'm curious as to how the
global zone VirtualBox installation was affected by uninstalling the
VBox package in a non-global zone. Do you have /opt loopback mounted
into the zone from the global zone? What is the non-global zone's
configuration? (zonecfg -z zone info)

If VirtualBox is installed in the global zone and the relevant
/dev/vbox* devices are shared to the non-global zone and /opt is
loopback mounted (ideally read-only) into the zone then I don't think
you need to install VirtualBox into the non-global zone. Have you tried
that configuration and found it doesn't work?
With /opt/virtualbox looped back as shown in my previous post, VBox 7.0.20 needs to be installed in my non-global zones to run VBox commands in the ngzs.


I'm just trying to get a clearer picture of what went wrong here in case
there is a bug in the VirtualBox package or if we need improved
documentation for the non-global zone scenario
(https://www.virtualbox.org/manual/UserM ... aris-zones).
Thanks!

-Brent

It feels like the vboxconfig.sh script gets lost, disconnected, or something gets stale in the Global instance of VBox?

The Solaris host is headless and I typically only interact with the non-global VBox zone hosts, and I usually access the guests over vbox vrde. Most guests are linux and illumos desktop OSs behind VBox NAT and are also SMB or NFS clients, if that's relevant.
Post Reply