Virt-install Debian Squeeze PV DomU at Xen 4.1.2 Oneiric Dom0

RH’s opensource distros ISO images (Fedora,CentOS) have a nice feature,been loop mounted on apache folder /var/www/domain, they allow to create local mirror to virt-install corresponding paravirtual guest. Not customized Debian ISOs don’t have this feature, however virt-install still works for Debian Squeeze utilizing remote system HTTP source. Virt-install Debian PV DomU is possible via remote official HTTP source.Begin via virt-install command line

root@boris-System-P5Q3:~# virt-install --connect xen:/// --debug -n SQUEEZE --vnc \
> -p -r 2048 --vcpus=2 -f /dev/sdb7 \
> -l http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/
Sat, 19 Nov 2011 19:23:20 DEBUG Launched with command line:
/usr/bin/virt-install --connect xen:/// --debug -n SQUEEZE --vnc -p -r 2048 --vcpus=2 -f /dev/sdb7 -l http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/
Sat, 19 Nov 2011 19:23:20 DEBUG Requesting libvirt URI xen:///
Sat, 19 Nov 2011 19:23:20 DEBUG Received libvirt URI xen:///
Sat, 19 Nov 2011 19:23:20 DEBUG Requesting virt method 'xen', hv type 'default'.
Sat, 19 Nov 2011 19:23:20 DEBUG Received virt method 'xen'
Sat, 19 Nov 2011 19:23:20 DEBUG Hypervisor name is 'xen'
Sat, 19 Nov 2011 19:23:20 DEBUG --graphics compat generated: vnc
Sat, 19 Nov 2011 19:23:20 DEBUG DistroInstaller location is a network source.
Sat, 19 Nov 2011 19:23:20 DEBUG Attempting to detect distro:
Sat, 19 Nov 2011 19:23:22 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/MANIFEST
Sat, 19 Nov 2011 19:23:22 DEBUG Saved file to /var/tmp/virtinst-MANIFEST.1GW1wt
Sat, 19 Nov 2011 19:23:22 DEBUG Detected a Debian distro
Sat, 19 Nov 2011 19:23:22 DEBUG Guest.has_install_phase: True
Starting install...
Sat, 19 Nov 2011 19:23:22 DEBUG scratchdir=/var/lib/xen
Sat, 19 Nov 2011 19:23:23 DEBUG Attempting to detect distro:
Sat, 19 Nov 2011 19:23:25 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/MANIFEST
Sat, 19 Nov 2011 19:23:25 DEBUG Saved file to /var/lib/xen/virtinst-MANIFEST.rh1eGO
Retrieving file MANIFEST... | 3.3 kB 00:00 ...
Sat, 19 Nov 2011 19:23:25 DEBUG Detected a Debian distro
Sat, 19 Nov 2011 19:23:25 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/xen/vmlinuz
Sat, 19 Nov 2011 19:23:36 DEBUG Saved file to /var/lib/xen/virtinst-vmlinuz.5Or9oh 00:00 ETA
Retrieving file vmlinuz... | 4.6 MB 00:10 ...
Sat, 19 Nov 2011 19:23:36 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/xen/initrd.gz
Sat, 19 Nov 2011 19:24:51 DEBUG Saved file to /var/lib/xen/virtinst-initrd.gz.T9hVje 00:00 ETA
Retrieving file initrd.gz... | 37 MB 01:15 ...
Sat, 19 Nov 2011 19:24:51 DEBUG Auto detected OS type as: linux
Sat, 19 Nov 2011 19:24:51 DEBUG Have access to local system scratchdir so nothing to upload
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/sysconfig/keyboard" [Errno 2] No such file or directory: '/etc/sysconfig/keyboard'
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/X11/xorg.conf": [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/sysconfig/keyboard" [Errno 2] No such file or directory: '/etc/sysconfig/keyboard'
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/X11/xorg.conf": [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
Sat, 19 Nov 2011 19:24:51 DEBUG Generated install XML:
<domain type='xen'>
<name>SQUEEZE</name>
<uuid>3978d7ce-454b-103e-d9df-a486052bf6ce</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64'>linux</type>
<kernel>/var/lib/xen/virtinst-vmlinuz.5Or9oh</kernel>
<initrd>/var/lib/xen/virtinst-initrd.gz.T9hVje</initrd>
<cmdline>method=http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/</cmdline>
</os>
<features>
<acpi/><apic/>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<source dev='/dev/sdb7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:da:f5:3f'/>
</interface>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<video>
<model type='cirrus'/>
</video>
</devices>
</domain>
Sat, 19 Nov 2011 19:24:51 DEBUG Generated boot XML:
<domain type='xen'>
<name>SQUEEZE</name>
<uuid>3978d7ce-454b-103e-d9df-a486052bf6ce</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader>/usr/lib/xen-default/bin/pygrub</bootloader>
<features>
<acpi/><apic/>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='block' device='disk'>
<source dev='/dev/sdb7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:da:f5:3f'/>
</interface>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<video>
<model type='cirrus'/>
</video>
</devices>
</domain>
Creating domain... | 0 B 00:01
Sat, 19 Nov 2011 19:24:53 DEBUG Started guest, connecting to console if requested
Sat, 19 Nov 2011 19:24:53 DEBUG Launching virt-viewer for graphics type 'vnc'
Sat, 19 Nov 2011 19:24:53 DEBUG Running: /usr/bin/virt-viewer --connect xen:/// --wait 1
(virt-viewer:2892): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
Sat, 19 Nov 2011 19:24:53 DEBUG XML fetched from libvirt object:
<domain type='xen' id='1'>
<name>SQUEEZE</name>
<uuid>3978d7ce-454b-103e-d9df-a486052bf6ce</uuid>
<description></description>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader></bootloader>
<bootloader_args></bootloader_args>
<os>
<type>linux</type>
<kernel>/var/lib/xen/virtinst-vmlinuz.5Or9oh</kernel>
<initrd>/var/lib/xen/virtinst-initrd.gz.T9hVje</initrd>
<cmdline>method=http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/</cmdline>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/xen-4.1/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/sdb7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:da:f5:3f'/>
<source bridge='br0'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif1.0'/>
</interface>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='xen' port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
</devices>
</domain>







