diff options
author | Jenkins <jenkins@review.openstack.org> | 2011-11-02 21:48:42 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2011-11-02 21:48:42 +0000 |
commit | e1b4b282d0e41f97cf1beeee2f213e7cf39fc951 (patch) | |
tree | 6d253b44659167eb5dddb247f1a859056ac4f2c6 | |
parent | 93109e6929dd8e9a4cb5b8d0674fb6d1c4a968c4 (diff) | |
parent | a506c89c281e5081146b9280d378faef033c4452 (diff) | |
download | nova-e1b4b282d0e41f97cf1beeee2f213e7cf39fc951.tar.gz nova-e1b4b282d0e41f97cf1beeee2f213e7cf39fc951.tar.xz nova-e1b4b282d0e41f97cf1beeee2f213e7cf39fc951.zip |
Merge "Use fat32 for Windows, linux-swap for Linux swap partitions."
-rw-r--r-- | nova/virt/xenapi/vm_utils.py | 8 |
1 files changed, 7 insertions, 1 deletions
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) |