» Do it. Now.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howto:howto-add-a-new-xen-vm [2010/04/18 18:55]
basti
howto:howto-add-a-new-xen-vm [2019/05/26 15:04]
Line 1: Line 1:
-==== Howto add a new Xen vm ==== 
  
- 
-First create /​etc/​xen-tools/​partitions.d///​hostname//​ containing something like the following: 
-''​[root] 
-size=6G 
-type=ext3 
-mountpoint=/​ 
-options=defaults,​errors=remount-ro 
- 
-[swap] 
-size=2G 
-type=swap 
- 
-[home] 
-size=4G 
-type=ext3 
-mountpoint=/​home 
-options=errors=remount-ro 
- 
-[tmp] 
-size=4G 
-type=ext3 
-mountpoint=/​tmp 
-options=nodev 
- 
-[var] 
-size=4G 
-type=ext3 
-mountpoint=/​var 
-options=defaults,​errors=remount-ro 
- 
-''​ 
- 
-After that run xen-create-image --hostname //​hostname//​ --dist lenny --memory 512Mb --partitions //​hostname//​ --ip //​designated IP// --gateway //gateway IP (usually XenServer IP)// --netmask //netmask// --broadcast //broadcast IP// 
- 
- 
-Few things to do before starting the vm: 
- 
-Mount the created volumes and start a chroot: 
- 
-mount /​dev/​mapper/​xxx /mnt 
-chroot /mnt 
- 
-You now want to install udev (into the chroot): 
-apt-get install udev 
- 
-Perhaps set a root password you know: 
- 
-passwd root 
- 
-next few tasks should be done in the chroot as well: 
- 
-modify /​etc/​inittab:​ 
- 
-#​1:​2345:​respawn:/​sbin/​getty 38400 tty1 
-# comment all /sbin/getty lines 
- 
- add: 
-1:​2345:​respawn:/​sbin/​getty 38400 hvc0 
- 
- 
-edit /​etc/​sysctl.conf 
- 
-xen.independent_wallclock=1 
- 
-followed by the command: 
- 
-sysctl -p 
- 
-this should already be done so check: 
-xen-tools.conf:​x slower than LVM partitions, then specify a directory here and uncomment 
-xen-tools.conf:​x LVM volume group here instead 
-xen-tools.conf:​lvm = vg0 
- 
-when you are done start the vm: 
-xm create /​etc/​xen/​$host.cfg 
-xm list shows running vms 
- 
-{{tag>​xen}} 
howto/howto-add-a-new-xen-vm.txt · Last modified: 2019/05/26 15:04 (external edit)