I received a loaner Sparc T5240 box from oracle the other day to test out their ldom's. Here are some basic commands I used to create a guest. Note, I didn't go into how to install Solaris inside the ldom.
I installed version 1.3 of the Ldom software which I downloaded directly from Oracle. ( LDoms_Manager-1_3.zip )
The software has an installer that sets up many of the things you need.
One thing I found after looking around was that the networking inside a guest couldn't talk to the outside world.
I adjusted the networking including plumbing the virtual switch and giving it the same MAC as the underlying nxge4 ( 10G ) interface.
ifconfig nxge0 down
ifconfig nxge0 unplumb
ifconfig vsw0 plumb
ifconfig vsw0 X.X.X.X netmask 255.255.255.0
ifconfig vsw0 up
mv /etc/hostname.nxge4 /etc/hostname.vsw0
ldm remove-vswitch primary-vsw0
ldm add-vsw mac-addr=0:14:4f:c1:c2:c8 net-dev=nxge4 primary-vsw0 primary
Now on to the guest:
First I created two zfs zvols. One for the OS and one for a zpool.
zfs create -V 12000m pool0/vdomains/ldom2
zfs create -V 100g pool0/vdomains/zpool-ldom2
To install solaris inside the guest I am going to use the 10u9 iso image and have it in /tmp/iso/sol-10-u9-ga-sparc-dvd.iso
I gave it 4G of RAM and 1 virtual CPU:
ldm add-domain ldom2
ldm stop test1
ldm add-vcpu 1 ldom2
ldm add-memory 4096m ldom2
ldm add-vnet vnet1 primary-vsw0 ldom2
ldm add-vdsdev /dev/zvol/dsk/pool0/vdomains/ldom2 zdisk2@primary-vds0
ldm add-vdisk zdisk2 zdisk2@primary-vds0 ldom2
ldm add-vdsdev /dev/zvol/dsk/pool0/vdomains/zpool-ldom2 zdisk3@primary-vds0
ldm add-vdisk zdisk3 zdisk3@primary-vds0 ldom2
ldm add-vdsdev /tmp/iso/sol-10-u9-ga-sparc-dvd.iso iso_vol@primary-vds0
ldm-vdisk vdisk vdisk_iso iso_vol@primary-vds0 ldom2
ldm bind-domain ldom2
ldm set-variable autoboot\?=false ldom2
ldm start ldom2
Now I can telnet to port 5000 on the localhost and I'll will be on the console but the machine will be at the OK> prompt.
Type: show-disks to find the ISO, or CDROM link and then type boot and the long path to boot off the ISO.
I did a typical Solaris install for the guest and actually used a flar.
Once the install was done I created a zpool on the second disk and I had a fully working solaris guest with zfs inside.
To get the guest to book automatically and not stop at the OK> prompt each time I changed the autoboot to true from false.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment