You can set the order of sample names in the x-axis by converting the sample id column into a factor. Assuming that your sample id column name is "sample_id", you can:
metadata$sample_id <- factor(
metadata$sample_id,
levels = c("C1GEN", ... , "C7R", ..., "C12VR") # my desired sample order
)