Category:XenReference
From HacDC Wiki
Test
xen-create-image --hostname test --ip 10.0.0.x --gateway 10.0.0.1 --netmask 255.255.255.0 --vcpus 2 --pygrub --dist squeeze xen create /etc/xen/test.cfg xen console test <do stuff> Ctrl + ] xen-delete-image test
CreateUser
#!/bin/bash #Usage: createXenUser.sh <userName> randString=$(head -c 6 /dev/urandom | base64 | tr -dc 'a-z0-9') while [[ ${#randString} -lt 8 ]] do randString=${randString}$(head -c 4 /dev/random | base64 | tr -dc 'a-z0-9') done useradd -m -p $randString "$1" #Check user home dir FS permissions. #Add user SSH keys if any.
CreateUserVMs
#!/bin/bash #Usage createXenUserVM <userName> <VM_Number> xen-create-image --hostname "$1-2" --ip 10.0.0.x --gateway 10.0.0.1 --netmask 255.255.255.0 --vcpus 2 --pygrub --dist squeeze echo "$1-$2 ALL=NOPASSWD:/usr/sbin/xm console $1-$2, /usr/sbin/xm create -c /etc/xen/hosted/$1-$2, /usr/sbin/xm destroy $1-$2, /usr/sbin/reimage-dom $1-$2 ?" >> /etc/sudoers /etc/init.d/sudo restart
InstallationNotes
- In /etc/xen/xend-config.sxp uncomment the network-nat and vif-nat entries.
Reference
https://wiki.debian.org/Xen#Domain_0_.28Host.29_Installation http://dev.e-taxonomy.eu/trac/wiki/Xen_installation http://wiki.xenproject.org/wiki/Nested_Virtualization_in_Xen#How_to_use_nested http://wiki.xen.org/wiki/Host_Configuration/Networking#Routing http://blog.manula.org/2012/04/manually-configuring-nat-networking-in.html http://www.fclose.com/816/port-forwarding-using-iptables/ https://wiki.debian.org/iptables http://blog.manula.org/2011/02/xen-bridged-networking-mode.html http://xen.1045712.n5.nabble.com/console-access-to-non-root-xen-3-0-td2560667.html
This category currently contains no pages or media.