lost and found ( for me ? )

KVM : how to access to Solaris 10 x86 VMs over virsh console


KVM host

mint-1 ~ # tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Linux Mint 12 Lisa"
mint-1 ~ # uname -ri
3.0.0-24-generic x86_64
mint-1 ~ # libvirtd --version
libvirtd (libvirt) 0.9.2
mint-1 ~ # kvm --version
QEMU emulator version 0.14.1 (qemu-kvm-0.14.1), Copyright (c) 2003-2008 Fabrice Bellard


VM
# uname –a
SunOS unknown 5.10 Generic_147441-01 i86pc i386 i86pc


on the KVM host , add a serial port to the Solaris VM
   <serial type='pty'>
     <source path='/dev/pts/1'/>
     <target port='0'/>
     <alias name='serial0'/>
   </serial>
   <console type='pty' tty='/dev/pts/1'>
     <source path='/dev/pts/1'/>
     <target type='serial' port='0'/>
     <alias name='serial0'/>
   </console>


you can also add a serial port to the VM with virt-manager.


on the Solaris VM , edit /boot/grub/menu.lst
add “-B console=ttya” as a kernel parameter.
# cat /boot/grub/menu.lst
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Oracle Solaris 10 8/11 s10x_u10wos_17b X86
findroot (rootfs0,0,a)
kernel /platform/i86pc/multiboot -B console=ttya
module /platform/i86pc/boot_archive
#---------------------END BOOTADM--------------------
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris failsafe
findroot (rootfs0,0,a)
kernel /boot/multiboot -s
module /boot/amd64/x86.miniroot-safe
#---------------------END BOOTADM--------------------


reboot the Solaris VM
# sync
# reboot

on the KVM host , access to the Solaris VM via virsh console.
mint-1 ~ # virsh console solaris10-vm1
Connected to domain solaris10-vm1
Escape character is ^]

unknown console login: root
Password:
Last login: Mon Aug 20 21:41:31 on console
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
#

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.