* Docs: How to create and install CentOS PVMs with xe CLI on XCP 1.1
@ 2011-10-25 19:53 M. Schneider
2011-11-01 19:29 ` idexbsd
2011-11-02 15:52 ` idexbsd
0 siblings, 2 replies; 3+ messages in thread
From: M. Schneider @ 2011-10-25 19:53 UTC (permalink / raw)
To: xen-users; +Cc: M. Schneider, Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 4079 bytes --]
Hello,
First thank you very much for *XCP 1.1*, the *vmvnc* script and helpful
hints from both xen-lists!
I hope the description below "How to create and install CentOS PVMs with
xe CLI on XCP 1.1" will be helpful for first steps without XenCenter (as
it doesn't run on Linux yet). Installation of PVM for ubuntu 11.10
server is very similar.
I strongly suggest to read documentation of XenServer 5.6 sp2
(reference.pdf and guest.pdf) for better understanding.
Enjoy and feel free to add it to xen-wiki or to documentation if you
find it useful .
regards, Mark
--
ms@it-infrastrukturen.org
*Installing of CentOS6 PVM (xe CLI / XCP 1.1)*
*# On the XCP 1.1 host*
# Prepare local iso repository
/var/opt/xen/iso_import/centos6
wget -Nc http://mirror.switch.ch/ftp/mirror/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-minimal.iso
xe sr-create name-label=centos6 type=iso device-config:location=/var/opt/xen/iso_import/centos6 device-config:legacy_mode=true content-type=iso
xe cd-list
# Create and tune PVM
xe vm-install new-name-label=centos6dbrt20 sr-name-label=Local\ LVM\ SR\ DB-VM-pool template=Other\ install\ media
xe vdi-create name-label="VDI centos6 dbrt20 server" sr-uuid=638d8bb3-4b08-f7c0-1e9d-2dc496b86c49 type=user sm-config:type=raw virtual-size=32GiB
xe vm-list
xe vm-param-set VCPUs-max=4 uuid=a4db5c10-a197-6200-fdca-60a9a231f261
xe vm-param-set VCPUs-at-startup=2 uuid=a4db5c10-a197-6200-fdca-60a9a231f261
xe vm-param-set memory-static-max=4GiB uuid=a4db5c10-a197-6200-fdca-60a9a231f261
xe vm-param-set memory-dynamic-max=4GiB uuid=a4db5c10-a197-6200-fdca-60a9a231f261
xe vm-param-set memory-dynamic-min=1GiB uuid=a4db5c10-a197-6200-fdca-60a9a231f261
xe vm-param-set memory-static-min=1GiB uuid=a4db5c10-a197-6200-fdca-60a9a231f261
xe vdi-create name-label="VDI centos6 dbrt20 server" sr-uuid=638d8bb3-4b08-f7c0-1e9d-2dc496b86c49 type=user sm-config:type=raw virtual-size=32GiB
xe vdi-list
xe vm-disk-add vm=centos6dbrt20 sr-uuid=638d8bb3-4b08-f7c0-1e9d-2dc496b86c49 device=0 disk-size=34359738368
xe vbd-list
xe vbd-param-set bootable=false uuid=878a2e9c-4efa-3daa-e5ad-5f98244d93c6
xe vm-list
xe network-list
xe vif-create vm-uuid=a4db5c10-a197-6200-fdca-60a9a231f261 network-uuid=9f6f2c37-090c-148a-1a99-134846808d10 mac=random device=0
xe vm-cd-add vm=centos6dbrt20 device=3 cd-name=CentOS-6.0-x86_64-minimal.iso
xe vm-cd-list vm=centos6dbrt20
xe vbd-param-set bootable=true uuid=c6ac1b61-fdf0-37c9-f6b5-aedcb74d8ba5
xe vm-param-set uuid=a4db5c10-a197-6200-fdca-60a9a231f261 other-config:install-repository=cdrom
# Start the installation of CentOS
xe vm-start vm=centos6dbrt20
*# On the linux client with vncviewer*
ironm@debian:~$ ./vmvnc -h 192.168.1.190 -g centos6dbrt20
# --- vmvnc script script
#!/bin/bash
function usage () {
echo "Usage:"
echo " `basename $0` -h<xenserver host> -g<guest vm name-label>"
echo " `basename $0` -h<xenserver host> -u<guest vm uuid>"
echo " `basename $0` -h<xenserver host> -d<domID>"
exit 1
}
while getopts "h:g:u:d:" option
do
case $option in
h ) xs=${OPTARG} ;;
g ) vm=${OPTARG} ;;
u ) uu=${OPTARG} ;;
d ) id=${OPTARG} ;;
* ) usage
esac
done
if [ -z ${xs} ]; then
usage
fi
if [ -z ${uu} ]&& [ -z ${vm} ]&& [ -z ${id} ]; then
usage
fi
if [ ! -z ${uu} ]; then
domid=`ssh root@${xs} xe vm-list uuid=${uu} params=dom-id --minimal`
elif [ ! -z ${vm} ]; then
domid=`ssh root@${xs} xe vm-list name-label=${vm} params=dom-id --minimal`
elif [ ! -z ${id} ]; then
domid=${id}
fi
if [ -z ${domid} ]; then
echo "Could not find guest ${vm}${uu} on host ${xs}."
exit 1
elif [ ${domid} -lt 0 ]; then
echo "Guest ${vm}${uu} has no dom-id. Is your vm running?"
exit 1
fi
port=`ssh root@${xs} xenstore-read /local/domain/${domid}/console/vnc-port`
if [ -z ${port} ]; then
echo "Couldn't read VNC port from xenstore. Is your vm running?"
exit 1
fi
echo "Connecting to vnc port ${port} on host ${xs}..."
vncviewer -via root@${xs} localhost::${port}
# ---
[-- Attachment #1.2: Type: text/html, Size: 4703 bytes --]
[-- Attachment #2: vmvnc --]
[-- Type: text/plain, Size: 1304 bytes --]
#!/bin/bash
function usage () {
echo "Usage:"
echo " `basename $0` -h <xenserver host> -g <guest vm name-label>"
echo " `basename $0` -h <xenserver host> -u <guest vm uuid>"
echo " `basename $0` -h <xenserver host> -d <domID>"
exit 1
}
while getopts "h:g:u:d:" option
do
case $option in
h ) xs=${OPTARG} ;;
g ) vm=${OPTARG} ;;
u ) uu=${OPTARG} ;;
d ) id=${OPTARG} ;;
* ) usage
esac
done
if [ -z ${xs} ]; then
usage
fi
if [ -z ${uu} ] && [ -z ${vm} ] && [ -z ${id} ]; then
usage
fi
if [ ! -z ${uu} ]; then
domid=`ssh root@${xs} xe vm-list uuid=${uu} params=dom-id --minimal`
elif [ ! -z ${vm} ]; then
domid=`ssh root@${xs} xe vm-list name-label=${vm} params=dom-id --minimal`
elif [ ! -z ${id} ]; then
domid=${id}
fi
if [ -z ${domid} ]; then
echo "Could not find guest ${vm}${uu} on host ${xs}."
exit 1
elif [ ${domid} -lt 0 ]; then
echo "Guest ${vm}${uu} has no dom-id. Is your vm running?"
exit 1
fi
port=`ssh root@${xs} xenstore-read /local/domain/${domid}/console/vnc-port`
if [ -z ${port} ]; then
echo "Couldn't read VNC port from xenstore. Is your vm running?"
exit 1
fi
echo "Connecting to vnc port ${port} on host ${xs}..."
vncviewer -via root@${xs} localhost::${port}
[-- Attachment #3: list-of-installed-VMs.txt --]
[-- Type: text/plain, Size: 701 bytes --]
[root@xcp11db02 ~]# xe vm-list
uuid ( RO) : 4133031a-e064-38e7-416d-72e1eb0a9118
name-label ( RW): ubuntu11dbrt20
power-state ( RO): running
uuid ( RO) : c6f33171-eaa6-eb54-aff2-172625b14c39
name-label ( RW): ubuntu11nfs20
power-state ( RO): running
uuid ( RO) : a4db5c10-a197-6200-fdca-60a9a231f261
name-label ( RW): centos6dbrt20
power-state ( RO): running
uuid ( RO) : 9e0726af-580b-45db-b2ae-07cbc810ccb2
name-label ( RW): Control domain on host: xcp11db02
power-state ( RO): running
uuid ( RO) : df72d730-519d-70d9-da18-acd778a6afd9
name-label ( RW): ubuntu11dbp20
power-state ( RO): running
[-- Attachment #4: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Docs: How to create and install CentOS PVMs with xe CLI on XCP 1.1
2011-10-25 19:53 Docs: How to create and install CentOS PVMs with xe CLI on XCP 1.1 M. Schneider
@ 2011-11-01 19:29 ` idexbsd
2011-11-02 15:52 ` idexbsd
1 sibling, 0 replies; 3+ messages in thread
From: idexbsd @ 2011-11-01 19:29 UTC (permalink / raw)
To: xen-devel
Hello,
As you've obtained "Local \ LVM \ SR \ DB-VM-pool."
You used lvcreate then "xe sr-create"?
--
View this message in context: http://xen.1045712.n5.nabble.com/Docs-How-to-create-and-install-CentOS-PVMs-with-xe-CLI-on-XCP-1-1-tp4937495p4956104.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Docs: How to create and install CentOS PVMs with xe CLI on XCP 1.1
2011-10-25 19:53 Docs: How to create and install CentOS PVMs with xe CLI on XCP 1.1 M. Schneider
2011-11-01 19:29 ` idexbsd
@ 2011-11-02 15:52 ` idexbsd
1 sibling, 0 replies; 3+ messages in thread
From: idexbsd @ 2011-11-02 15:52 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 654 bytes --]
*SOLUTION:*
I have modified the logical volume, then its size Resize to finally create
the "Local LVM SR DB-VM-pool."
*NEW PROBLEM:*
He has been a new problem, in the step of giving confirmation to write the
changes to the partition where you are installing centos, vncviewer
disconnects and I can not reconnect.
Are you sure that the version 6 of the centos6 can be virtualized in the XCP
1.1??
You have completed the installation?
--
View this message in context: http://xen.1045712.n5.nabble.com/Docs-How-to-create-and-install-CentOS-PVMs-with-xe-CLI-on-XCP-1-1-tp4937495p4958431.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
[-- Attachment #1.2: Type: text/html, Size: 863 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-02 15:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 19:53 Docs: How to create and install CentOS PVMs with xe CLI on XCP 1.1 M. Schneider
2011-11-01 19:29 ` idexbsd
2011-11-02 15:52 ` idexbsd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.