Skip to content

GUI Boot Issue with Exported EC2 Instance in VMware

0

I’m encountering issues with exporting a g4dn.xlarge Nitro-based EC2 instance (running Ubuntu with preinstalled Nice DCV for a remote workstation) to a VMDK format via VM Import/Export, using it in VMware Workstation, and reimporting it back to AWS. My goal is to maintain a bidirectional workflow where I can store the VMDK locally, make changes (e.g., uninstall software), and reimport it as an AMI while ensuring compatibility. At the moment I only have done the exporting.

Problems Encountered:

  1. Boot and GUI Issues in VMware: After exporting to VMDK and importing into VMware Workstation, the VM fails to boot properly. I see errors like journal corruption ("systemd-journald[537]: File /var/log/journal/.../system.journal corrupted or uncleanly shut down"), GRUB issues ("GRUB_FORCE_PARTUID set, initrdless boot failed. Attempting with initrd"), and Xorg failing with "no screens found" when running startx. The GUI does not start as expected.
  2. DCV Authentication Failure on New AMI generated: When launching a new instance from the AMI generated by VM Import/Export (named "export i-..."), I can connect via the AWS Console’s Session Manager and set a password, but DCV fails with "User or password incorrect," despite the original instance (from its AMI) working fine. It seems that this issue may come from the export process affecting the new AMI.

Setup Details:

  • Instance Type: g4dn.xlarge (Nitro)
  • OS: Ubuntu (with DCV preinstalled)
  • Workflow: Export to VMDK, modify in VMware, reimport to AWS as AMI.

Questions:

  • How should I prepare the g4dn.xlarge instance for export to VMDK to ensure booting and GUI work in VMware Workstation?
  • Why does DCV authentication fail on the AMI generated when exporting (named "export i-..."), and how can I resolve it?
  • Shouldn't the exported VMDK work out of the box in VMware Workstation without additional settings? It seems the issue might be related to VMware drivers or other configuration mismatches? Then how can I manage dual compatibility for reimporting to AWS?

I’d appreciate any guidance to troubleshoot these issues or optimize the export/import process for my use case. Thank you!

2 Answers
1

The g4dn instance comes with NVIDIA T4 GPU. I assume you have installed NVIDIA driver and configured Ubuntu graphical desktop to use it. VMware workstation does not have NVIDIA GPU, so GUI will most likely not work.

Ubuntu with preinstalled Nice DCV

Note that using Amazon DCV on a non-EC2 instances required additional licensing

where I can store the VMDK locally, make changes (e.g., uninstall software), and reimport it as an AMI while ensuring compatibility.

Why not just make changes to the EC2 instance? It takes time to export and import. Use AWS Backup if you need to protect EC2 instance data.

If you are in a supported Region, you can also consider G6f instances with fractional GPUs over the g4dn. Refer to this article for help installing NVIDIA Grid driver and DCV.

AWS
EXPERT
answered 6 months ago
  • So it means that I have install VMware drivers? I tried in VirtualBox, but didn't work either. Perhaps Hyper-V is different?

  • VMware Workstation, Virtual Box and Hyper-V VMs does not support NVIDIA GPUs. Installing drivers will not help.

  • Well I guess the only thing I can do with the VMDK is use it as a backup format, right? Thank you for the suggestion of the G6f types, I didn't know about them, I guess they are very new. Seems like the best option for a workstation, actually this is for 3D work, I've been checking out and it seems like the best option for 3D performance. The only thing is that it is not intel, and I don't know how would be in terms of compatibility, but seems that it has RTX at least.

0

When exporting EC2 instances to use in VMware and then reimporting them back to AWS, several issues can arise due to differences in virtualization environments and hardware configurations. Let me address your specific concerns:

For the boot and GUI issues in VMware:

  1. The VM Import/Export process only exports the boot disk, and any secondary disks must be detached before export. This could be causing some of your boot problems if your system relies on additional volumes.
  2. The journal corruption and GRUB issues suggest that the VM wasn't cleanly shut down before export or there are compatibility issues between the AWS environment and VMware.
  3. The "no screens found" error with Xorg indicates that the graphics drivers from your g4dn.xlarge instance (which has NVIDIA GPUs) aren't compatible with the virtual hardware presented by VMware Workstation.

For the DCV authentication failure: This is likely because DCV's configuration is tied to the specific instance hardware or configuration that changed during the export/import process. DCV may need to be reconfigured or reinstalled after reimporting.

To improve your workflow:

  1. Before exporting:
  • Ensure the instance is cleanly shut down
  • Remove any AWS-specific drivers or configurations that might conflict with VMware
  • Detach any secondary volumes
  • Consider installing VMware Tools or open-vm-tools before export
  1. For graphics/GUI issues:
  • The g4dn.xlarge uses NVIDIA GPUs which won't be available in VMware Workstation
  • You'll need to reconfigure the system to use basic graphics drivers in VMware
  • Consider adding a script that detects the environment (AWS vs VMware) and loads appropriate drivers
  1. For DCV issues:
  • You may need to reinstall or reconfigure DCV after reimporting to AWS
  • Create a script that handles the reconfiguration automatically

The exported VMDK doesn't work "out of the box" in VMware because the hardware environment is significantly different between AWS Nitro-based instances and VMware's virtualized hardware. This is especially true for GPU-accelerated instances like g4dn.xlarge.

For a bidirectional workflow, you might need to create scripts that detect the environment and reconfigure the system accordingly, or maintain separate configurations for AWS and VMware environments.
Sources
Troubleshooting VM Import/Export - VM Import/Export
Use CreateInstanceExportTask with a CLI - Amazon Elastic Compute Cloud
Use CreateInstanceExportTask with a CLI - AWS SDK Code Examples
VMWare Workstation on Bare metal EC2 instance. | AWS re:Post

answered 6 months ago
  • For the DCV authentication failure: This is likely because DCV's configuration is tied to the specific instance hardware or configuration that changed during the export/import process. DCV may need to be reconfigured or reinstalled after reimporting. May it have to do with the fact that before the export I unencrypted the volume using an instance rescue, attaching and detaching the volumes? I've checked and even the original AMI before exporting (the encrypted one) has the problem with DCV now, before it was working fine..

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.