Tag Archives: XenServer

XenServer: Change Root Password

keep-calm-and-change-your-xenserver-password-3

Intro

Your boss comes to you in a panic about security and passwords. You sip your coffee and calmly let her vent. You assure her that yes, you can quickly and easily change the root password on all your XenServers. She walks away confident you know what you are talking about.

Change that password…or can you?

You hit the Internet for information on changing the XenServer root password and are hit with article after article about recovering a lost root password. That doesn’t apply to you. You have your root password safely stored in your password store (right :)).

You ask yourself, “Self, where are the instructions on changing the root password when you already know it?

A quick look at the XenServer install guide and admin guides don’t reveal anything either.

Yes you can

Citrix support wasn’t much help in this, but the answer is quick and easy, especially if you have XenServer pools.

First connect to your XenServer (use the Pool Master if you have a pool), and get to the console.
xenserver1

Select Authenticationxenserver2xenserver3

Select Change Passwordxenserver4

Authenticate with your current password (if prompted).xenserver

Enter the old password, followed by the new password twice.xenserver7

Once you hit enter, the system will change the password.xenserver8
And you’re done.xenserver9

BONUS: If you changed the password on the Pool Master, this will change the root password on all the pool member servers.

Thanks for reading,
Alain

PowerShell: XenServer 6.0 CmdLet Poster

Fire up your large format printers!

The fine folks at X-Tech have put together an exhaustive (and large) poster showing all the existing and new cmdlets for managing XenServer through PowerShell.

An Example of the  XenServer cmdlet poster
An Example of the XenServer cmdlet poster

Get your copy here.

Thanks,
Alain

XenServer: Creating an ISO Partition on DOM0

Intro

I recently updated my lab machine to XenServer 6.0 and I wanted to create a local ISO repository on the DOM0 partition. I have 3 physical drives, one 250GB drive that holds the host partition and its backup and two 500GB drives that host VM’s. I know that only 8GB on the 250 GB drive are used for the host and its backup, so I wanted to create the local ISO repository in the remaining space.

Stop! Linux Time

Connect to the CLI of your XenServer.

fdisk –l shows my current partition tables

[root@MARLINSPIKE ~]# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
256 heads, 63 sectors/track, 30282 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       30283   244198583+  ee  EFI GPT

Dom0 contains 3 partitions. The first is where the XenServer host resides. The second is the host backup. The final partition is the rest of the unused space on the 250GB drive. In my file system, this is /dev/sdc3. The following commands will format and mount this space as an ISO partition.


[root@MARLINSPIKE ~]# mkfs.ext3 /dev/sdc3
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
29491200 inodes, 58952233 blocks
2947611 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1800 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@MARLINSPIKE]# mkdir /mnt/iso/
[root@MARLINSPIKE]# mount -t ext3 /dev/sdc3 /mnt/iso/
[root@MARLINSPIKE]# echo "/dev/sdc3 /mnt/iso ext3 defaults 1 1" >> /etc/fstab
[root@MARLINSPIKE]# xe-mount-iso-sr /mnt/iso -o bind

Now the new ISO partition shows up in my XenCenter console.

image

Sources:

Citrix Forums: Thread: Dom0 Partitions

Citrix Forums: Thread: xe sr-create, local ISO SR on larger drive

How to add an additional local disk to your XenServer 5.5 host

XenServer create local ISO Repository (LVM)

How To Re-partition a Xen Virtual Machine Using GParted LiveCD

LinuxQuestions.org: Having problems mounting hd. (mount: you must specify the filesystem type)

Thanks,
Alain