Comments (2)
Thanks for the report; we'll take a look!
from compute-image-tools.
Hey,
Faced the same issue today only,
Centos-7 don't have support for the latest util-linux package, you can check the centos mirror index here http://mirror.centos.org/centos/7/os/x86_64/Packages/
and the central package index for linux/unix as well here https://pkgs.org/download/util-linux
Although as a workaround I'm doing the pre-checks manually, its just check for the root device disk to be mounted at '/' by allMounts.listPhysicalDevicesForMount("/")
listing all the physical devices and set the root device on which mount path '/' is available which you can check using lsblk -a
. In my case rootDevice is sda
[root@localhost ~]# lsblk -a
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 524M 0 part /boot
└─sda2 8:2 0 19.5G 0 part /
sdb 8:16 0 16G 0 disk
└─sdb1 8:17 0 16G 0 part [SWAP]
sdc 8:32 0 250G 0 disk
└─sdc1 8:33 0 250G 0 part /data
sdd 8:48 0 20G 0 disk
├─sdd1 8:49 0 524M 0 part
└─sdd2 8:50 0 19.5G 0 part
sde 8:64 0 20G 0 disk
└─sde1 8:65 0 20G 0 part /var/log
Other check it does that if there are multiple mount paths except '/' then they all should belong to some physical drive (which is obvious) and the physical device is other than the rootDevice (in my case sda) then these mount paths will be omitted from image import. and same is case if same mount path is mounted to multiple devices. So, in my case only '/' and '/boot' mount path will be there and rest will be omitted (excluded) from import. (WIP
: Will update if it creates some issues)
Note
: In this 2nd check it'll only give you warnings.
And the last check it performs for the MBR partition type. All the partition on all the disk should be of MBR.
You can use parted -l
to determine the type of partition table. Eg:
[root@localhost ~]# sudo parted -l
Model: VBOX HARDDISK (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 551MB 549MB primary xfs boot
2 551MB 21.5GB 20.9GB primary xfs
Model: VBOX HARDDISK (scsi)
Disk /dev/sdb: 17.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 17.2GB 17.2GB primary linux-swap(v1)
Model: VBOX HARDDISK (scsi)
Disk /dev/sdc: 268GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 268GB 268GB primary xfs
Model: VBOX HARDDISK (scsi)
Disk /dev/sdd: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 551MB 549MB primary xfs
2 551MB 21.5GB 20.9GB primary xfs
Model: VBOX HARDDISK (scsi)
Disk /dev/sde: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 21.5GB 21.5GB primary xfs
The Partition Table field shows that I am using a msdos MBR partition table (the one still commonly used for Linux and Windows) on both disks. From the man page parted can create (and thus hopefully identify) the following types of partition table (or more broadly `disk label'):
bsd
dvh
gpt - this is a GPT partition table
loop - this is raw disk access without a partition table
mac
msdos - this is a standard MBR partition table
pc98
sun
Update
The command for listing a single partition if there are multiple drives. For /dev/sda you would do:
parted /dev/sda print
For these checks see the src code : here
--------------Updated
------------
Based on a community thread in order to import your VM Instance; You must meet these necessary requirements for the Source VM instance and the OVF file in order to import your instance to GCP:
Source VM requirements:
-
The following requirements must be met by the VM that is used to create the OVF file:
- Virtual disks must be in VMDK or VHD formats.
- Virtual disks must be configured with MBR boot. UEFI is not supported.
- Virtual disks must not be encrypted.
- To verify that your VM meets the requirements, you can run the pre-check tool as it can provided useful information when debugging any issues you may encounter.
-
The operating system for the source VM should meet the following requirements:
- For all Windows operating systems, PowerShell version 3 or later must be installed. PowerShell versions earlier than 3.0 can cause issues with the startup and shutdown scripts used during the import process.
- For all Linux distributions, the boot disk must have GRUB installed.
OVF file requirements:
-
The following requirements must be met by the OVF file:
- The OVF files must provide Level 1 portability as described in the OVF specification document. Virtual appliances that meet Level 2 portability can be imported, but any custom extensions such as source hypervisor-specific details are ignored during the import process.
- The OVF file must contain only one VM. If more than one VM is present, only the first VM is imported.
- The first disk in the OVF file must be bootable.
Hope this helps :) !
from compute-image-tools.
Related Issues (20)
- Incorrect hostname for VMs with multiple network interfaces
- panic: runtime error: invalid memory address or nil pointer dereference on Ubuntu 20.04
- Issue with bootstrap_install.ps1 HOT 2
- importing process interrupted when `/etc/netplan` contains subdirectory (Ubuntu 18+) HOT 1
- getting error while importing my ubuntu 2004vmdk into compute instance HOT 1
- Execution fails when shielded VMs org policy is enforced HOT 3
- GCE_Export Release Version access_denied HOT 1
- daisy release version has access denied HOT 1
- Should this be more than 1 GB?
- gcloud compute images import does not allow centos-8 in option --os HOT 1
- Compute engine create with container + SSD
- Could not fetch resource
- Semidev1
- Shared VPC issue during build
- Deployments of UBUNTU with "snapd" (google tool use this snapd?) HOT 3
- windows-startup-script-url: Message: Either the Name or Index parameter is required HOT 2
- Workflow update required for windows-10-20h2-ent-x86
- Fix the setting for 'x86_build' and maybe 'uefi_build' on the 'windows-build-bios.wf.json'
- Create custom Windows BYOL images failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compute-image-tools.