Solaris p2v (Physical to Virtual) on VMware
I have Solaris 10 x86 8/07 installed on Lenovo T60. I want to replace the OS. So, this is a good time to convert this to a virtual machine.
This is a sequel to my backing up Solaris x86 using Linux entry in which I wrote about how VMware 5.5 behaved flaky on me. So, I tried on VMware 6 on another machine. Here are the steps.
- Create same sized growable VMware virtual disk using vmware-vdiskmanager.
- Create new Solaris 10 VMware guest. Choose 'Custom' and specify the disk created in step#1.
- Specify 'g4l-0.24.iso' file for CD-ROM. Boot this new guest from CD-ROM.
- Restoring 48GB of zipped(actually 'lzop') HDD image took about 6 hours.

- In VMware setting, unchecked CD-ROM "g4l.iso" file so that it will boot from restored /dev/rdsk/c0d0s0. Rebooted VMware guest.
- Tried to boot from default grub entry. Failed.

- Reboot. Boot with grub 'FailSafe' archive.
- Change device settings. I followed the procedure which I found on internal VirtualBox mailing list. Maybe there's BigAdmin article already. If I can't find anywhere else, I can blog about it some day.
- Here's /etc/path_to_inst difference before/after reconfiguration reboot. 'ahci' is Serial ATA. 'e1000g0' is network adapter.
# sort path_to_inst.0 >/tmp/0
# sort path_to_inst >/tmp/1
# diff -w /tmp/[01]
2a3,6
> "/isa/asy@1,2f8" 1 "asy"
> "/isa/asy@1,3f8" 0 "asy"
> "/isa/fdc@1,3f0" 0 "fdc"
> "/isa/fdc@1,3f0/fd@0,0" 0 "fd"
9,37c13,28
< "/pci@0,0" 0 "npe"
< "/pci@0,0/pci-ide@1f,1" 0 "pci-ide"
< "/pci@0,0/pci-ide@1f,1/ide@0" 0 "ata"
< "/pci@0,0/pci-ide@1f,1/ide@0/sd@0,0" 1 "sd"
< "/pci@0,0/pci17aa,200a@1d" 0 "uhci"
< "/pci@0,0/pci17aa,200a@1d,1" 1 "uhci"
< "/pci@0,0/pci17aa,200a@1d,2" 2 "uhci"
< "/pci@0,0/pci17aa,200a@1d,3" 3 "uhci"
< "/pci@0,0/pci17aa,200a@1d,3/device@2" 0 "usb_mid"
< "/pci@0,0/pci17aa,200a@1d/device@1" 1 "usb_mid"
< "/pci@0,0/pci17aa,200a@1d/mouse@1" 0 "hid"
< "/pci@0,0/pci17aa,200b@1d,7" 0 "ehci"
< "/pci@0,0/pci17aa,200b@1d,7/storage@1" 0 "scsa2usb"
< "/pci@0,0/pci17aa,200b@1d,7/storage@1/disk@0,0" 2 "sd"
< "/pci@0,0/pci17aa,200b@1d,7/storage@5" 1 "scsa2usb"
< "/pci@0,0/pci17aa,200b@1d,7/storage@5/disk@0,0" 3 "sd"
< "/pci@0,0/pci17aa,200d@1f,2" 0 "ahci"
< "/pci@0,0/pci17aa,200d@1f,2/disk@0,0" 0 "sd"
< "/pci@0,0/pci17aa,2010@1b" 0 "audiohd"
< "/pci@0,0/pci8086,2448@1e" 0 "pci_pci"
< "/pci@0,0/pci8086,2448@1e/pci17aa,2012@0" 0 "pcic"
< "/pci@0,0/pci8086,2448@1e/pci17aa,2012@0/pcs@0" 0 "pcs"
< "/pci@0,0/pci8086,27a1@1" 0 "pcie_pci"
< "/pci@0,0/pci8086,27a1@1/display@0" 0 "vgatext"
< "/pci@0,0/pci8086,27d0@1c" 1 "pcie_pci"
< "/pci@0,0/pci8086,27d0@1c/pci17aa,2001@0" 0 "e1000g"
< "/pci@0,0/pci8086,27d2@1c,1" 2 "pcie_pci"
< "/pci@0,0/pci8086,27d4@1c,2" 3 "pcie_pci"
< "/pci@0,0/pci8086,27d6@1c,3" 4 "pcie_pci"
---
> "/pci@0,0" 0 "pci"
> "/pci@0,0/display@f" 0 "vgatext"
> "/pci@0,0/pci-ide@7,1" 0 "pci-ide"
> "/pci@0,0/pci-ide@7,1/ide@0" 0 "ata"
> "/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0" 0 "cmdk"
> "/pci@0,0/pci-ide@7,1/ide@1" 1 "ata"
> "/pci@0,0/pci-ide@7,1/ide@1/sd@0,0" 1 "sd"
> "/pci@0,0/pci1000,30@10" 0 "mpt"
> "/pci@0,0/pci15ad,1976@7,2" 0 "uhci"
> "/pci@0,0/pci15ad,790@11" 1 "pci_pci"
> "/pci@0,0/pci15ad,790@11/pci1022,2000@0" 0 "pcn"
> "/pci@0,0/pci15ad,790@11/pci1274,1371@1" 0 "audioens"
> "/pci@0,0/pci15ad,790@11/pci15ad,770@2" 0 "ehci"
> "/pci@0,0/pci15ad,790@11/pci15ad,770@2/storage@1" 0 "scsa2usb"
> "/pci@0,0/pci15ad,790@11/pci15ad,770@2/storage@1/disk@0,0" 0 "sd"
> "/pci@0,0/pci8086,7191@1" 0 "pci_pci"
39d29
< "/ramdisk" 0 "ramdisk" - Install VMware tool inside guest. Now the mouse pointer behaves correct.
- Does the network adapter work?
- When the restore is done, total VMware guest file size was about 90GB. Way over my expectation. I use less than 40GB.
- Can I shrink the disk now?
- Had I zero filled unused disk before backup, would the backup file and vmware guest size be smaller?
- If only a small fdisk partition is used for 'ufs' in physical machine, say 8GB, can I make less than 8GB virtual machine?
Posted by Let the Sunshine In on August 29, 2008 at 04:13 PM JST #
Posted by Let the Sunshine In on August 29, 2008 at 04:16 PM JST #