From a506c89c281e5081146b9280d378faef033c4452 Mon Sep 17 00:00:00 2001 From: Josh Kearney Date: Tue, 1 Nov 2011 12:00:56 -0500 Subject: Use fat32 for Windows, linux-swap for Linux swap partitions. Change-Id: I06d7c67290ffb5ba957306306c2838355c36946f --- nova/virt/xenapi/vm_utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 7142d0457..012717aa7 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -507,6 +507,12 @@ w # 2. Attach VDI to compute worker (VBD hotplug) with vdi_attached_here(session, vdi_ref, read_only=False) as dev: # 3. Create swap partition + + # NOTE(jk0): We use a FAT32 filesystem for the Windows swap + # partition because that is what parted supports. + is_windows = instance.os_type == "windows" + fs_type = "fat32" if is_windows else "linux-swap" + dev_path = utils.make_dev_path(dev) utils.execute('parted', '--script', dev_path, 'mklabel', 'msdos', run_as_root=True) @@ -514,7 +520,7 @@ w partition_start = 0 partition_end = swap_mb utils.execute('parted', '--script', dev_path, 'mkpartfs', - 'primary', 'linux-swap', + 'primary', fs_type, str(partition_start), str(partition_end), run_as_root=True) -- cgit