Solaris Guests

From Proxmox VE
Jump to: navigation, search

Introduction

Oracle Solaris is a well known enterprise grade UNIX OS, originally made by Sun Microsystems. It has a rather large install-base. Not many people know this, but you can freely download and use Solaris 10 and Solaris 11 for personal use, the caveat being that you will have to register an Oracle account (also free). But like other non-Linux unices/unix-like OSes, Solaris can be confusing for people who have no *nix experience, or whose exposure to the *nix world has been primarily Linux, so there can be a slightly steep initial learning curve. Which is compounded when you attempt to install Solaris as a VM guest - it doesn't behave like Linux. There is a lot of disparate information about installing Solaris into a KVM environment, and there are countless threads where people are having trouble and asking for help, and not getting many answers.

Perhaps you're one of those people. You've setup Proxmox and you're trying to install Solaris 11, but it's so usefully telling you that Longmode isn't supported. You search the internet for the error and find vague threads from 2006. Or you're trying OpenIndiana and you're stuck in a kernel panic reboot loop. You can make out brief snippets of log like 'segmentation overrun' but again, your searching for help yields little. This page aims to help you with creating KVM guests in Proxmox using Solaris based OSes, by detailing the particular settings that worked for me, the author.

Note: The below notes are what worked for me, based on a lot of testing and collating tips, hints and clues from the aforementioned discussion threads. If I haven't mentioned it below, that means it's probably set to default! YMMV!

Solaris 10

  • Solaris 10 was released in January, 2005 and will receive support from Oracle until 2021.
  • For 32-bit, hit edit (e) during the Grub screen and then edit (e) the lines removing both instances of $ISA_PLAT e.g. /kernel/$ISA_PLAT/unix --> /kernel/unix. Once you've edited a line, hit Enter. When you're ready to boot, hit the boot (b) button.
    • If you take this path, you will likely have to make the change permanent by running vi /boot/grub/menu.1st, making the appropriate changes and then rebooting.
  • Otherwise, boot as normal and you should have 64-bit.
  • ISO used: sol-10-u11-ga-x86-dvd.iso

Hardware

  • Memory: 2GB
  • Processors: 1 [qemu64]
  • Hard Disk: raw, cache=writeback, 32G. <-- Can be IDE or SATA
  • Network: E1000, Bridged Mode <-- The Realtek NIC should work fine too

Options

  • OS Type: Other OS types (other)
  • Boot order: CD-ROM, Disk 'ide0' <-- During install
  • Boot order: Disk 'ide0', CD-ROM <-- After install
  • Use Tablet for Pointer: No
  • ACPI Support: Yes
  • KVM hardware virtualization: No <-- This is the important option, it disables the +x2apic flag which causes issues for Solaris
  • Use local time for RTC: Yes

Post-install

If you want to disable the GUI startup:

   /usr/dt/bin/dtconfig -d

And, to enable it again:

   /usr/dt/bin/dtconfig -e

Alternatively:

   svcadm disable cde-login

To allow root logins over ssh, edit /etc/ssh/sshd_config, updating the line PermitRootLogins no to PermitRootLogins yes before issuing svcadm restart svc:/network/ssh:default

Solaris 11

  • Solaris 11 was released in November 2011, and will receive support from Oracle until 2024.
  • No 32-bit option available. It's 64-bit or bust.
  • ISO used: sol-11_1-text-x86.iso

Hardware

See: Solaris 10

Options

See: Solaris 10

Post-install

To allow root logins over ssh:

  • Edit /etc/ssh/sshd_config, updating the line PermitRootLogins no to PermitRootLogins yes
  • Edit /etc/default/login, commenting out the line “CONSOLE=/dev/console”
  • Issue rolemod -K type=normal root, if this fails try usermod -K type=normal root
  • Issue svcadm restart svc:/network/ssh:default

OpenIndiana

  • OpenIndiana is a forked continuation of the defunct OpenSolaris OS. It uses Illumos at its core and is targetted for Server and Desktop use.
  • Supports both 32 and 64 bit, automatically selects 64 bit if more than 900M of memory is available.
  • ISO used: oi-dev-151a8-live-x86.iso

Hardware

See: Solaris 10

Options

See: Solaris 10

Post-install

See: Solaris 11

Networking is a bit of a mess, it seems to come up as DHCP which can ruin your day if you want things to be static. Try svcadm disable network/physical:nwam followed by setting everything up as per the OmniOS wiki instructions (see below), followed by svcadm enable network/physical:default. More advanced instructions are outside the scope of this article.

OmniOS

  • OmniOS is another Illumos powered continuation of OpenSolaris, however unlike OpenIndiana, OmniOS is intended to be a minimalist server OS for bare metal and VM's.
  • Commercial support is available
  • ISO used: OmniOS_Text_r151006p.iso

Hardware

See: Solaris 10

Options

See: Solaris 10

Post-install

See: Solaris 11

After installation, before you reboot, you probably need to manually configure your network connection. Consult the OmniOS wiki for further details.

If you do reboot, chances are your login attempts will fail. Try using root for the username, and hit Enter for a blank password.

If all else fails, you can try Single User Mode. To do this, at the GRUB menu, hit (e), select the Kernel line and hit (e), and add -s to the end of it. Hit Enter, then (b) to boot. At the eventual login prompt, try root for the username, and hit Enter for a blank password.

Common Notes

  • All of these OSes seem to like the qemu64 cpu type but not kvm32|64. It can be slow going, but it gets there.
  • All seem to prefer RAW disks rather than qcow2. With KVM hardware virtualization disabled, SATA is reported to work.
  • I have 32G disk sizes because I have tonnes of disk to spare. Solaris can be stripped down to 2G, but 7G is a more realistic minimum.
  • A high amount of memory is required during install. Recommendations around the web vary from 1G to 2G or more. Post-install, you can reduce the amount of memory available to a VM by disabling/removing some services/drivers such as ZFS, zones, fibre drivers etc.
  • Sometimes these OSes will refuse to shutdown or stop from the Proxmox UI. From the Proxmox host's command line, issue qm list to find out the VM's ID, then issue qm shutdown <ID> -forceStop

Environment

This is the environment used in which the above settings were tested as OK:

   pveversion -v
   proxmox-ve-2.6.32: 3.1-109 (running kernel: 2.6.32-23-pve)
   pve-manager: 3.1-3 (running version: 3.1-3/dc0e9b0e)
   pve-kernel-2.6.32-23-pve: 2.6.32-109
   lvm2: 2.02.98-pve4
   clvm: 2.02.98-pve4
   corosync-pve: 1.4.5-1
   openais-pve: 1.1.4-3
   libqb0: 0.11.1-2
   redhat-cluster-pve: 3.2.0-2
   resource-agents-pve: 3.9.2-4
   fence-agents-pve: 4.0.0-2
   pve-cluster: 3.0-7
   qemu-server: 3.1-4
   pve-firmware: 1.0-23
   libpve-common-perl: 3.0-6
   libpve-access-control: 3.0-6
   libpve-storage-perl: 3.0-13
   pve-libspice-server1: 0.12.4-2
   vncterm: 1.1-4
   vzctl: 4.0-1pve3
   vzprocps: 2.0.11-2
   vzquota: 3.1-2
   pve-qemu-kvm: 1.4-17
   ksm-control-daemon: 1.1-1
   glusterfs-client: 3.4.0-2

Hardware: Asus M5A78L-M/USB3 Mobo, AMD Phenom II X4 955 Black Edition Quad-Core Processor, 16G memory.