Sat, 19 Nov 2011 20:04:50 DEBUG Removing /var/lib/xen/virtinst-vmlinuz.5Or9oh
Sat, 19 Nov 2011 20:04:50 DEBUG Removing /var/lib/xen/virtinst-initrd.gz.T9hVje
Guest installation complete... restarting guest.
Sat, 19 Nov 2011 20:04:56 DEBUG Launching virt-viewer for graphics type 'vnc'
Sat, 19 Nov 2011 20:04:56 DEBUG Running: /usr/bin/virt-viewer --connect xen:/// --wait 2
(virt-viewer:3705): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",




root@boris-System-P5Q3:~# virsh list –all
Id Name State
———————————-
0 Domain-0 running
– OneiricPV shut off
– SQUEEZE shut off
– VF16PV shut off
– VF16RC5 shut off

root@boris-System-P5Q3:~# virsh start SQUEEZE
Domain SQUEEZE started

root@boris-System-P5Q3:~# vncviewer localhost:0

VNC Viewer Free Edition 4.1.1 for X – built Sep 7 2011 11:16:25
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Sat Nov 19 20:11:30 2011
CConn: connected to host localhost port 5900
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 6 (8bpp) rgb222
CConn: Using ZRLE encoding
CConn: Throughput 20006 kbit/s – changing to hextile encoding
CConn: Throughput 20006 kbit/s – changing to full colour
CConn: Using pixel format depth 24 (32bpp) little-endian rgb888
CConn: Using hextile encoding

VNC window pops up nicely.

Domain also is manageable via VirtManager :-



About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: